/* 
   cvpark Design System 
   Premium Dark Theme with Neon Accents & Glassmorphism
*/

:root {
    /* Colors */
    --bg-dark: #0a0a0f;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-glass: rgba(255, 255, 255, 0.02);

    --text-main: #ffffff;
    --text-muted: #a0a0b0;

    --accent-primary: #6c5ce7;
    /* Deep Purple */
    --accent-secondary: #00d2d3;
    /* Cyan/Teal */
    --accent-glow: rgba(108, 92, 231, 0.5);

    --border-light: rgba(255, 255, 255, 0.1);

    /* Gradients */
    --gradient-main: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    --gradient-text: linear-gradient(to right, #fff, #a0a0b0);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 32px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Allow text selection in inputs and content areas */
input,
textarea,
select,
.glass-panel p,
.glass-panel li,
[contenteditable="true"] {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 3.5rem;
    background: var(--gradient-main);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: var(--spacing-sm);
}

h2 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
}

p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: var(--spacing-sm);
}

/* Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    overflow-x: hidden;
}

.glass-panel {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-main);
    color: white;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--accent-primary);
    background: rgba(108, 92, 231, 0.1);
}

/* Layout Helpers */
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}

/* Animations */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }

    * {
        max-width: 100%;
    }

    h1 {
        font-size: 2.2rem;
        /* Reduced from 2.5rem */
        line-height: 1.2;
    }

    h2 {
        font-size: 1.8rem;
        /* Reduced from 2rem */
    }

    /* Hero Section Mobile Fix */
    header {
        padding-top: 120px !important;
        padding-bottom: 60px !important;
    }

    /* Privacy/Contact Pages Mobile Fix */
    .privacy-container {
        padding-top: 140px !important;
        margin-top: 0 !important;
    }

    .privacy-container .glass-panel {
        padding: 1.5rem !important;
        margin-top: 0 !important;
        padding-top: 120px !important;
    }
    
    .privacy-container h1 {
        font-size: 1.8rem !important;
       
    }

    /* Reduce float animation on mobile */
    .animate-float {
        animation: floatMobile 4s ease-in-out infinite;
    }

    @keyframes floatMobile {
        0%, 100% {
            transform: translateY(0px);
        }
        50% {
            transform: translateY(-5px);
        }
    }

    .container {
        padding: 0 1rem !important;
        max-width: 100%;
        overflow-x: hidden;
    }

    .glass-panel {
        padding: 1.5rem !important;
        margin-left: 0;
        margin-right: 0;
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    /* Navbar Adjustments */
    nav.glass-panel {
        width: 95% !important;
        padding: 1rem !important;
        top: 10px !important;
    }

    .navbar-hamburger {
        display: block !important;
    }

    .navbar-menu {
        display: none !important;
    }

    .mobile-dropdown-menu {
        display: block !important;
        top: 60px !important;
    }
    
    .mobile-dropdown-menu.active {
        opacity: 1 !important;
        pointer-events: all !important;
        animation: dropdownSlideIn 0.3s ease forwards;
    }

    .navbar-menu > div {
        width: 100%;
        flex-direction: column !important;
        gap: 0.75rem !important;
    }

    .navbar-menu a {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    /* Footer Adjustments */
    footer .grid-2 {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
        gap: 2rem;
    }

    footer div[style*="justify-content: flex-end"] {
        justify-content: center !important;
    }

    /* General Grid Adjustments for Mobile */
    .grid-2 {
        grid-template-columns: 1fr !important;
    }

    /* Dashboard Responsiveness */
    .dashboard-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        align-items: center !important;
    }

    .dashboard-header h2 {
        margin-bottom: 0.5rem;
    }

    .dashboard-header > div {
        flex-direction: column;
        width: 100%;
    }

    .dashboard-header a {
        width: 100%;
        text-align: center;
    }

    .container[style*="padding-top: 100px"] {
        padding-top: 120px !important;
        padding-bottom: 30px !important;
    }

    /* Form Elements Mobile */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="file"],
    textarea,
    select {
        font-size: 16px !important; /* Prevents zoom on iOS */
    }

    /* Social Rows Mobile */
    .social-row {
        flex-direction: column !important;
    }

    .social-row input {
        width: 100% !important;
        flex: none !important;
    }

    /* Button Adjustments */
    .btn {
        width: 100%;
        padding: 12px 20px !important;
        font-size: 0.95rem !important;
    }

    /* Dashboard Specific */
    form[action*="dashboard"] > div:last-child {
        text-align: center !important;
    }

    form[action*="dashboard"] button[type="submit"] {
        width: 100%;
    }

    /* ============================================ */
    /* MOBILE MODAL SYSTEM ACTIVATION */
    /* ============================================ */
    
    /* Hide desktop add buttons */
    #add-social,
    #add-experience,
    #add-project {
        display: none !important;
    }

    /* Hide existing items in containers */
    #socials-container .social-row,
    #experiences-container > .glass-panel,
    #projects-container > .glass-panel {
        display: none !important;
    }

    /* Show mobile manage buttons */
    .cv-mobile-manage-btn {
        display: block !important;
        width: 100%;
        margin-top: 1rem;
    }

    /* Show mobile count badges */
    .cv-mobile-count {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        background: rgba(108, 92, 231, 0.15);
        border: 1px solid var(--accent-primary);
        padding: 0.75rem 1rem;
        border-radius: var(--radius-sm);
        margin-bottom: 1rem;
        color: var(--text-main);
        font-size: 0.95rem;
    }

    .cv-mobile-count-number {
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--accent-secondary);
    }

    .cv-mobile-count-icon {
        font-size: 1.2rem;
        color: var(--accent-primary);
    }

}

/* Dashboard Header Base Styles */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 1rem;
}

/* Navbar Mobile */
.navbar-hamburger {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: var(--transition-fast);
}

.navbar-hamburger:hover {
    color: var(--accent-primary);
}

.navbar-hamburger:active {
    transform: scale(0.95);
}

/* Mobile Dropdown Menu */
.mobile-dropdown-menu {
    display: none; /* Hidden on desktop */
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.mobile-dropdown-menu.active {
    opacity: 1 !important;
    pointer-events: all !important;
    display: block !important;
}

@keyframes dropdownSlideIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.mobile-dropdown-content {
    padding: 0.5rem;
    border: 1px solid var(--border-light);
    background: rgba(10, 10, 15, 0.95) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
                0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.mobile-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 1rem 1.25rem;
    color: var(--text-main);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    font-size: 0.95rem;
    font-weight: 500;
}

.mobile-dropdown-item:hover {
    background: rgba(108, 92, 231, 0.1);
    color: var(--accent-primary);
    transform: translateX(4px);
}

.mobile-dropdown-item:active {
    transform: translateX(4px) scale(0.98);
}

.mobile-dropdown-item i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
    color: var(--accent-secondary);
}

.mobile-dropdown-divider {
    height: 1px;
    background: var(--border-light);
    margin: 0.5rem 0;
}

/* ============================================ */
/* MODAL SYSTEM - Mobile Only */
/* ============================================ */

/* Modal Overlay */
.cv-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10000;
    padding: 1rem;
    overflow-y: auto;
    align-items: flex-start;
    justify-content: center;
    padding-top: 2rem;
}

.cv-modal-overlay.active {
    display: flex;
}

/* Modal Content */
.cv-modal-content {
    background: var(--bg-dark);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 0;
    width: 100%;
    max-width: 600px;
    max-height: calc(100vh - 4rem);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalSlideUp 0.3s ease-out;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal Header */
.cv-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light);
    background: rgba(255, 255, 255, 0.02);
}

.cv-modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--accent-primary);
}

.cv-modal-close {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition-fast);
}

.cv-modal-close:hover {
    background: rgba(255, 107, 107, 0.2);
    border-color: #ff6b6b;
    color: #ff6b6b;
}

/* Modal Body */
.cv-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

/* Add Form in Modal */
.cv-add-form {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--accent-primary);
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.cv-add-form.hidden {
    display: none;
}

.cv-form-group {
    margin-bottom: 1rem;
}

.cv-form-group:last-child {
    margin-bottom: 0;
}

.cv-form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.cv-form-input,
.cv-form-textarea {
    width: 100%;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    color: white;
    font-size: 1rem;
    outline: none;
    transition: var(--transition-fast);
    font-family: inherit;
}

.cv-form-input:focus,
.cv-form-textarea:focus {
    border-color: var(--accent-primary);
    background: rgba(0, 0, 0, 0.4);
}

.cv-form-textarea {
    resize: vertical;
    min-height: 80px;
}

.cv-form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.cv-form-actions .btn {
    flex: 1;
}

/* Modal Footer */
.cv-modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.02);
}

.cv-modal-footer .btn {
    flex: 1;
}

/* Item List */
.cv-item-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.cv-item-list:empty::after {
    content: 'Henüz öğe eklenmemiş';
    display: block;
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Item Card */
.cv-item-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 1rem;
    position: relative;
    transition: var(--transition-fast);
}

.cv-item-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-primary);
}

.cv-item-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.cv-item-card-content {
    flex: 1;
}

.cv-item-card-title {
    font-weight: 600;
    color: white;
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
}

.cv-item-card-subtitle {
    color: var(--accent-secondary);
    font-size: 0.9rem;
    margin: 0.25rem 0;
}

.cv-item-card-meta {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0.25rem 0;
}

.cv-item-card-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-top: 0.5rem;
    word-break: break-word;
}

.cv-item-delete {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
    cursor: pointer;
    padding: 0.5rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.cv-item-delete:hover {
    background: rgba(255, 107, 107, 0.2);
    border-color: #ff6b6b;
    transform: scale(1.1);
}

/* Mobile Manage Buttons - Hidden by default */
.cv-mobile-manage-btn {
    display: none;
}

/* Mobile Item Count Badge - Hidden by default */
.cv-mobile-count {
    display: none;
}