/* Local Fonts */
@font-face {font-display: swap; font-family: 'Inter'; font-style: normal; font-weight: 400; src: url('/fonts/inter-v20-latin-regular.woff2') format('woff2');}
@font-face {font-display: swap; font-family: 'Inter'; font-style: normal; font-weight: 600; src: url('/fonts/inter-v20-latin-600.woff2') format('woff2');}
@font-face {font-display: swap; font-family: 'Inter'; font-style: normal; font-weight: 700; src: url('/fonts/inter-v20-latin-700.woff2') format('woff2');}
@font-face {font-display: swap; font-family: 'Orbitron'; font-style: normal; font-weight: 400; src: url('/fonts/orbitron-v35-latin-regular.woff2') format('woff2');}
@font-face {font-display: swap; font-family: 'Orbitron'; font-style: normal; font-weight: 600; src: url('/fonts/orbitron-v35-latin-600.woff2') format('woff2');}
@font-face {font-display: swap; font-family: 'Orbitron'; font-style: normal; font-weight: 700; src: url('/fonts/orbitron-v35-latin-700.woff2') format('woff2');}

:root { 
    --menu-width: 200px; 
    --accent-color: #00C9FF; 
    --primary-action: #3b82f6; 
    --secondary-action: #334155; 
    --success-color: #10b981; 
    --warning-color: #facc15; 
    --danger-color: #ef4444; 
    --bg-main: #0f172a; 
    --bg-card: #1e293b; 
    --border-color: #334155; 
    --text-color: #f8fafc; 
    --text-muted: #94a3b8; 
    --t1-color: #a855f7;
    --t2-color: #f97316;
}

html, body { height: 100%; width: 100%; overflow-x: hidden; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; background-color: var(--bg-main); background-image: radial-gradient(circle at top center, rgba(0, 201, 255, 0.05) 0%, transparent 70%); color: var(--text-color); display: flex; flex-direction: row; -webkit-tap-highlight-color: transparent;}
body.menu-open { overflow: hidden; }
.hidden { display: none !important; }
.w-100 { width: 100%; }
.mt-3 { margin-top: 1.5rem; }

/* Sidebar Menu */
.left-menu { width: var(--menu-width); min-width: var(--menu-width); height: 100vh; position: fixed; top: 0; left: 0; background: rgba(10, 10, 10, 0.95); box-shadow: 2px 0 15px rgba(0, 0, 0, 0.5); padding: 0 20px; z-index: 1001; font-family: 'Orbitron', sans-serif; display: flex; flex-direction: column; justify-content: center; }
.left-menu ul { list-style: none; padding: 0; margin: 0; } .left-menu li { margin-bottom: 20px; }
.left-menu a { font-size: 24px; font-weight: 600; color: var(--accent-color); text-decoration: none; display: block; padding: 8px 0; transition: all 0.3s ease; text-shadow: 0 0 2px var(--accent-color);}
.left-menu a:hover, .left-menu a:focus { color: #fff; text-shadow: 0 0 8px #fff; transform: translateX(5px); }
.left-menu a.active-page-link { color: #fff; background-color: rgba(0, 190, 255, 0.15); border-radius: 8px; padding-left: 15px; padding-right: 15px; }
.mobile-header, .menu-overlay { display: none; }

/* Main Layout */
.main-content-wrapper { flex-grow: 1; padding: 40px 20px; padding-left: calc(var(--menu-width) + 40px); display: flex; flex-direction: column; align-items: center; min-height: 100vh; box-sizing: border-box; }
.breadcrumbs { width: 100%; max-width: 800px; margin-bottom: 1.5rem; } 
.breadcrumbs ol { display: flex; list-style: none; padding: 0; margin: 0; font-size: 0.9rem; color: var(--text-muted); font-weight: 600;} 
.breadcrumbs li:not(:last-child)::after { content: '>'; margin: 0 0.75rem; } 
.breadcrumbs a { color: var(--text-muted); text-decoration: none; transition: 0.2s;} 
.breadcrumbs a:hover { color: var(--accent-color); }

.app-title { font-family: 'Orbitron', sans-serif; font-size: 3rem; color: #fff; text-align: center; margin-top: 0; margin-bottom: 1.5rem; text-shadow: 0 0 15px var(--accent-color), 0 5px 0 #0284c7; letter-spacing: 2px;}

.app-container { background-color: var(--bg-card); border-radius: 1.5rem; padding: 2.5rem; box-shadow: 0 15px 35px rgba(0,0,0,0.5); border: 1px solid var(--border-color); width: 100%; max-width: 800px; box-sizing: border-box; }

/* Settings / Segmented Controls */
.settings-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; border-bottom: 2px solid var(--bg-main); padding-bottom: 1.5rem; margin-bottom: 1.5rem; }
.setting-group { display: flex; flex-direction: column; gap: 0.8rem; }
.setting-group label { font-family: 'Orbitron', sans-serif; color: var(--text-muted); text-transform: uppercase; font-size: 0.9rem; font-weight: 700; letter-spacing: 1px; text-align: center;}

.segmented-control { display: flex; background: var(--bg-main); border-radius: 12px; overflow: hidden; border: 1px solid var(--border-color); padding: 4px;}
.segmented-control button { flex: 1; background: transparent; border: none; color: var(--text-muted); padding: 0.8rem; cursor: pointer; transition: 0.3s; font-family: 'Inter', sans-serif; font-weight: 700; font-size: 0.95rem; border-radius: 8px;}
.segmented-control button:hover { color: #fff; }
.segmented-control button.active { background-color: var(--primary-action); color: white; box-shadow: 0 4px 10px rgba(37, 99, 235, 0.4);}

/* The Big Word Card */
.word-card { background: linear-gradient(135deg, #1e40af, #3b82f6); border-radius: 1rem; padding: 3rem 2rem; text-align: center; display: flex; flex-direction: column; justify-content: center; align-items: center; box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3), inset 0 0 20px rgba(255,255,255,0.2); border: 2px solid #60a5fa; margin-bottom: 2rem; position: relative;}
.word-text { font-family: 'Inter', sans-serif; font-size: 3.5rem; font-weight: 900; color: #fff; text-transform: uppercase; text-shadow: 0 4px 10px rgba(0,0,0,0.4); line-height: 1.1; margin-bottom: 10px;}
.word-category { font-family: 'Orbitron', sans-serif; font-size: 1rem; color: #93c5fd; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 2rem; }

/* Spinning Animation */
.word-spinning { animation: blurSpin 0.1s infinite; opacity: 0.8; }
@keyframes blurSpin { 0% { filter: blur(0px); transform: translateY(-2px); } 50% { filter: blur(4px); transform: translateY(2px); } 100% { filter: blur(0px); transform: translateY(-2px); } }

/* Buttons */
.action-btn { font-family: 'Orbitron', sans-serif; font-weight: 700; padding: 1rem 2rem; font-size: 1.1rem; border-radius: 12px; border: none; cursor: pointer; transition: all 0.2s; display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-transform: uppercase; letter-spacing: 1px;}
.btn-primary { background: var(--accent-color); color: #000; box-shadow: 0 5px 0 #0284c7;}
.btn-primary:hover:not(:disabled) { transform: translateY(2px); box-shadow: 0 3px 0 #0284c7; filter: brightness(1.1);}
.btn-primary:active:not(:disabled) { transform: translateY(5px); box-shadow: 0 0 0 #0284c7;}

.btn-success { background: var(--success-color); color: #000; box-shadow: 0 5px 0 #059669;}
.btn-success:hover:not(:disabled) { transform: translateY(2px); box-shadow: 0 3px 0 #059669; }
.btn-success:active:not(:disabled) { transform: translateY(5px); box-shadow: 0 0 0 #059669;}

.btn-danger { background: var(--danger-color); color: #fff; box-shadow: 0 5px 0 #dc2626;}
.btn-danger:hover:not(:disabled) { transform: translateY(2px); box-shadow: 0 3px 0 #dc2626; }
.btn-danger:active:not(:disabled) { transform: translateY(5px); box-shadow: 0 0 0 #dc2626;}

.btn-secondary { background: var(--secondary-action); color: #fff; box-shadow: 0 5px 0 #1e293b;}
.btn-secondary:hover:not(:disabled) { transform: translateY(2px); box-shadow: 0 3px 0 #1e293b; background: #475569;}
.btn-secondary:active:not(:disabled) { transform: translateY(5px); box-shadow: 0 0 0 #1e293b;}

.btn-t1 { background: var(--t1-color); color: #fff; box-shadow: 0 5px 0 #7e22ce;}
.btn-t1:hover:not(:disabled) { transform: translateY(2px); box-shadow: 0 3px 0 #7e22ce;}
.btn-t1:active:not(:disabled) { transform: translateY(5px); box-shadow: 0 0 0 #7e22ce;}

.btn-t2 { background: var(--t2-color); color: #fff; box-shadow: 0 5px 0 #c2410c;}
.btn-t2:hover:not(:disabled) { transform: translateY(2px); box-shadow: 0 3px 0 #c2410c;}
.btn-t2:active:not(:disabled) { transform: translateY(5px); box-shadow: 0 0 0 #c2410c;}

.action-btn:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; transform: translateY(5px);}

/* Timer Area */
.timer-area { background: rgba(0,0,0,0.2); padding: 1.5rem; border-radius: 12px; margin-bottom: 2rem; border: 1px solid var(--border-color); display: flex; flex-direction: column; align-items: center; gap: 15px;}
.timer-controls { display: flex; align-items: center; gap: 20px;}
.timer-display { font-family: 'Orbitron', sans-serif; font-size: 4rem; font-weight: 700; color: #fff; min-width: 100px; text-align: center; text-shadow: 0 0 15px rgba(255,255,255,0.3);}
.timer-adj-btn { background: transparent; border: none; color: var(--text-muted); font-size: 2rem; cursor: pointer; transition: 0.2s;}
.timer-adj-btn:hover { color: var(--accent-color); transform: scale(1.2);}

.progress-bar-container { width: 100%; height: 12px; background-color: var(--bg-main); border-radius: 6px; overflow: hidden; border: 1px solid var(--border-color); box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);}
.progress-bar { width: 100%; height: 100%; background-color: var(--success-color); transition: width 1s linear, background-color 0.5s ease; box-shadow: 0 0 10px var(--success-color);}

.timer-actions { display: flex; gap: 15px; width: 100%; justify-content: center; margin-top: 5px;}

/* Score Area */
.score-area { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-bottom: 1rem;}
.team-score { background: var(--bg-main); border: 2px solid var(--border-color); padding: 1.5rem; border-radius: 12px; text-align: center; display: flex; flex-direction: column; align-items: center; box-shadow: inset 0 0 15px rgba(0,0,0,0.5);}
.team-1 { border-color: var(--t1-color); } .team-2 { border-color: var(--t2-color); }
.team-score h3 { font-family: 'Orbitron', sans-serif; color: var(--text-muted); margin: 0 0 10px 0; font-size: 1.2rem; text-transform: uppercase;}
.score-val { font-family: 'Orbitron', sans-serif; font-size: 4rem; font-weight: 700; color: #fff; margin-bottom: 15px; line-height: 1;}
.team-1 .score-val { text-shadow: 0 0 15px var(--t1-color); } .team-2 .score-val { text-shadow: 0 0 15px var(--t2-color); }

/* Content Section */
.content-section { margin-top: 2rem; padding: 2.5rem; background-color: var(--bg-card); border-radius: 1.5rem; max-width: 800px; line-height: 1.8; color: var(--text-muted); border: 1px solid var(--border-color); box-shadow: 0 10px 25px rgba(0,0,0,0.3);}
.content-section h2 { font-family: 'Orbitron', sans-serif; color: var(--accent-color); font-size: 1.8rem; margin-top: 0;}
.content-section ul { padding-left: 20px; }
.content-section li { margin-bottom: 10px; }
.content-section strong { color: #fff; }

/* Mobile Adjustments */
@media (max-width: 900px) {
    :root { --menu-width: 250px; }
    body { flex-direction: column; padding: 0; } body.menu-open { overflow: hidden; }
    .mobile-header { display: flex; align-items: center; justify-content: space-between; padding: 0 20px; height: 60px; background: rgba(15, 23, 42, 0.95); border-bottom: 1px solid #334155; position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; box-sizing: border-box;}
    .hamburger-btn { background: none; border: none; padding: 10px; cursor: pointer; color: #fff; font-size: 1.5rem; margin-left:-10px;}
    .mobile-title { font-family: 'Orbitron', sans-serif; font-size: 1.3rem; color: var(--accent-color); font-weight: 700;}
    .left-menu { transform: translateX(-100%); transition: 0.3s; width: var(--menu-width); min-width: var(--menu-width); } .left-menu.menu-open { transform: translateX(0); }
    .menu-overlay { display: block; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 1000; opacity: 0; pointer-events: none; transition: 0.3s; } .menu-overlay.menu-open { opacity: 1; pointer-events: auto; }
    
    .main-content-wrapper { padding: 80px 15px 20px; margin-left: 0; }
    .app-title { font-size: 2.2rem; }
    .app-container { padding: 1.2rem; }
    
    .settings-panel { grid-template-columns: 1fr; gap: 1rem; }
    .word-card { padding: 2rem 1rem; }
    .word-text { font-size: 2rem; }
    .word-category { font-size: 0.8rem; }
    
    .timer-area { padding: 1rem; }
    .timer-display { font-size: 3rem; }
    .timer-actions { gap: 8px; flex-wrap: wrap;}
    .action-btn { font-size: 0.9rem; padding: 0.8rem 1.2rem; flex: 1; justify-content: center;}
    
    .score-area { grid-template-columns: 1fr; gap: 1rem; }
    .team-score { padding: 1rem; }
    .score-val { font-size: 3rem; margin-bottom: 10px;}
    
    .content-section { padding: 1.5rem; }
    .content-section h2 { font-size: 1.5rem; }
}