/* --- ACADEMY YKS VIP - MODERN STYLE (V4.0 - GLASSMORPHISM) --- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&family=Inter:wght@400;500;700&display=swap');

:root {
    /* Vibrant Neon Colors */
    --primary: #00e5ff; /* Cyan/Turquoise */
    --primary-dark: #00b8d4;
    --secondary: #b388ff; /* Purple accent */
    
    /* Dark Theme Base */
    --bg-dark: #0f111a; /* Deep blue-gray */
    --glass-bg: rgba(25, 28, 41, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    
    /* Typography */
    --text-main: #f8f9fa;
    --text-muted: #94a3b8;
    
    /* Semantic Colors */
    --danger: #ff4d4f;
    --success: #10b981;
    --warning: #fbbf24;
    
    /* Animation Speeds */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
    --bg-dark: #f1f5f9;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.1);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}

/* 1. RESET & BASE */
* { box-sizing: border-box; margin: 0; padding: 0; outline: none; }

html, body {
    width: 100%; min-height: 100vh;
    font-family: 'Outfit', 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    user-select: none;
    -webkit-user-select: none;
}

body::before {
    content: '';
    position: fixed;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(0, 229, 255, 0.05), transparent 40%),
                radial-gradient(circle at 80% 20%, rgba(179, 136, 255, 0.05), transparent 30%);
    z-index: -1;
    pointer-events: none;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 10px; }

/* Canvas Background */
#canvas1 { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -2; }

/* Typography */
h1, h2, h3, h4, h5, h6 { font-weight: 800; letter-spacing: -0.5px; }
a { text-decoration: none; color: inherit; transition: var(--transition-fast); }

/* --- GLOBAL ANIMATIONS --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.fade-in-up { animation-name: fadeInUp; animation-duration: 0.6s; animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1); animation-fill-mode: forwards; }
.slide-in-right { animation-name: slideInRight; animation-duration: 0.6s; animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1); animation-fill-mode: forwards; }

.page-enter { opacity: 0; transform: translateY(15px) scale(0.99); transition: opacity 0.5s ease-out, transform 0.5s ease-out; }
.page-enter-active { opacity: 1; transform: translateY(0) scale(1); }
.page-exit-active { opacity: 0 !important; transform: translateY(-10px) scale(0.99) !important; transition: opacity 0.35s ease-in, transform 0.35s ease-in !important; }

/* --- BUTTONS & INPUTS --- */
.btn, .login-btn, .view-action-btn, .btn-cyan {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #0f111a;
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition-medium);
    box-shadow: 0 4px 15px rgba(0, 229, 255, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:hover, .login-btn:hover, .view-action-btn:hover, .btn-cyan:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 229, 255, 0.5);
    background: linear-gradient(135deg, #33ebff, var(--primary));
}

.input-group { position: relative; margin-bottom: 20px; }
.input-group i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--text-muted); transition: var(--transition-fast); }
.input-group input {
    width: 100%;
    padding: 16px 16px 16px 45px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-main);
    font-size: 1rem;
    transition: var(--transition-medium);
    backdrop-filter: blur(10px);
}
.input-group input:focus {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.2);
}
.input-group input:focus + i { color: var(--primary); }

/* --- GLASS CARDS --- */
.glass-effect, .card, .file-card, .ai-card, .welcome-box {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 20px;
    transition: var(--transition-medium);
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(0, 229, 255, 0.4);
}

/* --- LOGIN SCREEN --- */
#login-wrapper {
    width: 100%; height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 20px; z-index: 10;
}

.login-box {
    width: 100%; max-width: 420px;
    padding: 40px 30px; text-align: center;
}

.logo-circle {
    width: 80px; height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px;
    font-size: 2.5rem; color: #fff;
    box-shadow: 0 10px 25px rgba(0, 229, 255, 0.4);
}

/* --- HEADER & SIDEBAR --- */
.main-header {
    position: fixed; top: 0; left: 0; width: 100%; height: 75px;
    z-index: 1000; transition: var(--transition-medium);
}
.glass-header {
    background: rgba(15, 17, 26, 0.8);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
}
.header-container {
    max-width: 1400px; margin: 0 auto; height: 100%;
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 25px;
}
.logo { font-size: 1.5rem; font-weight: 800; }
.logo .highlight { color: var(--primary); text-shadow: 0 0 10px rgba(0,229,255,0.4); }

.sidebar {
    position: fixed; top: 0; right: -320px; width: 300px; height: 100%;
    z-index: 2000; transition: 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    display: flex; flex-direction: column;
}
.glass-sidebar {
    background: rgba(15, 17, 26, 0.95);
    backdrop-filter: blur(30px);
    border-left: 1px solid var(--glass-border);
}
.sidebar.active { right: 0; box-shadow: -10px 0 50px rgba(0, 0, 0, 0.5); }

.sidebar-links { list-style: none; padding: 25px; flex: 1; }
.sidebar-links a {
    display: flex; align-items: center; gap: 15px;
    color: var(--text-main); font-size: 1.05rem;
    padding: 12px; border-radius: 12px;
    transition: var(--transition-medium);
}
.sidebar-links a:hover, .sidebar-links a.active-link {
    background: rgba(0, 229, 255, 0.1);
    color: var(--primary);
    transform: translateX(5px);
}

/* --- DASHBOARD --- */
.dashboard { padding-top: 100px; padding-bottom: 40px; max-width: 1200px; margin: 0 auto; width: 95%; }

.card-title { font-size: 1.1rem; color: var(--text-muted); text-transform: uppercase; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.card-title i { color: var(--primary); }

/* --- FILE CARDS (ARAMA/CEVAP ANAHTARLARI) --- */
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.file-card { padding: 15px; display: flex; flex-direction: column; }
.pdf-fit-container { width: 100%; height: 200px; background: #000; border-radius: 12px; overflow: hidden; position: relative; margin-bottom: 15px;}
.pdf-fit-container img { width: 100%; height: 100%; object-fit: cover; }
.badge { background: rgba(255,255,255,0.1); color: var(--text-muted); padding: 4px 8px; border-radius: 6px; font-size: 0.7rem; font-weight: 600; display: inline-block; margin-bottom: 10px; }

/* --- LIVE SEARCH --- */
.live-search-container { position: relative; width: 350px; }
.live-search-input {
    width: 100%; padding: 12px 40px 12px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 20px; color: #fff;
    backdrop-filter: blur(10px); transition: var(--transition-medium);
}
.live-search-input:focus { background: rgba(0, 0, 0, 0.5); border-color: var(--primary); }
.search-icon { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .live-search-container { width: 100%; }
    .catalog-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
    .pdf-fit-container { height: 160px; }
}

/* Modals */
.modal-overlay {
    position: fixed; inset: 0; z-index: 5000;
    background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
}
.modal-box { background: var(--bg-dark); border: 1px solid var(--glass-border); padding: 30px; border-radius: 20px; width: 90%; max-width: 400px; text-align: center; }

/* Profile & Dashboard Specifics */
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 25px; }
.p-item { background: rgba(255, 255, 255, 0.03); padding: 15px; border-radius: 12px; }
.p-item .label { display: block; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 5px; }
.p-item .value { font-size: 1.2rem; font-weight: 700; color: #fff; }

.progress-track { width: 100%; height: 8px; background: rgba(255, 255, 255, 0.1); border-radius: 4px; overflow: hidden; margin-bottom: 20px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--secondary)); border-radius: 4px; }
.progress-info { display: flex; justify-content: space-between; font-size: 0.85rem; margin-bottom: 8px; }

.announcement-item { border-left: 3px solid var(--primary); padding-left: 15px; margin-bottom: 20px; }
.ann-date { font-size: 0.8rem; color: var(--primary); font-weight: 700; margin-bottom: 5px; }
.ann-content { color: var(--text-main); line-height: 1.5; font-size: 0.95rem; }

.exam-list { list-style: none; }
.exam-list li { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; border-bottom: 1px solid var(--glass-border); }
.exam-badge { padding: 6px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; }
.status-today { background: rgba(255, 77, 79, 0.2); color: var(--danger); border: 1px solid var(--danger); }
.status-future { background: rgba(0, 229, 255, 0.1); color: var(--primary); border: 1px solid var(--primary); }

/* AI Solver Specifics */
.chat-composer { position: fixed; bottom: 20px; left: 20px; right: 20px; max-width: 1060px; margin: 0 auto; background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 24px; padding: 15px 20px; display: flex; flex-direction: column; gap: 15px; backdrop-filter: blur(12px); box-shadow: var(--glass-shadow); z-index: 100; }
.msg-bubble { padding: 16px 22px; border-radius: 20px; font-size: 1.05rem; line-height: 1.7; word-break: break-word; overflow-x: auto; max-width: 85%; }
.message-row.user .msg-bubble { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #000; border-bottom-right-radius: 4px; margin-left: auto; }
.message-row.ai .msg-bubble { background: rgba(26, 31, 46, 0.85); color: #e0e6ed; border: 1px solid rgba(0, 229, 255, 0.3); border-bottom-left-radius: 4px; }

/* --- HAMBURGER MENU --- */
.menu-icon { width: 30px; height: 22px; display: flex; flex-direction: column; justify-content: space-between; cursor: pointer; z-index: 2001; }
.menu-icon .bar { width: 100%; height: 3px; background: var(--text-main); border-radius: 3px; transition: var(--transition-medium); }
.menu-icon.active .bar:nth-child(1) { transform: translateY(9.5px) rotate(45deg); }
.menu-icon.active .bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-icon.active .bar:nth-child(3) { transform: translateY(-9.5px) rotate(-45deg); }

/* --- SIDEBAR HEADER & FOOTER --- */
.sidebar-header { display: flex; justify-content: space-between; align-items: center; padding: 25px; border-bottom: 1px solid var(--glass-border); }
.sidebar-header h3 { font-size: 1.1rem; color: var(--primary); letter-spacing: 2px; margin: 0; }
.sidebar-header #close-menu { font-size: 1.3rem; cursor: pointer; color: var(--text-muted); transition: var(--transition-fast); }
.sidebar-header #close-menu:hover { color: var(--danger); transform: rotate(90deg); }
.sidebar-footer { padding: 15px 25px; border-top: 1px solid var(--glass-border); text-align: center; color: var(--text-muted); }
.sidebar-links .separator { height: 1px; background: var(--glass-border); margin: 10px 0; list-style: none; }
.sidebar-links .logout-li a { color: var(--danger); }
.sidebar-links .admin-link { color: var(--warning) !important; }

/* --- SEARCH RESULTS DROPDOWN --- */
.search-results { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: rgba(15, 17, 26, 0.95); backdrop-filter: blur(20px); border: 1px solid var(--glass-border); border-radius: 16px; max-height: 350px; overflow-y: auto; display: none; z-index: 3000; box-shadow: 0 15px 40px rgba(0,0,0,0.5); }
.search-results.active { display: block; animation: slideDown 0.3s ease; }
.search-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; transition: var(--transition-fast); cursor: pointer; border-bottom: 1px solid rgba(255,255,255,0.04); }
.search-item:hover { background: rgba(0, 229, 255, 0.08); }
.search-item:last-child { border-bottom: none; }
.search-item img { width: 45px; height: 45px; border-radius: 8px; object-fit: cover; }

/* --- PROTECTION CURTAIN --- */
#protection-curtain { position: fixed; inset: 0; background: rgba(15, 17, 26, 0.97); z-index: 9999; display: none; align-items: center; justify-content: center; backdrop-filter: blur(20px); }
.curtain-message { text-align: center; color: var(--text-muted); font-size: 1.2rem; letter-spacing: 3px; font-weight: 600; animation: pulse 2s infinite; }

/* --- LOAD MORE LOADER --- */
#load-more-loader { text-align: center; padding: 20px; color: var(--text-muted); display: none; }

/* --- FILE CARD TYPOGRAPHY --- */
.file-card { padding: 0; overflow: hidden; }
.file-card h3 { font-size: 0.95rem; font-weight: 600; color: var(--text-main); margin: 8px 15px 4px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.file-card p { font-size: 0.8rem; color: var(--text-muted); margin: 0 15px 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-card .view-action-btn { display: block; margin: 0 15px 15px; text-align: center; font-size: 0.85rem; padding: 10px; border-radius: 10px; }
.file-card:hover { transform: translateY(-6px); border-color: rgba(0, 229, 255, 0.3); box-shadow: 0 12px 35px rgba(0, 229, 255, 0.15); }
.thumb-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(15,17,26,0.6), transparent); pointer-events: none; }

/* --- RENEW BUTTON & SHINE EFFECT --- */
.renew-btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 28px; background: linear-gradient(135deg, #0088cc, #00adb5); color: #fff; border-radius: 14px; font-weight: 700; font-size: 1rem; transition: var(--transition-medium); position: relative; overflow: hidden; }
.renew-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0, 173, 181, 0.4); }
.shine-effect { position: relative; overflow: hidden; }
.shine-effect::after { content: ''; position: absolute; top: -50%; left: -60%; width: 40%; height: 200%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent); transform: rotate(25deg); animation: shine 4s infinite; }

/* --- MODAL ANIMATIONS --- */
.animate-modal { animation: scaleIn 0.3s ease; }
.modal-btn { display: inline-block; padding: 12px 20px; border: none; border-radius: 10px; cursor: pointer; font-weight: 700; font-size: 0.9rem; transition: var(--transition-fast); margin-top: 10px; }
.btn-dark { background: rgba(255,255,255,0.08); color: var(--text-main); }
.btn-dark:hover { background: rgba(255,255,255,0.15); }

/* --- EMPTY STATE --- */
.empty-state { text-align: center; padding: 30px; color: var(--text-muted); font-size: 0.95rem; }
.empty-state i { display: block; font-size: 2rem; margin-bottom: 10px; opacity: 0.5; }

/* --- USER SELECT FIX --- */
input, textarea, select, [contenteditable] { user-select: text !important; -webkit-user-select: text !important; }

/* --- ADDITIONAL ANIMATIONS --- */
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes shine { 0% { left: -60%; } 30% { left: 120%; } 100% { left: 120%; } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes glowPulse { 0%, 100% { box-shadow: 0 0 5px rgba(0,229,255,0.2); } 50% { box-shadow: 0 0 20px rgba(0,229,255,0.4); } }
@keyframes borderGlow { 0%, 100% { border-color: rgba(0,229,255,0.2); } 50% { border-color: rgba(0,229,255,0.5); } }
@keyframes ripple { 0% { transform: scale(0); opacity: 0.6; } 100% { transform: scale(4); opacity: 0; } }
@keyframes gradientMove { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

/* --- STAGGER ANIMATION --- */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }

/* --- ENHANCED CARD HOVER --- */
.card { padding: 25px; margin-bottom: 20px; position: relative; overflow: hidden; }
.card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--primary), var(--secondary)); transform: scaleX(0); transition: transform 0.4s ease; transform-origin: left; }
.card:hover::before { transform: scaleX(1); }

/* --- PROGRESS BAR ANIMATION --- */
.progress-fill { background-size: 200% 100%; animation: gradientMove 3s ease infinite; }

/* --- FOOTER LINKS (Login) --- */
.footer-links { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.support-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 0.85rem; padding: 8px 16px; border: 1px solid var(--glass-border); border-radius: 10px; transition: var(--transition-fast); }
.support-link:hover { color: var(--primary); border-color: var(--primary); background: rgba(0,229,255,0.05); }

/* --- LOGIN HEADER --- */
.login-header { margin-bottom: 30px; }
.login-header h2 { font-size: 1.6rem; margin: 15px 0 5px; }
.login-header p { color: var(--text-muted); font-size: 0.9rem; }

/* --- BLUR MODE --- */
.blur-mode { filter: blur(10px); pointer-events: none; }

/* --- ENHANCED RESPONSIVE --- */
@media (max-width: 480px) {
    .login-box { padding: 30px 20px; }
    .profile-grid { grid-template-columns: 1fr; }
    .header-container { padding: 0 15px; }
    .logo { font-size: 1.2rem; }
}
@media (min-width: 769px) and (max-width: 1024px) {
    .catalog-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}
@media (min-width: 1440px) {
    .dashboard { max-width: 1400px; }
    .catalog-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
}

/* --- LIGHT THEME ADDITIONS --- */
[data-theme="light"] .file-card h3 { color: #1a1a2e; }
[data-theme="light"] .search-results { background: rgba(255,255,255,0.95); }
[data-theme="light"] .search-item:hover { background: rgba(0,229,255,0.05); }
[data-theme="light"] #protection-curtain { background: rgba(241,245,249,0.97); }
[data-theme="light"] .sidebar { background: rgba(255,255,255,0.95); }
[data-theme="light"] .renew-btn { color: #fff; }