/* ==========================================================================
   B.İ.D.A. PREMIUM CORE STYLES (PageSpeed Optimized)
   ========================================================================== */
:root {
    --bg-base: #070606;
    --bg-surface: rgba(255, 255, 255, 0.03);
    --bg-surface-hover: rgba(255, 255, 255, 0.06);
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(255, 255, 255, 0.15);
    
    --brand-rose: #f43f5e;
    --brand-blue: #3b82f6;
    --brand-orange: #f97316;
    --brand-emerald: #10b981;
    
    --transition-smooth: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { 
    scroll-behavior: smooth;
    overflow-x: hidden; 
    width: 100%;
    max-width: 100vw;
    background-color: var(--bg-base); 
}

body {
    background: linear-gradient(180deg, #070606 0%, #090b0d 50%, #070606 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

.ambient-glow { display: none; }
.noise-overlay {
    position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.02;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.glass-panel {
    background: var(--bg-surface);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-subtle);
    border-radius: 24px;
}

h1, h2, h3, .font-display { font-family: 'Outfit', sans-serif; }
.text-gradient {
    background: linear-gradient(135deg, #fff 0%, #a1a1aa 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.ticker-wrap {
    position: fixed; top: 0; left: 0; width: 100%; height: 40px;
    background: rgba(7, 6, 6, 0.9); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-subtle);
    display: flex; align-items: center; z-index: 100;
}
.ticker-badge {
    padding: 0 20px; height: 100%; display: flex; align-items: center;
    background: linear-gradient(135deg, #ef4444, #991b1b);
    font-family: 'Outfit', sans-serif; font-weight: 900; font-size: 11px;
    letter-spacing: 2px; text-transform: uppercase; z-index: 2; flex-shrink: 0;
}
.ticker-marquee { 
    flex: 1; overflow: hidden; white-space: nowrap; position: relative;
}
.ticker-track { 
    display: inline-flex; 
    width: max-content; 
    will-change: transform;
}
.ticker-track.running {
    animation: tickerFlow 120s linear infinite; 
    -webkit-animation: tickerFlow 120s linear infinite; 
}
.ticker-item {
    font-size: 13px; color: var(--text-secondary); padding: 0 24px;
    border-right: 1px solid var(--border-subtle); display: flex; align-items: center; gap: 8px;
}
.ticker-item b { color: #fff; }

@keyframes tickerFlow { 
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); } 
}
@-webkit-keyframes tickerFlow { 
    0% { -webkit-transform: translate3d(0, 0, 0); }
    100% { -webkit-transform: translate3d(-50%, 0, 0); } 
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.hero { min-height: 45vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding-top: 60px; padding-bottom: 20px; }
.hero h1 { font-size: clamp(3rem, 8vw, 7rem); font-weight: 900; line-height: 1; letter-spacing: -0.04em; margin-bottom: 24px; animation: fadeUp 1s ease-out 0.1s backwards; }
.hero p { font-size: clamp(1rem, 2vw, 1.25rem); color: var(--text-secondary); max-width: 600px; margin: 0 auto; animation: fadeUp 1s ease-out 0.2s backwards; }

.quick-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 48px; animation: fadeUp 1s ease-out 0.3s backwards; }
.action-btn {
    background: var(--bg-surface); border: 1px solid var(--border-subtle);
    color: #fff; padding: 16px 32px; border-radius: 100px;
    font-family: 'Outfit', sans-serif; font-size: 14px; font-weight: 700;
    letter-spacing: 1px; text-transform: uppercase; cursor: pointer;
    display: inline-flex; align-items: center; gap: 10px;
    transition: var(--transition-smooth); text-decoration: none;
}
.action-btn:hover { background: #fff; color: #000; transform: translateY(-4px); }
.action-btn i { font-size: 18px; font-style: normal; }

.games-section { padding: 20px 0 60px 0; }
.section-title { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; text-align: center; margin-bottom: 40px; letter-spacing: -0.02em; color: #fff; opacity: 0; transform: translateY(20px); transition: var(--transition-smooth); }
.section-title.visible { opacity: 1; transform: translateY(0); }

.games-grid { display: grid; grid-template-columns: repeat(1, 1fr); gap: 24px; }
@media (min-width: 640px) { .games-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .games-grid { grid-template-columns: repeat(4, 1fr); } }

.game-card {
    position: relative; padding: 32px 24px; text-decoration: none; color: inherit;
    overflow: hidden; display: flex; flex-direction: column; align-items: flex-start;
    transition: var(--transition-smooth); transform: translateY(30px); opacity: 0;
}
.game-card.visible { transform: translateY(0); opacity: 1; }
.game-card:hover { border-color: var(--border-highlight); transform: translateY(-8px); background: var(--bg-surface-hover); }
.game-icon {
    width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
    font-size: 28px; margin-bottom: 24px; background: rgba(255,255,255,0.05); transition: var(--transition-smooth);
}
.game-card:hover .game-icon { transform: scale(1.1); }
.game-title { font-size: 20px; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.02em; }
.game-desc { color: var(--text-secondary); font-size: 13px; line-height: 1.5; margin-bottom: 24px; }
.game-btn { margin-top: auto; font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; opacity: 0.5; transition: var(--transition-fast); }
.game-card:hover .game-btn { opacity: 1; }

.card-rose:hover { box-shadow: 0 20px 40px -20px rgba(244,63,94,0.3); } .card-rose .game-icon { color: var(--brand-rose); }
.card-blue:hover { box-shadow: 0 20px 40px -20px rgba(59,130,246,0.3); } .card-blue .game-icon { color: var(--brand-blue); }
.card-orange:hover { box-shadow: 0 20px 40px -20px rgba(249,115,22,0.3); } .card-orange .game-icon { color: var(--brand-orange); }
.card-emerald:hover { box-shadow: 0 20px 40px -20px rgba(16,185,129,0.3); } .card-emerald .game-icon { color: var(--brand-emerald); }

.team-section { padding: 40px 0; margin-top: 20px; border-top: 1px solid var(--border-subtle); }
.footer { padding: 40px 0; border-top: 1px solid var(--border-subtle); text-align: center; }
.footer-logo { font-family: 'Outfit', sans-serif; font-size: 32px; font-weight: 900; margin-bottom: 12px; color: #fff; }
.footer-tagline { color: var(--text-secondary); font-size: 14px; margin-bottom: 48px; letter-spacing: 0.5px; }

.team-grid { display: grid; grid-template-columns: repeat(1, 1fr); gap: 24px; text-align: left; }
@media (min-width: 768px) { .team-grid { grid-template-columns: repeat(3, 1fr); } }

.team-member { background: var(--bg-surface); border: 1px solid var(--border-subtle); padding: 32px; border-radius: 20px; transition: var(--transition-smooth); display: flex; flex-direction: column; }
.team-member:hover { background: var(--bg-surface-hover); border-color: var(--border-highlight); transform: translateY(-4px); }
.team-member h4 { font-family: 'Outfit', sans-serif; font-size: 20px; color: #fff; margin-bottom: 4px; }
.team-role { font-size: 11px; color: var(--brand-blue); margin-bottom: 16px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.team-member p { font-size: 13px; color: var(--text-secondary); line-height: 1.6; flex-grow: 1; }

.social-links { display: flex; justify-content: center; gap: 16px; margin-bottom: 32px; }
.social-links a { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,0.05); color: #fff; border: 1px solid var(--border-subtle); transition: var(--transition-fast); }
.social-links a:hover { background: #fff; color: #000; transform: translateY(-4px); box-shadow: 0 10px 20px rgba(255,255,255,0.1); }
.social-links svg { width: 18px; height: 18px; fill: currentColor; }

.footer-bottom { border-top: 1px solid var(--border-subtle); padding-top: 32px; color: var(--text-secondary); font-size: 12px; line-height: 1.5; }

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(8px); z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 16px; opacity: 0; pointer-events: none; transition: var(--transition-fast); }
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal-content { background: #09090b; border: 1px solid var(--border-subtle); border-radius: 24px; padding: 32px; width: 100%; max-width: 500px; transform: scale(0.95) translateY(20px); transition: var(--transition-smooth); box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5); max-height: 90vh; overflow-y: auto; }
.modal-overlay.active .modal-content { transform: scale(1) translateY(0); }

.modal-title { font-family: 'Outfit', sans-serif; font-size: 24px; margin-bottom: 24px; display: flex; align-items: center; gap: 12px; }
.input-group { margin-bottom: 20px; }
.input-group label { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; color: var(--text-secondary); margin-bottom: 8px; letter-spacing: 1px; }
.form-control { width: 100%; background: #18181b; border: 1px solid var(--border-subtle); color: #fff; padding: 16px; border-radius: 12px; font-family: 'Inter', sans-serif; font-size: 14px; transition: var(--transition-fast); outline: none; }
.form-control:focus { border-color: var(--brand-blue); background: #000; }
select.form-control { appearance: none; cursor: pointer; }
textarea.form-control { height: 120px; resize: none; }

.modal-actions { display: flex; gap: 12px; margin-top: 32px; }
.btn { flex: 1; padding: 16px; border-radius: 12px; font-family: 'Outfit', sans-serif; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; cursor: pointer; border: none; transition: var(--transition-fast); text-align: center; }
.btn-ghost { background: transparent; color: #fff; border: 1px solid var(--border-subtle); }
.btn-ghost:hover { background: rgba(255,255,255,0.1); }
.btn-primary { background: #fff; color: #000; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(255,255,255,0.1); }

.result-image-wrapper {
    border: 1px solid var(--border-subtle); border-radius: 12px; overflow: hidden; margin-bottom: 24px;
    background: #000; display: flex; justify-content: center; align-items: center; max-height: 45vh; width: 100%;
}
#resultImage { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; display: block; }

.bsod-screen { position: fixed; inset: 0; background: #0000AA; color: #fff; z-index: 99999; display: none; flex-direction: column; justify-content: center; padding: 10vw; font-family: 'Courier New', Courier, monospace; cursor: none; }
.bsod-screen.active { display: flex; }
.bsod-badge { background: #fff; color: #0000AA; display: inline-block; padding: 4px 12px; font-weight: bold; margin-bottom: 32px; font-size: 1.5rem; }
.bsod-text { font-size: clamp(1.2rem, 3vw, 2.5rem); margin-bottom: 24px; line-height: 1.4; }

.excel-screen { 
    position: fixed; inset: 0; width: 100vw; height: 100dvh; background: #f3f2f1; z-index: 999999; 
    display: none; flex-direction: column; font-family: 'Segoe UI', sans-serif; 
}
.excel-screen.active { display: flex; }
.excel-header { background: #107c41; color: #fff; padding: 10px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-shrink: 0; }
.excel-header-title { font-size: 14px; font-weight: bold; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.excel-close-btn { background: #dc2626; color: white; border: none; padding: 10px 20px; border-radius: 6px; font-weight: bold; cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 6px; flex-shrink: 0; transition: background 0.2s ease, transform 0.1s ease; }
.excel-close-btn:hover { background: #b91c1c; }
.excel-close-btn:active { transform: scale(0.97); background: #991b1b; }

.excel-toolbar { background: #f3f2f1; padding: 8px 16px; border-bottom: 1px solid #d1d5db; font-size: 13px; display: flex; gap: 16px; color: #333; overflow-x: auto; flex-shrink: 0; -webkit-overflow-scrolling: touch; }
.excel-toolbar span { white-space: nowrap; }

.excel-main { flex: 1; padding: 16px; overflow: auto; background: #e5e7eb; display: flex; gap: 16px; }
.excel-table-wrapper { flex: 2; min-width: 0; background: #fff; border: 1px solid #d1d5db; box-shadow: 0 2px 4px rgba(0,0,0,0.05); display: flex; flex-direction: column; overflow: hidden; }
.excel-table-scroll { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; }

.excel-table { width: 100%; border-collapse: collapse; background: #fff; font-size: 12px; }
.excel-table th, .excel-table td { border: 1px solid #d1d5db; padding: 6px 10px; text-align: left; color: #333; white-space: nowrap; }
.excel-table th { background: #f3f2f1; font-weight: 600; text-align: center; position: sticky; top: 0; z-index: 10; }

.excel-table-footer { background: #f3f2f1; padding: 6px 10px; border-top: 1px solid #d1d5db; display: flex; gap: 8px; font-size: 11px; flex-shrink: 0; }
.excel-table-footer .tab-active { background: #fff; padding: 4px 10px; border: 1px solid #d1d5db; border-bottom: 2px solid #107c41; font-weight: bold; }
.excel-table-footer .tab-inactive { padding: 4px 10px; color: #666; }

.excel-charts { flex: 1; min-width: 280px; display: flex; flex-direction: column; gap: 16px; }
.chart-box { background: #fff; border: 1px solid #d1d5db; padding: 12px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); flex: 1; min-height: 180px; display: flex; flex-direction: column; }
.chart-title { font-size: 13px; font-weight: 600; color: #333; margin-bottom: 10px; border-bottom: 1px solid #eee; padding-bottom: 6px; }
.chart-canvas-wrapper { flex: 1; position: relative; min-height: 0; }

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

.toast { position: fixed; top: 60px; left: 50%; transform: translate(-50%, -20px); background: #fff; color: #000; padding: 12px 24px; border-radius: 100px; font-family: 'Outfit', sans-serif; font-size: 13px; font-weight: 700; opacity: 0; pointer-events: none; transition: var(--transition-smooth); z-index: 999999; box-shadow: 0 20px 40px rgba(0,0,0,0.2); width: max-content; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 900px) {
    .excel-main { flex-direction: column; padding: 12px; gap: 12px; }
    .excel-table-wrapper { flex: none; height: 50dvh; max-height: none; }
    .excel-charts { flex: none; min-width: 0; width: 100%; }
    .chart-box { min-height: 200px; }
}

@media (max-width: 768px) {
    .hero { padding-top: 60px; padding-bottom: 20px; min-height: auto; }
    .hero h1 { font-size: 2.2rem; margin-bottom: 12px; }
    .hero p { font-size: 14px; margin-bottom: 0; padding: 0 10px; line-height: 1.4; }
    
    .quick-actions { flex-direction: column; width: 100%; max-width: 320px; margin: 24px auto 0 auto; gap: 12px; }
    .action-btn { width: 100%; justify-content: center; padding: 14px 20px; font-size: 13px; }
    
    .team-section { padding: 40px 0; }
    .footer { padding: 40px 24px; }
    .modal-content { padding: 24px; }
    
    .ticker-badge { padding: 0 12px; font-size: 9px; letter-spacing: 1px; }
    
    .excel-header { padding: 10px 12px; }
    .excel-header-title { font-size: 12px; }
    .excel-close-btn { padding: 12px 18px; font-size: 14px; }
    .excel-toolbar { padding: 6px 12px; font-size: 12px; gap: 12px; }
    .excel-table { font-size: 11px; }
    .excel-table th, .excel-table td { padding: 4px 6px; }
}

@media (max-width: 480px) {
    .excel-header-title { font-size: 11px; max-width: 180px; }
    .excel-close-btn { padding: 14px 20px; font-size: 15px; }
    .excel-table-wrapper { height: 55dvh; }
    .chart-box { min-height: 180px; }
}