/* ========================================
   AKIL ZEKA OYUNLARI PLATFORMU - ANA STİL
   ======================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&family=Orbitron:wght@400;500;600;700;800;900&display=swap');

/* CSS Değişkenleri */
:root {
    --bg-primary: #0a0a1a;
    --bg-secondary: #111128;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --bg-glass: rgba(255, 255, 255, 0.06);
    --border-glass: rgba(255, 255, 255, 0.1);
    --border-active: rgba(0, 212, 255, 0.3);

    --accent-primary: #00d4ff;
    --accent-secondary: #a855f7;
    --accent-tertiary: #f97316;
    --accent-gradient: linear-gradient(135deg, #00d4ff, #a855f7);
    --accent-gradient-2: linear-gradient(135deg, #f97316, #ef4444);

    --success: #22c55e;
    --warning: #eab308;
    --error: #ef4444;
    --info: #3b82f6;

    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-accent: #00d4ff;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(0, 212, 255, 0.15);
    --shadow-glow-purple: 0 0 20px rgba(168, 85, 247, 0.15);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    --font-sans: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Orbitron', monospace;

    --header-height: 64px;
    --sidebar-width: 280px;
}

/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-secondary);
}

/* Selection */
::selection {
    background: rgba(0, 212, 255, 0.3);
    color: #fff;
}

/* ========== ANIMASYONLAR ========== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px rgba(0, 212, 255, 0.2); }
    50% { box-shadow: 0 0 20px rgba(0, 212, 255, 0.4), 0 0 40px rgba(0, 212, 255, 0.1); }
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}
@keyframes badgeUnlock {
    0% { transform: scale(0) rotate(-180deg); opacity: 0; }
    50% { transform: scale(1.3) rotate(10deg); opacity: 1; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
@keyframes ripple {
    to { transform: scale(4); opacity: 0; }
}
@keyframes particleBurst {
    0% { transform: scale(0); opacity: 1; }
    100% { transform: scale(1); opacity: 0; }
}
@keyframes dotPulse {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}
@keyframes bgMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Animasyon yardımcıları */
.animate-fade-in { animation: fadeIn 0.5s ease forwards; }
.animate-fade-in-up { animation: fadeInUp 0.6s ease forwards; }
.animate-fade-in-down { animation: fadeInDown 0.5s ease forwards; }
.animate-scale { animation: fadeInScale 0.4s ease forwards; }
.animate-slide-left { animation: slideInLeft 0.5s ease forwards; }
.animate-slide-right { animation: slideInRight 0.5s ease forwards; }
.animate-float { animation: float 3s ease-in-out infinite; }
.animate-glow { animation: glow 2s ease-in-out infinite; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }

/* Gecikme yardımcıları */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* ========== ARKAPLAN EFEKTLERI ========== */
.bg-animated {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    background: linear-gradient(-45deg, #0a0a1a, #111128, #0f0c29, #1a0a2e);
    background-size: 400% 400%;
    animation: bgMove 15s ease infinite;
}

.bg-particles {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.bg-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent-primary);
    border-radius: 50%;
    opacity: 0.15;
    animation: float 6s ease-in-out infinite;
}

/* ========== TIPOGRAFI ========== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
h4 { font-size: clamp(1.1rem, 2vw, 1.25rem); }

.text-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-display {
    font-family: var(--font-display);
    letter-spacing: 0.05em;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover {
    color: var(--accent-secondary);
}

/* ========== KOMPONENTLER ========== */

/* --- Kartlar --- */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 24px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all var(--transition-normal);
}
.card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-active);
    box-shadow: var(--shadow-glow);
}
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-glass);
}
.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}
.card-title i {
    color: var(--accent-primary);
    font-size: 1.2rem;
}

/* --- Butonlar --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px;
    text-decoration: none;
}
.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0);
    transition: background var(--transition-fast);
}
.btn:hover::after {
    background: rgba(255, 255, 255, 0.1);
}
.btn:active {
    transform: scale(0.97);
}
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}
.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(168, 85, 247, 0.15);
    color: var(--accent-secondary);
    border: 1px solid rgba(168, 85, 247, 0.3);
}
.btn-secondary:hover {
    background: rgba(168, 85, 247, 0.25);
    border-color: var(--accent-secondary);
}

.btn-success {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
    border: 1px solid rgba(34, 197, 94, 0.3);
}
.btn-success:hover {
    background: rgba(34, 197, 94, 0.25);
    border-color: var(--success);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: var(--error);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
}
.btn-outline:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
    min-height: 36px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.05rem;
}

.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: var(--radius-md);
}

.btn-block {
    width: 100%;
}

/* Ripple efekti */
.btn .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

/* --- Form Elemanları --- */
.form-group {
    margin-bottom: 20px;
}
.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}
.form-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: all var(--transition-normal);
    outline: none;
    min-height: 44px;
}
.form-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
    background: rgba(255, 255, 255, 0.08);
}
.form-input::placeholder {
    color: var(--text-muted);
}
.form-input.error {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: all var(--transition-normal);
    outline: none;
    min-height: 44px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}
.form-select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}
.form-select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.form-error {
    font-size: 0.8rem;
    color: var(--error);
    margin-top: 4px;
    display: none;
}
.form-error.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* --- Tabs --- */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--border-glass);
    margin-bottom: 24px;
    gap: 4px;
}
.tab-btn {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
}
.tab-btn::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-primary);
    transform: scaleX(0);
    transition: transform var(--transition-normal);
}
.tab-btn.active {
    color: var(--accent-primary);
}
.tab-btn.active::after {
    transform: scaleX(1);
}
.tab-btn:hover {
    color: var(--text-primary);
}
.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}
.tab-content.active {
    display: block;
}

/* --- Modal --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    opacity: 0;
    transition: opacity var(--transition-normal);
}
.modal-overlay.show {
    display: flex;
    opacity: 1;
}
.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    padding: 32px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: fadeInScale 0.3s ease;
    box-shadow: var(--shadow-lg);
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
}
.modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 1.2rem;
}
.modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
}
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-glass);
}

/* --- Toast Notification --- */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    width: calc(100% - 40px);
}
.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.3s ease;
    color: var(--text-primary);
    font-size: 0.9rem;
}
.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--error); }
.toast.warning { border-left: 4px solid var(--warning); }
.toast.info { border-left: 4px solid var(--info); }
.toast i { font-size: 1.2rem; }
.toast.success i { color: var(--success); }
.toast.error i { color: var(--error); }
.toast.warning i { color: var(--warning); }
.toast.info i { color: var(--info); }
.toast-close {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    font-size: 1rem;
}

/* --- Loading --- */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease;
}
.loading-overlay.hide {
    opacity: 0;
    pointer-events: none;
}
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-glass);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
.loading-text {
    margin-top: 16px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}
.loading-dots {
    display: inline-flex;
    gap: 4px;
}
.loading-dots span {
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    animation: dotPulse 1.4s ease-in-out infinite;
}
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

/* --- Badge --- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}
.badge-primary {
    background: rgba(0, 212, 255, 0.15);
    color: var(--accent-primary);
}
.badge-success {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}
.badge-warning {
    background: rgba(234, 179, 8, 0.15);
    color: var(--warning);
}
.badge-error {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error);
}
.badge-purple {
    background: rgba(168, 85, 247, 0.15);
    color: var(--accent-secondary);
}

/* --- Status --- */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}
.status-dot.online {
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
}
.status-dot.offline {
    background: var(--text-muted);
}
.status-dot.in-game {
    background: var(--warning);
    box-shadow: 0 0 8px var(--warning);
    animation: pulse 1.5s ease-in-out infinite;
}

/* --- Tablo --- */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
}
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border-glass);
    white-space: nowrap;
}
.table td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    vertical-align: middle;
}
.table tr:last-child td {
    border-bottom: none;
}
.table tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

/* --- Avatar --- */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    flex-shrink: 0;
}
.avatar-sm { width: 32px; height: 32px; font-size: 0.8rem; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.3rem; }
.avatar-xl { width: 80px; height: 80px; font-size: 2rem; }

/* Avatar renkleri */
.avatar-1 { background: linear-gradient(135deg, #00d4ff, #0099cc); }
.avatar-2 { background: linear-gradient(135deg, #a855f7, #7c3aed); }
.avatar-3 { background: linear-gradient(135deg, #f97316, #ea580c); }
.avatar-4 { background: linear-gradient(135deg, #22c55e, #16a34a); }
.avatar-5 { background: linear-gradient(135deg, #ef4444, #dc2626); }
.avatar-6 { background: linear-gradient(135deg, #eab308, #ca8a04); }
.avatar-7 { background: linear-gradient(135deg, #ec4899, #db2777); }
.avatar-8 { background: linear-gradient(135deg, #06b6d4, #0891b2); }

/* --- Rozet Kartı --- */
.badge-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    text-align: center;
    transition: all var(--transition-normal);
    cursor: default;
}
.badge-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-active);
    box-shadow: var(--shadow-glow);
}
.badge-card.locked {
    opacity: 0.4;
    filter: grayscale(1);
}
.badge-card.locked:hover {
    transform: none;
    border-color: var(--border-glass);
    box-shadow: none;
}
.badge-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 10px;
    border-radius: var(--radius-full);
    background: var(--bg-glass);
}
.badge-card.earned .badge-icon {
    animation: badgeUnlock 0.6s ease;
}
.badge-name {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 4px;
}
.badge-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* --- Liderlik Tablosu --- */
.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
    cursor: pointer;
}
.leaderboard-item:hover {
    background: rgba(255, 255, 255, 0.05);
}
.leaderboard-rank {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}
.leaderboard-rank.rank-1 {
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: #000;
}
.leaderboard-rank.rank-2 {
    background: linear-gradient(135deg, #c0c0c0, #a0a0a0);
    color: #000;
}
.leaderboard-rank.rank-3 {
    background: linear-gradient(135deg, #cd7f32, #b87333);
    color: #fff;
}
.leaderboard-rank.rank-other {
    background: var(--bg-glass);
    color: var(--text-secondary);
}
.leaderboard-info {
    flex: 1;
    min-width: 0;
}
.leaderboard-name {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.leaderboard-class {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.leaderboard-score {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent-primary);
    flex-shrink: 0;
}

/* ========== GİRİŞ SAYFASI (index.html) ========== */
.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-hero {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInDown 0.8s ease;
}
.login-logo {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    letter-spacing: 0.1em;
    text-shadow: none;
}
.login-subtitle {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    color: var(--text-secondary);
    font-weight: 400;
}

.login-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    width: 100%;
    max-width: 900px;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    padding: 32px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: all var(--transition-normal);
}
.login-card:hover {
    border-color: var(--border-active);
    box-shadow: var(--shadow-glow);
}

.login-card-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 20px;
}
.login-card-icon.student {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(0, 212, 255, 0.05));
    color: var(--accent-primary);
}
.login-card-icon.teacher {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(168, 85, 247, 0.05));
    color: var(--accent-secondary);
}

.login-card h2 {
    margin-bottom: 6px;
}
.login-card .login-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

/* ========== ÖĞRENCİ PANELİ (ogrenci.html) ========== */
.student-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.top-bar {
    height: var(--header-height);
    background: rgba(17, 17, 40, 0.95);
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
.top-bar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}
.top-bar-logo {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.top-bar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.top-bar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.student-main {
    flex: 1;
    padding: 24px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Lobby Status */
.lobby-status {
    text-align: center;
    padding: 32px 24px;
    margin-bottom: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    animation: fadeIn 0.5s ease;
}
.lobby-status.connected {
    border-color: rgba(34, 197, 94, 0.3);
    box-shadow: 0 0 30px rgba(34, 197, 94, 0.1);
}
.lobby-status-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
    animation: glow 2s ease-in-out infinite;
}
.lobby-status h2 {
    font-size: 1.4rem;
    margin-bottom: 8px;
}
.lobby-status p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Oyun bildirimi / çağrı */
.game-notification {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.game-notification.show {
    display: flex;
}
.game-notification-card {
    background: var(--bg-secondary);
    border: 2px solid var(--accent-primary);
    border-radius: var(--radius-xl);
    padding: 40px;
    text-align: center;
    max-width: 400px;
    width: 100%;
    animation: fadeInScale 0.5s ease;
    box-shadow: 0 0 60px rgba(0, 212, 255, 0.3);
}
.game-notification-icon {
    font-size: 3.5rem;
    margin-bottom: 16px;
    animation: float 2s ease-in-out infinite;
}
.game-notification h2 {
    margin-bottom: 8px;
}
.game-notification p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* Leaderboard Tabs */
.leaderboard-section {
    margin-bottom: 24px;
}
.leaderboard-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}
.leaderboard-tab {
    padding: 8px 16px;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-full);
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-normal);
    min-height: 36px;
    -webkit-tap-highlight-color: transparent;
}
.leaderboard-tab.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #000;
    font-weight: 600;
}
.leaderboard-tab:hover:not(.active) {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* ========== ÖĞRETMEN PANELİ (ogretmen.html) ========== */
.teacher-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(17, 17, 40, 0.98);
    border-right: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 200;
    transition: transform var(--transition-normal);
}
.sidebar-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-glass);
}
.sidebar-logo {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.sidebar-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}
.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-bottom: 4px;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: var(--font-sans);
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
}
.sidebar-nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}
.sidebar-nav-item.active {
    background: rgba(0, 212, 255, 0.1);
    color: var(--accent-primary);
}
.sidebar-nav-item i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}
.sidebar-nav-item .nav-badge {
    margin-left: auto;
    background: var(--error);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    min-width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-glass);
}

/* Mobile Sidebar Toggle */
.sidebar-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 300;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    background: var(--accent-gradient);
    border: none;
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.4);
    -webkit-tap-highlight-color: transparent;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 150;
}

/* Teacher Main Content */
.teacher-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 24px;
    min-height: 100vh;
}
.teacher-section {
    display: none;
    animation: fadeIn 0.4s ease;
}
.teacher-section.active {
    display: block;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}
.section-title i {
    color: var(--accent-primary);
}

/* Dashboard */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all var(--transition-normal);
}
.stat-card:hover {
    border-color: var(--border-active);
    box-shadow: var(--shadow-glow);
}
.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}
.stat-icon.blue { background: rgba(0, 212, 255, 0.15); color: var(--accent-primary); }
.stat-icon.purple { background: rgba(168, 85, 247, 0.15); color: var(--accent-secondary); }
.stat-icon.green { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.stat-icon.orange { background: rgba(249, 115, 22, 0.15); color: var(--accent-tertiary); }
.stat-icon.red { background: rgba(239, 68, 68, 0.15); color: var(--error); }

.stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1;
}
.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Lobby Management */
.lobby-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}
.lobby-player-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    user-select: none;
}
.lobby-player-card:hover {
    border-color: var(--accent-primary);
    background: rgba(0, 212, 255, 0.05);
}
.lobby-player-card.selected {
    border-color: var(--accent-primary);
    background: rgba(0, 212, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.1);
}
.lobby-player-card input[type="checkbox"] {
    display: none;
}

/* Match Creation */
.match-wizard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}
.wizard-step {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 24px;
}
.wizard-step-number {
    width: 32px;
    height: 32px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: #000;
    margin-bottom: 12px;
}
.wizard-step h3 {
    font-size: 1rem;
    margin-bottom: 12px;
}

/* Oyun seçimi */
.game-select-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}
.game-option {
    padding: 16px 12px;
    background: var(--bg-card);
    border: 2px solid var(--border-glass);
    border-radius: var(--radius-md);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    -webkit-tap-highlight-color: transparent;
}
.game-option:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}
.game-option.selected {
    border-color: var(--accent-primary);
    background: rgba(0, 212, 255, 0.1);
    box-shadow: var(--shadow-glow);
}
.game-option-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}
.game-option-name {
    font-size: 0.85rem;
    font-weight: 600;
}

/* Eşleştirme tipi */
.match-type-grid {
    display: grid;
    gap: 10px;
}
.match-type-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 2px solid var(--border-glass);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    -webkit-tap-highlight-color: transparent;
}
.match-type-option:hover {
    border-color: var(--accent-secondary);
}
.match-type-option.selected {
    border-color: var(--accent-secondary);
    background: rgba(168, 85, 247, 0.1);
}
.match-type-option i {
    font-size: 1.3rem;
    width: 24px;
    text-align: center;
    color: var(--accent-secondary);
}
.match-type-option .match-type-info {
    flex: 1;
}
.match-type-option .match-type-name {
    font-weight: 600;
    font-size: 0.95rem;
}
.match-type-option .match-type-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Active Games */
.active-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.active-game-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: all var(--transition-normal);
}
.active-game-card:hover {
    border-color: var(--border-active);
    box-shadow: var(--shadow-glow);
}
.game-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.game-card-type {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-primary);
}
.game-card-players {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
}
.game-card-vs {
    font-weight: 700;
    color: var(--accent-tertiary);
    font-size: 0.85rem;
}
.game-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border-glass);
}

/* ========== OYUN ODASI (oyun.html) ========== */
.game-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.game-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: rgba(17, 17, 40, 0.95);
    border-bottom: 1px solid var(--border-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
.game-info {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.9rem;
}
.game-type-badge {
    padding: 6px 14px;
    background: var(--accent-gradient);
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.8rem;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.game-arena {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    gap: 20px;
}

/* Player Panels */
.player-panels {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    width: 100%;
    max-width: 600px;
}
.player-panel {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: var(--bg-card);
    border: 2px solid var(--border-glass);
    border-radius: var(--radius-lg);
    flex: 1;
    min-width: 0;
    transition: all var(--transition-normal);
}
.player-panel.active-turn {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
}
.player-panel .player-name {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.player-panel .player-score {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--accent-primary);
    margin-left: auto;
    flex-shrink: 0;
}

.vs-divider {
    font-weight: 900;
    font-size: 1.2rem;
    color: var(--accent-tertiary);
    flex-shrink: 0;
}

/* Game Board Container */
.game-board-container {
    position: relative;
    width: 100%;
    max-width: 480px;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.game-board {
    width: 100%;
    height: 100%;
    background: var(--bg-card);
    border: 2px solid var(--border-glass);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
}

/* Game Timer */
.game-timer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    padding: 8px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-full);
}
.game-timer.warning {
    color: var(--warning);
    border-color: var(--warning);
}
.game-timer.danger {
    color: var(--error);
    border-color: var(--error);
    animation: pulse 1s ease-in-out infinite;
}

/* Game Result Overlay */
.game-result {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.game-result.show {
    display: flex;
}
.game-result-card {
    text-align: center;
    animation: fadeInScale 0.6s ease;
    max-width: 400px;
    width: 100%;
}
.game-result-icon {
    font-size: 5rem;
    margin-bottom: 16px;
}
.game-result h1 {
    font-size: 2rem;
    margin-bottom: 8px;
    font-weight: 900;
}
.game-result.win h1 { color: var(--success); }
.game-result.lose h1 { color: var(--error); }
.game-result.draw h1 { color: var(--warning); }
.game-result p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* Badge Unlock Popup */
.badge-unlock-popup {
    display: none;
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 998;
    background: var(--bg-secondary);
    border: 2px solid var(--warning);
    border-radius: var(--radius-lg);
    padding: 20px 28px;
    box-shadow: 0 0 40px rgba(234, 179, 8, 0.3);
    animation: fadeInUp 0.5s ease;
    text-align: center;
    max-width: 320px;
    width: calc(100% - 40px);
}
.badge-unlock-popup.show {
    display: block;
}
.badge-unlock-popup h3 {
    color: var(--warning);
    font-size: 1rem;
    margin-bottom: 8px;
}
.badge-unlock-popup .earned-badge-icon {
    font-size: 2.5rem;
    animation: badgeUnlock 0.8s ease;
}

/* ========== TURNUVA YÖNETİMİ ========== */
.tournament-bracket {
    overflow-x: auto;
    padding: 20px 0;
}
.bracket-round {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 240px;
    padding: 0 16px;
}
.bracket-match {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.bracket-match:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.bracket-player {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    font-size: 0.9rem;
    transition: background var(--transition-fast);
}
.bracket-player:first-child {
    border-bottom: 1px solid var(--border-glass);
}
.bracket-player.winner {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
    font-weight: 600;
}
.bracket-player.loser {
    color: var(--text-muted);
    opacity: 0.5;
    text-decoration: line-through;
}
.bracket-player-score {
    font-weight: 700;
    font-size: 0.85rem;
}

/* Eleme Turnuvası - Elenen oyuncu satırı */
tr.eliminated-row {
    opacity: 0.4;
}
tr.eliminated-row td {
    text-decoration: line-through;
    color: var(--text-muted) !important;
}
tr.eliminated-row strong {
    color: var(--text-muted) !important;
}

/* ========== EMPTY STATE ========== */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}
.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}
.empty-state-text {
    font-size: 1rem;
    margin-bottom: 8px;
}
.empty-state-sub {
    font-size: 0.85rem;
    opacity: 0.7;
}

/* ========== YARDIMCI SINIFLAR ========== */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.gap-24 { gap: 24px; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.p-16 { padding: 16px; }
.p-24 { padding: 24px; }
.hidden { display: none !important; }
.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========== RESPONSIVE TASARIM ========== */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 280px;
    }

    /* Login sayfası */
    .login-container {
        grid-template-columns: 1fr;
        max-width: 450px;
    }
    .login-card {
        padding: 24px;
    }

    /* Sidebar mobil */
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .sidebar-overlay.show {
        display: block;
    }
    .teacher-main {
        margin-left: 0;
        padding: 16px;
    }

    /* Öğrenci paneli */
    .student-main {
        padding: 16px;
    }
    .top-bar {
        padding: 0 16px;
    }

    /* İstatistik kartları */
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .stat-card {
        padding: 14px;
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    .stat-value {
        font-size: 1.3rem;
    }

    /* Lobby grid */
    .lobby-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    /* Oyun seçimi */
    .game-select-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    .game-option {
        padding: 12px 8px;
    }
    .game-option-icon {
        font-size: 1.5rem;
    }
    .game-option-name {
        font-size: 0.8rem;
    }

    /* Match wizard */
    .match-wizard {
        grid-template-columns: 1fr;
    }

    /* Player panels */
    .player-panels {
        flex-direction: column;
        gap: 8px;
    }
    .vs-divider {
        font-size: 1rem;
    }

    /* Oyun tahtası */
    .game-board-container {
        max-width: calc(100vw - 40px);
    }

    /* Section header */
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Tablo */
    .table th, .table td {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    /* Modal */
    .modal {
        padding: 24px;
        margin: 10px;
        border-radius: var(--radius-lg);
    }

    /* Aktif oyunlar */
    .active-games-grid {
        grid-template-columns: 1fr;
    }

    /* Rozet grid */
    .badge-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .login-hero {
        margin-bottom: 24px;
    }
    .login-card {
        padding: 20px;
    }
    .login-card-icon {
        width: 48px;
        height: 48px;
        font-size: 1.4rem;
    }

    .dashboard-stats {
        grid-template-columns: 1fr 1fr;
    }

    .lobby-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .lobby-player-card {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .leaderboard-item {
        padding: 10px 12px;
        gap: 10px;
    }
    .leaderboard-name {
        font-size: 0.85rem;
    }

    .game-notification-card {
        padding: 28px 20px;
    }
    .game-notification-icon {
        font-size: 2.5rem;
    }

    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        width: auto;
    }
}

@media (max-width: 360px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    .lobby-grid {
        grid-template-columns: 1fr;
    }
}

/* Büyük ekranlar */
@media (min-width: 1400px) {
    .teacher-main {
        max-width: 1200px;
        margin-left: calc(var(--sidebar-width) + (100vw - var(--sidebar-width) - 1200px) / 2);
    }
    .student-main {
        max-width: 1200px;
    }
}

/* Yazdırma */
@media print {
    body {
        background: #fff;
        color: #000;
    }
    .sidebar, .top-bar, .btn, .sidebar-toggle, .toast-container {
        display: none !important;
    }
    .teacher-main {
        margin-left: 0;
    }
    .card {
        border: 1px solid #ddd;
        background: #fff;
    }
}

/* Büyük dokunmatik hedefler (erişilebilirlik) */
@media (pointer: coarse) {
    .btn { min-height: 48px; }
    .form-input, .form-select { min-height: 48px; }
    .tab-btn { min-height: 48px; }
    .sidebar-nav-item { min-height: 48px; }
    .leaderboard-item { min-height: 48px; }
    .lobby-player-card { min-height: 48px; }
}

/* Reduced motion tercihi */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* İsviçre Usulü Tablo */
.swiss-standings {
    margin-top: 16px;
}
.swiss-round-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-glass);
    margin-bottom: 12px;
}
.swiss-round-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent-secondary);
}

/* Checkbox özel tasarım */
.custom-checkbox {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}
.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    width: 0;
    height: 0;
}
.custom-checkbox .checkmark {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border-glass);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}
.custom-checkbox input:checked ~ .checkmark {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}
.custom-checkbox input:checked ~ .checkmark::after {
    content: '✓';
    color: #000;
    font-weight: 700;
    font-size: 0.8rem;
}
