:root {
    --bg-color: #f8fafc;
    --surface: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --success: #10b981;
    --success-hover: #059669;
    --danger: #ef4444;
    --border: #e2e8f0;
    --border-hover: #cbd5e1;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hafif Karanlık (Soft Dark) Tema */
[data-theme="dark"] {
    --bg-color: #171923; /* Daha yumuşak, göz yormayan bir antrasit */
    --surface: #222431;  /* Yüzeyler için hafif aydınlık bir lacivert-gri */
    --text-primary: #e2e8f0;
    --text-secondary: #a0aec0;
    --primary: #6366f1;
    --primary-hover: #818cf8;
    --border: #2d3142;
    --border-hover: #4a5568;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    transition: background-color var(--transition), color var(--transition);
    min-height: 100vh;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--surface);
    border-right: 1px solid var(--border);
    padding: 24px;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    z-index: 50;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.text-logo {
    justify-content: flex-start;
}

.text-logo h1 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #ffffff;
    text-transform: uppercase;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    transition: var(--transition);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
}

.mobile-menu-btn:hover {
    background-color: var(--border);
}

#nav-menu {
    flex: 1; 
    width: 100%;
}

.nav-links {
    list-style: none;
}

.nav-links li {
    margin-bottom: 8px;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 500;
    transition: var(--transition);
}

.nav-icon {
    font-size: 18px;
}

.nav-links li.active a, .nav-links a:hover {
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

/* Sidebar Footer (Instagram) */
.sidebar-footer {
    margin-top: auto;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.social-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    padding: 8px 12px;
    border-radius: var(--radius);
}

.social-link:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
    box-shadow: 0 4px 10px rgba(220, 39, 67, 0.3);
}

.instagram-icon {
    width: 24px;
    height: 24px;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.top-header {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.top-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.icon-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-primary);
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background-color: var(--bg-color);
}

.user-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--primary);
}

.content-area {
    padding: 40px;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Converter Card */
.converter-card {
    background-color: var(--surface);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 600px; /* Merkezin max genişliği */
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: var(--transition);
    flex-shrink: 0;
}

/* Footer (AdSense) */
.site-footer {
    margin-top: 40px;
    width: 100%;
    max-width: 600px;
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
}

.footer-links {
    margin-top: 8px;
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.converter-header {
    text-align: center;
    margin-bottom: 32px;
}

.converter-header h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.converter-header p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.5;
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--border);
    border-radius: 16px;
    padding: 48px 24px;
    text-align: center;
    transition: var(--transition);
    background-color: var(--bg-color);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.upload-area:hover, .upload-area.dragover {
    border-color: var(--primary);
    background-color: rgba(99, 102, 241, 0.05);
}

.upload-icon {
    color: var(--primary);
    margin-bottom: 16px;
    transition: transform 0.3s;
}

.upload-area:hover .upload-icon {
    transform: translateY(-5px);
}

.upload-area h4 {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.upload-hint {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(99, 102, 241, 0.3);
}

.btn-success {
    background-color: var(--success);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.39);
}

.btn-success:hover {
    background-color: var(--success-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.23);
}

.w-full {
    width: 100%;
}

.hidden {
    display: none !important;
}

/* File Status Area */
.file-status-area {
    margin-top: 24px;
    animation: fadeIn 0.4s ease forwards;
}

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

.file-info-box {
    display: flex;
    align-items: center;
    background-color: var(--bg-color);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-bottom: 24px;
}

.file-icon {
    font-size: 32px;
    margin-right: 16px;
}

.file-details {
    flex: 1;
    overflow: hidden;
}

.file-name {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.file-size {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
}

.remove-btn {
    color: var(--danger) !important;
    font-size: 14px;
    background-color: rgba(239, 68, 68, 0.1);
}

.remove-btn:hover {
    background-color: rgba(239, 68, 68, 0.2) !important;
}

/* Coming Soon Area */
.coming-soon-area {
    text-align: center;
    padding: 32px 24px;
    background-color: var(--bg-color);
    border: 1px dashed var(--border);
    border-radius: 16px;
    margin-top: 24px;
    animation: fadeIn 0.4s ease forwards;
}

.coming-soon-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.coming-soon-area h4 {
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.coming-soon-area p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 24px;
    line-height: 1.5;
}

.fake-url-input {
    display: flex;
    gap: 12px;
    opacity: 0.6;
}

.fake-url-input input {
    flex: 1;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background-color: var(--surface);
    color: var(--text-primary);
    cursor: not-allowed;
    outline: none;
    font-size: 14px;
}

.fake-url-input button {
    cursor: not-allowed;
}

/* Progress Bar */
.progress-container {
    margin-bottom: 24px;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background-color: var(--primary);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-text {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Supported Formats */
.supported-formats {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px dashed var(--border);
}

.supported-formats h5 {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 16px;
    font-style: italic;
}

.format-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 140px;
    overflow-y: auto;
    padding-right: 8px;
}

.format-badges::-webkit-scrollbar {
    width: 6px;
}
.format-badges::-webkit-scrollbar-track {
    background: var(--bg-color);
    border-radius: 4px;
}
.format-badges::-webkit-scrollbar-thumb {
    background: var(--border-hover);
    border-radius: 4px;
}

.format-badges span {
    background-color: transparent;
    border: 1px dashed var(--border-hover);
    color: var(--text-primary);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    transition: var(--transition);
    cursor: default;
}

.format-badges span:hover {
    background-color: rgba(99, 102, 241, 0.08); /* Hafif lacivert efekti */
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

/* ========================================= */
/* MOBİL UYUM (RESPONSIVE)                   */
/* ========================================= */

@media screen and (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        padding: 16px 20px;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .sidebar-header {
        margin-bottom: 0;
    }

    .mobile-menu-btn {
        display: block;
    }

    #nav-menu {
        display: none;
        margin-top: 20px;
    }
    
    #nav-menu.show {
        display: block;
        animation: fadeIn 0.3s ease forwards;
    }

    /* Instagram Mobil En Alt Bar */
    .sidebar-footer {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background-color: var(--surface);
        border-top: 1px solid var(--border);
        padding: 12px 20px;
        z-index: 1000;
        margin-top: 0;
        display: flex;
        justify-content: center;
        box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.05); /* Gölgelendirme */
    }

    [data-theme="dark"] .sidebar-footer {
        box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.4);
    }

    .top-header {
        padding: 0 20px;
    }

    .top-header h2 {
        font-size: 1rem;
    }

    .content-area {
        padding: 24px 16px;
        padding-bottom: 100px; /* Alttaki menü nedeniyle içerik ezilmemesi için ekstra boşluk */
    }

    .converter-card {
        padding: 24px;
    }

    .upload-area {
        padding: 32px 16px;
    }
    
    .upload-area h4 {
        font-size: 16px;
    }
}
