:root {
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #311042 100%);
    --panel-bg: rgba(255, 255, 255, 0.04);
    --panel-border: rgba(255, 255, 255, 0.08);
    --accent-color: #8b5cf6;
    --accent-hover: #7c3aed;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

html, body {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
}

body {
    background: var(--bg-gradient);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    position: relative;
}

.nav-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 12px;
    transition: color 0.2s;
    align-self: center;
}

.nav-back:hover {
    color: var(--text-main);
}

.app-header {
    text-align: center;
    margin-bottom: 24px;
    width: 100%;
}

.brand-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 6px;
    background: linear-gradient(to right, #c084fc, #a855f7);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.brand-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* MAIN LAYOUT (MASAÜSTÜ) */
.main-layout {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 100%;
    margin: auto 0;
}

.side-slot {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 300px;
}

.app-container {
    width: 680px;
    flex-shrink: 0;
    background: var(--panel-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--panel-border);
    border-radius: 24px;
    padding: 36px 30px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    z-index: 2;
}

/* Dropzone Styles */
.drop-zone {
    border: 2px dashed rgba(139, 92, 246, 0.4);
    border-radius: 18px;
    padding: 36px 20px;
    cursor: pointer;
    transition: all 0.25s ease-in-out;
    background: rgba(15, 23, 42, 0.4);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: #c084fc;
    background: rgba(139, 92, 246, 0.08);
    transform: translateY(-2px);
}

.icon-upload {
    font-size: 2.2rem;
    color: #c084fc;
    margin-bottom: 12px;
}

.drop-title {
    font-size: 0.98rem;
    color: var(--text-main);
    font-weight: 600;
}

.drop-info {
    color: var(--text-muted);
    font-size: 0.8rem;
    display: inline-block;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 8px;
}

/* Control Panel */
.control-panel {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.control-panel.hidden {
    display: none;
}

.setting-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: block;
    font-weight: 600;
}

.format-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.fmt-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--panel-border);
    color: var(--text-main);
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    transition: all 0.2s;
    text-align: center;
}

.fmt-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.fmt-btn.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    box-shadow: 0 0 16px rgba(139, 92, 246, 0.35);
}

/* Action Buttons */
.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 6px;
}

.btn-primary, .btn-secondary {
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border: 1px solid var(--panel-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* File List & Items */
.file-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 6px;
}

.btn-clear {
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.file-list-container {
    max-height: 220px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 4px;
}

.file-list-container::-webkit-scrollbar {
    width: 6px;
}

.file-list-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.file-item-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.25);
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.file-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
}

.file-item-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
    font-size: 0.85rem;
}

.btn-single-download {
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.4);
    color: #c084fc;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-single-download:hover {
    background: var(--accent-color);
    color: white;
}

/* BILLBOARD'LAR */
.billboard-container {
    width: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.billboard-frame {
    width: 100%;
    height: 480px;
    background: #090d16;
    border: 10px solid #111827;
    border-radius: 24px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.9), 0 0 30px rgba(139, 92, 246, 0.25);
    position: relative;
    overflow: hidden;
}

.billboard-screen {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    border-radius: 12px;
}

.billboard-track {
    display: flex;
    width: 200%;
    height: 100%;
    animation: slideAd 10s infinite cubic-bezier(0.85, 0, 0.15, 1);
}

@keyframes slideAd {
    0%, 45% { transform: translateX(0%); }
    50%, 95% { transform: translateX(-50%); }
    100% { transform: translateX(0%); }
}

.billboard-slide {
    width: 50%;
    height: 100%;
    flex-shrink: 0;
}

.ad-content {
    width: 100%;
    height: 100%;
    padding: 32px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.ad-purple { background: linear-gradient(180deg, #2e1065 0%, #4c1d95 100%); color: white; }
.ad-dark { background: linear-gradient(180deg, #111827 0%, #1f2937 100%); color: white; }
.ad-neon { background: linear-gradient(180deg, #581c87 0%, #0f172a 100%); color: white; }

.ad-brand {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 3px;
    opacity: 0.75;
    margin-bottom: 12px;
}

.ad-content h4 {
    font-size: 1.45rem;
    font-weight: 800;
    margin-bottom: 10px;
    line-height: 1.25;
}

.ad-content p {
    font-size: 0.9rem;
    opacity: 0.85;
}

.billboard-glass-shine {
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.08) 50%, transparent 70%);
    pointer-events: none;
    animation: shine 6s infinite;
}

@keyframes shine {
    0%, 70% { left: -100%; }
    100% { left: 200%; }
}

.billboard-stand {
    width: 32px;
    height: 60px;
    background: linear-gradient(to right, #1f2937, #111827, #1f2937);
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.6);
}

.app-footer {
    margin-top: 28px;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
}

/* SAĞ ALT DİL SEÇİCİ */
.lang-selector-wrapper {
    position: fixed !important;
    bottom: 24px !important;
    right: 24px !important;
    top: auto !important;
    left: auto !important;
    display: flex !important;
    align-items: center;
    gap: 8px;
    background: rgba(30, 27, 75, 0.9) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(139, 92, 246, 0.4) !important;
    padding: 8px 14px;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(139, 92, 246, 0.25);
    z-index: 99999 !important;
}

.lang-icon {
    color: var(--accent-color);
    font-size: 0.9rem;
}

.lang-dropdown {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
}

.lang-dropdown option {
    background: #0f172a;
    color: #ffffff;
}

/* ===================================================
   MOBİL VE TABLET UYUMLU REKLAM DÜZENİ (RESPONSIVE)
=================================================== */
@media (max-width: 1024px) {
    body {
        padding: 16px 10px !important;
    }

    .main-layout {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 16px !important;
        margin: 0 auto !important;
    }

    /* 1. REKLAM (ÜST): Başlığın hemen altına yerleşir */
    .side-slot:first-of-type {
        order: 1 !important;
        width: 100% !important;
        min-width: 0 !important;
        flex: none !important;
        display: flex !important;
    }

    /* ANA ARAÇ KUTUSU (ORTA) */
    .app-container, .portal-container, .about-container {
        order: 2 !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 20px 14px !important;
        border-radius: 18px !important;
    }

    /* 2. REKLAM (ALT): Aracın altına, Footer üstüne yerleşir */
    .side-slot:last-of-type {
        order: 3 !important;
        width: 100% !important;
        min-width: 0 !important;
        flex: none !important;
        display: flex !important;
    }

    /* MOBİLDE İNCE YATAY REKLAM ŞERİTLERİ */
    .billboard-container {
        width: 100% !important;
        max-width: 100% !important;
        display: flex !important;
    }

    .billboard-frame {
        width: 100% !important;
        height: 80px !important;
        border-width: 3px !important;
        border-radius: 14px !important;
    }

    .billboard-stand {
        display: none !important;
    }

    .ad-content {
        flex-direction: row !important;
        justify-content: space-around !important;
        align-items: center !important;
        padding: 8px 14px !important;
    }

    .ad-brand {
        margin-bottom: 0 !important;
        font-size: 0.68rem !important;
    }

    .ad-content h4 {
        font-size: 1rem !important;
        margin-bottom: 0 !important;
    }

    .ad-content p {
        font-size: 0.78rem !important;
    }

    /* METİN VE SAYFA ELEMANLARI DÜZENİ */
    .brand-title {
        font-size: 1.6rem !important;
    }

    .brand-subtitle {
        font-size: 0.85rem !important;
    }

    .drop-zone {
        padding: 24px 12px !important;
    }

    .icon-upload {
        font-size: 2rem !important;
        margin-bottom: 8px !important;
    }

    .format-selector {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }

    .action-buttons {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }

    .file-item-name {
        max-width: 140px !important;
    }

    .lang-selector-wrapper {
        bottom: 12px !important;
        right: 12px !important;
        padding: 6px 10px !important;
    }

    .lang-dropdown {
        font-size: 0.75rem !important;
    }
}

@media (max-width: 380px) {
    .format-selector {
        grid-template-columns: 1fr !important;
    }
}