/* ==========================================================================
   PRIM Analiz - Klasik Kömür (Classic Charcoal) Pencere Sistemi
   ========================================================================== */

:root {
    /* Color Palette - Klasik Kömür */
    --bg-main: #0a0a0f; /* Apple Deep Black */ /* Deep charcoal background */
    --bg-panel: #1e1e24; /* Apple Frosted Glass (Solid) */ /* Window background */
    --bg-panel-hover: #26262d;
    --border-color: rgba(255, 255, 255, 0.08);
    
    --text-primary: #ffffff;
    --text-secondary: #d4d4d8; /* Brighter for better contrast */
    --text-muted: #a1a1aa;

    
    --accent-blue: #3b82f6; /* Classic ocean blue */
    --accent-blue-hover: #2563eb;
    
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    
    /* Radii */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    
    /* Shadows */
    --shadow-window: 0 12px 32px rgba(0, 0, 0, 0.5);
    --shadow-inner: inset 0 2px 4px rgba(255, 255, 255, 0.02);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ================= Navbar ================= */
.navbar {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
    background-color: var(--bg-panel);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 40px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--accent-blue);
    font-size: 24px;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-text span {
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    line-height: 1;
    color: var(--text-primary);
}

.logo-text .sub {
    font-size: 13px; /* Increased from 11px */
    font-weight: 500;
    color: var(--text-secondary);

    letter-spacing: 1px;
    margin-top: 2px;
}

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 15px; /* Increased */
    margin-bottom: 6px;
    transition: color 0.2s;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text-primary);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.lang-selector {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.lang-selector .active {
    color: var(--text-primary);
}

.btn-primary {
    background: var(--accent-blue);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--accent-blue-hover);
}

.btn-primary-small {
    background: var(--accent-blue);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-outline:hover {
    background: var(--bg-panel-hover);
}

.btn-outline-small {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
}

/* ================= Dashboard Grid ================= */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px 32px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.main-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.side-column {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

/* Window/Panel Styles */
.panel {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-window);
    overflow: visible;
    display: flex;
    flex-direction: column;
}

.panel h3 {
    font-size: 16px;
    font-weight: 600;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ================= Chart Panel ================= */
.chart-panel .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    background: var(--shadow-inner);
    flex-wrap: wrap;
    gap: 16px;
}

.search-bar {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0 12px;
    flex: 0 1 350px;
    min-width: 200px;
}

.search-bar i {
    color: var(--text-secondary);
}

.search-bar input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 10px;
    width: 100%;
    outline: none;
    font-size: 14px;
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    min-width: 300px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    max-height: 250px;
    overflow-y: auto;
    z-index: 99999 !important;
    display: none;
    margin-top: 4px;
    box-shadow: var(--shadow-window);
}

.dropdown.active {
    display: block;
}

.dropdown-item {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    font-size: 14px;
}

.dropdown-item:hover {
    background: var(--bg-panel-hover);
}

.category-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.category-tabs .tab {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.category-tabs .tab.active {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
}

.btn-analyze {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: white;
    border: 1px solid rgba(255,255,255,0.15);
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(124, 58, 237, 0.3), inset 0 2px 4px rgba(255,255,255,0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.btn-analyze:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(124, 58, 237, 0.5), inset 0 2px 4px rgba(255,255,255,0.3);
}
.btn-analyze:active {
    transform: translateY(1px);
}

.chart-header {
    padding: 24px 24px 12px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.asset-info h2 {
    font-size: 24px;
    margin-bottom: 4px;
    font-family: 'Outfit', sans-serif;
}

.live-price {
    font-size: 28px;
    font-weight: 800;
    color: var(--success);
    font-family: 'Outfit', sans-serif;
}

.timeframes {
    display: flex;
    gap: 4px;
    background: var(--bg-main);
    padding: 4px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.tf {
    background: transparent;
    border: none;
    padding: 4px 10px;
    font-weight: 700;
    font-size: 15px; /* Increased from 14px */
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 4px;
}

.tf.active {
    background: var(--bg-panel-hover);
    color: var(--text-primary);
}

.chart-area {
    height: 650px;
    min-height: 60vh;
    width: 100%;
}

/* ================= Feature Cards ================= */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    max-width: 1400px;
    margin: 0 auto 32px auto;
    padding: 0 32px;
}

.feature-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.icon-box {
    width: 40px;
    height: 40px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 18px;
}

.feature-card h4 {
    font-size: 15px;
    font-weight: 600;
}

.feature-card p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ================= Side Column Panels ================= */

/* Tickers */
.ticker-list {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ticker-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    background: var(--bg-main);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.ticker-item span {
    flex: 1;
    color: var(--text-secondary);
    font-weight: 500;
}

.ticker-item b {
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
}

/* AI Engine */
.engine-panel {
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.05);
}

.decision-matrix {
    padding: 20px;
}

.decision-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.badge {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
}

#aiTitleText {
    font-size: 26px; /* Increased */
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--text-primary);
}

.levels-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--bg-main);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    padding: 12px;
}

.level-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 6px 0;
    border-bottom: 1px dashed var(--border-color);
}

.level-row:last-child {
    border-bottom: none;
}

.level-row.resist span:last-child { color: var(--danger); font-weight: 600; }
.level-row.support span:last-child { color: var(--success); font-weight: 600; }
.level-row.current { 
    background: rgba(255,255,255,0.05); 
    padding: 8px; 
    border-radius: 4px; 
    font-weight: 700;
    margin: 4px 0;
    border-bottom: none;
}

.xai-panel {
    padding: 16px;
    background: var(--shadow-inner);
    border-top: 1px solid var(--border-color);
}

.xai-panel h5 {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.xai-panel p {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-primary);
}

/* Alerts */
.alert-panel p {
    padding: 0 16px 12px;
    font-size: 13px;
    color: var(--text-secondary);
}

.alert-input-group {
    display: flex;
    padding: 0 16px 16px;
    gap: 8px;
}

.alert-input-group input {
    flex: 1;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    outline: none;
}

.alerts-list {
    padding: 0 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Radar */
.panel-header-simple {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header-simple h3 {
    border: none;
    padding: 0;
}

.radar-body {
    padding: 16px;
    min-height: 200px;
}

.radar-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    align-items: center;
    background: var(--bg-main);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.radar-item:hover {
    border-color: var(--accent-blue);
}

.radar-item .ri-symbol { font-weight: 700; color: var(--text-primary); }
.radar-item .ri-price { color: var(--text-secondary); }
.radar-item .ri-target { color: var(--success); font-weight: 600; }
.radar-item .ri-dist { color: var(--warning); }
.radar-item .ri-badge { 
    background: rgba(16, 185, 129, 0.1); 
    color: var(--success); 
    padding: 4px 8px; 
    border-radius: 4px; 
    text-align: center;
    font-weight: 700;
}

/* Overlays / Modals */
.overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 24px 48px rgba(0,0,0,0.5);
}

.modal h2 {
    margin-bottom: 20px;
    font-size: 20px;
}

.modal input {
    width: 100%;
    padding: 12px;
    margin-bottom: 16px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    color: white;
    border-radius: var(--radius-sm);
}

/* Snackbar */
#snackbar {
    visibility: hidden;
    min-width: 250px;
    background-color: var(--accent-blue);
    color: #fff;
    text-align: center;
    border-radius: var(--radius-sm);
    padding: 16px;
    position: fixed;
    z-index: 2000;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

#snackbar.show {
    visibility: visible;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

@keyframes fadein {
    from {bottom: 0; opacity: 0;}
    to {bottom: 30px; opacity: 1;}
}

@keyframes fadeout {
    from {bottom: 30px; opacity: 1;}
    to {bottom: 0; opacity: 0;}
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        display: none;
    }
    
    .radar-item {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
}


/* ===== MOBIL OPTIMIZASYONU (KIRMIZI KOD) ===== */
@media (max-width: 768px) {
    .chart-area {
        height: 450px !important;
        min-height: 50vh !important;
    }
    /* Modül 1: Grafik Konteyneri */
    .dashboard-grid {
        display: block !important;
    }
    .main-column {
        width: 100% !important;
        overflow-x: hidden;
    }
    .chart-panel {
        width: 100% !important;
        padding: 10px !important;
        margin: 0 !important;
        overflow: visible;
    }
    #chartContainer {
        width: 100% !important;
        height: 50vh !important;
        min-height: 350px !important;
        max-height: 500px !important;
        touch-action: pan-y !important;
    }
    .tv-lightweight-charts {
        width: 100% !important;
        height: 100% !important;
    }
    
    /* Modül 2: Üst Menü Yığılmaları */
    .panel-header {
        flex-direction: column;
        align-items: stretch !important;
        gap: 8px;
        padding: 10px;
    }
    .search-bar {
        width: 100% !important;
        max-width: 100% !important;
        flex-basis: auto !important;
        height: 44px;
    }
    .category-tabs {
        width: 100% !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        padding-bottom: 4px;
    }
    .category-tabs::-webkit-scrollbar {
        display: none !important;
    }
    .btn-analyze {
        width: 100% !important;
        margin-top: 4px;
        padding: 14px !important;
    }
    
    /* Modül 3: Başlık ve Zaman Dilimi */
    .chart-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }
    .tf-container {
        width: 100% !important;
        overflow-x: auto !important;
        justify-content: flex-start !important;
        padding-bottom: 4px;
        scrollbar-width: none;
    }
    .tf-container::-webkit-scrollbar { display: none; }
    .tf {
        min-width: 44px !important;
        min-height: 44px !important;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* SweetAlert Z-Index Fix */
    .swal2-container {
        z-index: 999999 !important;
    }
    
    /* Yan menü mobilde alta geçer */
    .side-column {
        width: 100% !important;
        margin-top: 20px;
    }
}

/* ===== MISSING SUGGESTION CSS RESTORED ===== */
.suggestion-item {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}
.suggestion-item:last-child {
    border-bottom: none;
}
.suggestion-item:hover {
    background: rgba(255, 255, 255, 0.06);
}
.suggestion-symbol {
    font-weight: 700;
    color: var(--accent-light, #60a5fa);
    font-size: 13px;
}
.suggestion-name {
    color: var(--text-secondary, #94a3b8);
    font-size: 12px;
}
.suggestion-category {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted, #64748b);
}


/* ==========================================================================
   MODÜL 4: UI/UX YIKIM KORUMASI VE TAŞMA KİLİDİ (DEFENSIVE CSS ARMOR)
   ========================================================================== */

/* 1. Mobil X-Overflow Zırhı */
html, body {
    overflow-x: hidden !important;
    width: 100vw !important;
    max-width: 100% !important;
}

/* 2. Orantısal Ölçekleme (Proportional Scaling) */
.modal {
    /* Sabit 500px yerine matematiksel altın oran formülü */
    width: min(calc(100vw - 32px), 500px) !important;
    max-width: 100% !important;
    aspect-ratio: auto !important;
    /* Margin auto fallback for centering */
    margin: 0 auto;
}

/* Modal Title responsive text */
.modal-title {
    flex-wrap: wrap;
    word-break: break-word;
}

/* 3. Eleman ve Buton Bozulması (Defansif Flexbox) */
.btn-group, .button-row, .modal-actions, .navbar, .auth-buttons, [style*="display: flex"] {
    flex-wrap: wrap;
}

/* Prevent inputs from overflowing */
input, select, textarea {
    max-width: 100%;
}

/* Flexbox Gap Guarantee on Mobile (Media Query Override) */
@media (max-width: 768px) {
    .navbar {
        gap: 12px !important;
    }
    .modal-actions button, .auth-buttons button {
        flex: 1 1 auto; /* Allow buttons to grow and fill space when wrapped */
        min-width: 120px;
    }
}


/* Modül 5: Grafik Konteyneri Taşma Kilidi */
#chartContainer {
    max-width: 100vw !important;
    width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}


/* Modül 7: Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, var(--bg-panel) 25%, var(--border-color) 50%, var(--bg-panel) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite ease-in-out;
    border-radius: var(--radius-sm);
    min-height: 20px;
    margin-bottom: 8px;
    color: transparent !important;
}
@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Score Tooltip */
.score-tooltip-wrapper { position: relative; display: inline-block; cursor: help; }
.score-tooltip-wrapper .score-tooltip-content { visibility: hidden; width: 220px; background-color: rgba(15,23,42,0.95); color: #fff; text-align: left; border-radius: 8px; padding: 12px; position: absolute; z-index: 100; bottom: 130%; left: 50%; transform: translateX(-50%); opacity: 0; transition: opacity 0.3s; font-size: 11px; font-weight: normal; border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 10px 25px rgba(0,0,0,0.5); pointer-events: none; }
.score-tooltip-wrapper:hover .score-tooltip-content { visibility: visible; opacity: 1; pointer-events: auto; }
/* ==========================================================================
   MOBILE OPTIMIZATION (Responsive Design)
   ========================================================================== */
@media screen and (max-width: 768px) {
    body {
        overflow-x: hidden;
    }

    /* Navbar & Header */
    .navbar {
        flex-direction: column;
        padding: 12px 16px;
        gap: 12px;
    }
    
    .nav-left {
        flex-direction: column;
        gap: 12px;
        width: 100%;
        text-align: center;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }
    
    .nav-links a {
        font-size: 13px;
    }
    
    .nav-right {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    /* Grid & Layout Padding */
    .dashboard-grid {
        padding: 12px;
        gap: 16px;
    }
    
    /* Hero Banner */
    .corporate-hero-banner h1 {
        font-size: 18px !important;
    }
    .corporate-hero-banner p {
        font-size: 11px !important;
    }
    .corporate-hero-banner {
        padding: 16px !important;
        height: auto !important;
    }
    .corporate-hero-banner img {
        height: 100% !important;
    }
    
    /* Panel Header & Controls (Mobile Optimized) */
    .chart-panel .panel-header {
        flex-direction: column;
        align-items: stretch !important;
        gap: 12px;
        padding: 12px 10px !important;
        height: auto !important;
        min-height: unset !important;
    }
    
    .search-bar {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 44px !important;
        height: 44px !important;
        min-height: 44px !important;
        box-sizing: border-box;
    }
    
    .search-bar input {
        height: 100%;
        padding: 0 10px;
    }
    
    .header-controls {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        width: 100%;
    }
    
    .category-tabs, .timeframes {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        overflow: visible !important; /* No horizontal scroll on mobile, let it wrap */
    }
    
    .category-tabs .tab, .timeframes .tf, .ct-btn {
        flex: 1 1 auto;
        text-align: center;
        padding: 8px 10px !important;
        font-size: 12px !important;
        justify-content: center;
        border-radius: 6px !important;
        min-height: 36px;
        display: flex;
        align-items: center;
    }
    
    #candleTimer {
        font-size: 11px !important;
        padding: 6px 10px !important;
        margin-left: 0 !important;
        flex: 1 1 100%;
        justify-content: center;
    }
    
    /* Chart Header (Price, Name) */
    .chart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding-bottom: 12px;
    }
    
    .chart-header .asset-info {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 6px !important;
    }
    
    #chartTitle {
        font-size: 18px !important;
    }
    
    .live-price {
        font-size: 22px !important;
    }
    
    /* Chart Area */
    .chart-area {
        height: 350px !important;
    }
    
    /* Modals */
    .modal-content {
        width: 95% !important;
        max-width: 95% !important;
        padding: 20px 16px !important;
    }
    
    /* Tooltip adjustments */
    .score-tooltip-wrapper .score-tooltip-content {
        width: 200px !important;
        left: 0 !important;
        transform: none !important;
        bottom: 110% !important;
    }
}


/* ══════════════════════════════════════════════════════════ */
/* MOBİL RESPONSIVE — 768px ve altı                          */
/* ══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {

    /* ── GENEL LAYOUT ── */
    body {
        font-size: 14px;
        overflow-x: hidden;
    }

    .dashboard-grid,
    .main-grid,
    .content-wrapper {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: 1fr !important;
        gap: 8px !important;
        padding: 8px !important;
    }

    /* ── HEADER / NAV ── */
    .top-nav,
    .header,
    nav {
        flex-wrap: wrap;
        padding: 6px 10px !important;
        gap: 6px;
    }

    /* Risk profil butonları — küçült */
    .risk-buttons,
    .risk-btn-group {
        display: none !important; /* Mobilde gizle, çok yer kaplıyor */
    }

    /* Dil butonları */
    .lang-switch {
        font-size: 11px !important;
    }

    /* ── ARAMA ALANI ── */
    #searchContainer,
    .search-container,
    .search-wrapper {
        position: relative !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    #searchInput,
    .search-input {
        width: 100% !important;
        font-size: 14px !important;
        padding: 10px 12px !important;
        border-radius: 10px !important;
        box-sizing: border-box !important;
    }

    /* ── ARAMA DROPDOWN (Sembol listesi) ── */
    #suggestionsDropdown,
    .search-suggestions,
    .suggestions-list,
    #suggestions,
    .autocomplete-list {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        max-height: 100vh !important;
        height: 100vh !important;
        z-index: 9999 !important;
        background: var(--bg-primary, #0B1121) !important;
        overflow-y: auto !important;
        padding: 60px 16px 16px !important;
        border-radius: 0 !important;
        border: none !important;
    }

    #suggestionsDropdown::before,
    .search-suggestions::before,
    .suggestions-list::before {
        content: '← Geri dönmek için dışarı tıklayın';
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        padding: 16px;
        background: var(--bg-secondary, #111827);
        color: #94A3B8;
        font-size: 13px;
        text-align: center;
        z-index: 10000;
        border-bottom: 1px solid rgba(100,116,139,0.2);
    }

    #suggestionsDropdown .suggestion-item,
    .search-suggestions .suggestion-item,
    .suggestions-list li,
    .autocomplete-item {
        padding: 14px 16px !important;
        font-size: 15px !important;
        border-bottom: 1px solid rgba(100,116,139,0.1) !important;
    }

    /* ── KATEGORİ BUTONLARI (Kripto, BIST, US, Emtia) ── */
    .category-tabs,
    .category-buttons {
        display: flex !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        gap: 6px !important;
        padding: 4px 0 !important;
        scrollbar-width: none;
    }
    .category-tabs::-webkit-scrollbar { display: none; }

    .category-tab,
    .category-btn {
        flex-shrink: 0 !important;
        font-size: 11px !important;
        padding: 6px 12px !important;
        border-radius: 8px !important;
        white-space: nowrap !important;
    }

    /* ── TIMEFRAME BUTONLARI ── */
    .timeframe-buttons,
    .tf-buttons {
        display: flex !important;
        gap: 2px !important;
        justify-content: space-between !important;
    }

    .timeframe-btn,
    .tf-btn {
        flex: 1 !important;
        font-size: 11px !important;
        padding: 6px 4px !important;
        min-width: 32px !important;
        text-align: center !important;
        border-radius: 6px !important;
    }

    /* ── GRAFİK ALANI ── */
    #chartContainer,
    #primChart,
    .chart-container,
    .tv-lightweight-charts {
        width: 100% !important;
        height: 300px !important; /* Mobilde sabit yükseklik */
        min-height: 280px !important;
        max-height: 400px !important;
    }

    /* Grafik başlığı */
    .chart-header,
    .chart-title {
        font-size: 14px !important;
        flex-wrap: wrap !important;
        gap: 4px !important;
    }

    .chart-price {
        font-size: 18px !important;
    }

    /* OHLCV verileri */
    .ohlcv-data,
    .candle-info {
        font-size: 10px !important;
        flex-wrap: wrap !important;
        gap: 4px !important;
    }

    /* Gerçek Veri / Gecikme badge'leri */
    #dataSourceBadge,
    #delayBadge {
        font-size: 8px !important;
        padding: 1px 6px !important;
    }

    /* Destek/Direnç etiketleri grafikte */
    .sr-label,
    .sr-zone-label {
        font-size: 8px !important;
        padding: 1px 4px !important;
    }

    /* ── TEKNİK RAPOR PANELİ ── */
    .analysis-panel,
    .report-panel,
    #reportSection {
        padding: 12px !important;
        border-radius: 12px !important;
    }

    /* Sinyal başlığı */
    .signal-label {
        font-size: 22px !important;
    }

    /* Gösterge kartları — 3 sütundan 2 sütuna */
    .indicator-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 6px !important;
    }

    .indicator-card {
        padding: 10px !important;
    }

    .indicator-card .value {
        font-size: 15px !important;
    }

    /* Giriş planı (Hedef/Giriş/Stop) — 3 sütun kalsın ama küçült */
    .entry-plan-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 4px !important;
    }

    .entry-plan-card {
        padding: 8px !important;
    }

    .entry-plan-card .price {
        font-size: 13px !important;
    }

    /* ── SAĞ PANEL (Haberler, Alarmlar, Portföy) ── */
    .sidebar,
    .right-panel,
    .side-panels {
        width: 100% !important;
        order: 3 !important; /* Grafikten sonra göster */
    }

    /* Panel kartları — katlanabilir yap */
    .side-panel,
    .panel-card {
        border-radius: 12px !important;
        margin-bottom: 8px !important;
        overflow: hidden !important;
    }

    /* Panel başlıkları — tıklanabilir collapse */
    .panel-head,
    .panel-header {
        cursor: pointer !important;
        padding: 12px !important;
        user-select: none !important;
    }

    .panel-head::after,
    .panel-header::after {
        content: '▼';
        float: right;
        font-size: 10px;
        color: #64748B;
        transition: transform 0.3s;
    }

    .panel-head.collapsed::after,
    .panel-header.collapsed::after {
        transform: rotate(-90deg);
    }

    /* Panel içeriği — varsayılan kapalı (mobilde) */
    .panel-body,
    .panel-content {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        padding: 0 12px;
    }

    .panel-body.expanded,
    .panel-content.expanded {
        max-height: 2000px;
        padding: 12px;
    }

    /* ── PİYASA ÖZETİ ── */
    .market-summary {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 4px !important;
        font-size: 11px !important;
    }

    .market-summary-item {
        padding: 6px !important;
        text-align: center !important;
    }

    /* ── HABER LİSTESİ ── */
    .news-item {
        padding: 8px !important;
        font-size: 12px !important;
    }

    .news-item .title {
        -webkit-line-clamp: 2 !important;
        font-size: 12px !important;
    }

    /* ── FIYAT ALARMLARI ── */
    .alarm-input-group {
        flex-direction: row !important;
        gap: 8px !important;
    }

    .alarm-input-group input {
        flex: 1 !important;
        font-size: 14px !important;
    }

    /* ── PORTFÖY ── */
    .portfolio-summary {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }

    .portfolio-value {
        font-size: 18px !important;
    }

    /* ── MODALLAR ── */
    .modal-content,
    .modal-body,
    .modal {
        width: 95% !important;
        max-width: 95vw !important;
        max-height: 85vh !important;
        margin: 5vh auto !important;
        border-radius: 16px !important;
        overflow-y: auto !important;
    }

    .modal-overlay,
    .modal-backdrop {
        z-index: 9990 !important;
    }

    .modal-content {
        z-index: 9991 !important;
    }

    /* ── BINANCE BANNER ── */
    .ad-banner,
    .binance-banner,
    ins.adsbygoogle {
        display: none !important; /* Mobilde reklamları gizle — yer kaplıyor */
    }

    /* ── FOOTER ── */
    footer,
    .footer-section {
        font-size: 11px !important;
        padding: 12px !important;
        text-align: center !important;
    }

    /* ── SOHBET / AI CHAT ── */
    .chat-container {
        max-height: 250px !important;
    }

    .chat-input-area {
        flex-direction: row !important;
        gap: 8px !important;
    }

    .chat-input-area input,
    .chat-input-area textarea {
        font-size: 14px !important;
    }

    /* ── DOM / PİYASA DERİNLİĞİ ── */
    .dom-panel {
        display: none !important; /* Mobilde DOM panelini gizle */
    }

    /* ── OTONOM FIRSAT RADARI ── */
    .opportunity-table {
        font-size: 11px !important;
    }

    .opportunity-table td {
        padding: 6px 4px !important;
    }

    /* ── GENEL İYİLEŞTİRMELER ── */
    * {
        -webkit-tap-highlight-color: transparent;
    }

    button, a, input, select {
        min-height: 44px; /* Apple HIG minimum touch target */
        font-size: 14px;
    }

    /* Scrollbar gizle */
    ::-webkit-scrollbar {
        width: 3px;
    }
}

/* ══════════════════════════════════════════════════════════ */
/* KÜÇÜK MOBİL (400px altı)                                  */
/* ══════════════════════════════════════════════════════════ */

@media (max-width: 400px) {
    #chartContainer,
    #primChart,
    .chart-container {
        height: 250px !important;
    }

    .indicator-grid {
        grid-template-columns: 1fr !important; /* Tek kolon */
    }

    .entry-plan-grid {
        grid-template-columns: 1fr !important; /* Tek kolon */
    }

    .market-summary {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .timeframe-btn,
    .tf-btn {
        font-size: 10px !important;
        padding: 5px 2px !important;
    }
}
. s w a l 2 - c o n t a i n e r   {   z - i n d e x :   9 9 9 9 9 9   ! i m p o r t a n t ;   } 
 
 
/* --- PRIM ANALİZ SADELEŞTİRİLMİŞ RAPOR TASARIMI --- */
.report-card {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-window);
    padding: 16px;
    margin-bottom: 16px;
    overflow: hidden;
}
.report-header-box {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}
.report-decision-title {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}
.report-score-box {
    text-align: right;
}
.report-score-val {
    font-size: 24px;
    font-weight: 800;
}
.report-score-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.report-summary-text {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary);
    background: rgba(255,255,255,0.03);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    border-left: 3px solid var(--accent-blue);
}
.report-section-title {
    font-size: 11px;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
}
.indicator-pill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.indicator-pill {
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.03);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.indicator-pill:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}
.indicator-label {
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.indicator-value {
    font-weight: 800;
    font-size: 14px;
}

/* MTF Badges */
.mtf-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}
.mtf-badge {
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.03);
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #cbd5e1;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.mtf-badge:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.1);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.3);
}
.mtf-badge span.tf {
    background: rgba(255,255,255,0.05);
    color: #94a3b8;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    margin-right: 2px;
}

/* Entry Plan Steps */
.entry-plan-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}
.entry-plan-step {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.entry-plan-step::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: rgba(255,255,255,0.15);
}
.entry-plan-step.target::before {
    background: var(--success);
}
.entry-plan-step.stop::before {
    background: var(--danger);
}
.entry-plan-step:not(.target):not(.stop)::before {
    background: var(--accent-blue);
}
.entry-step-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 4px;
}
.entry-step-val {
    font-weight: 700;
    font-size: 13px;
}

/* --- PRO TOOLBAR STYLES --- */
.pro-search {
    flex-wrap: nowrap !important;
    position: relative !important;
}

.pro-search i {
    flex-shrink: 0;
}
.pro-search:focus-within {
    border-color: rgba(59, 130, 246, 0.5) !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

.pro-search input, .pro-search #searchInput {
    min-height: 0 !important;
    height: 100% !important;
    line-height: normal !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.pro-tab {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    height: 100%;
    padding: 0 4px;
    cursor: pointer;
    position: relative;
    transition: 0.2s;
    display: flex;
    align-items: center;
}
.pro-tab:hover {
    color: var(--text-primary);
}
.pro-tab.active {
    color: #3b82f6;
}
.pro-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #3b82f6;
    border-radius: 2px 2px 0 0;
}

.pro-tool-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    border-radius: 6px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: 0.2s;
}
.pro-tool-btn:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
}

.pro-ct-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    border-radius: 6px;
    padding: 0 10px;
    height: 32px;
}
.pro-ct-btn:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.03);
}
.pro-ct-btn.active {
    background: rgba(16, 185, 129, 0.15);
    color: #10B981;
}

.pro-tf {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    padding: 0 8px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
}
.pro-tf:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
}
.pro-tf.active {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.pro-timer {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    background: transparent;
    display: flex;
    align-items: center;
    height: 32px;
}
.pro-timer span {
    font-variant-numeric: tabular-nums;
}

/* Scrollbar styling for horizontal scrolling in the header */
.panel-header::-webkit-scrollbar {
    height: 0px;
    background: transparent; 
}

