@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --primary-teal: #25586B;
    --primary-teal-dark: #1D4A5A;
    --secondary-teal: #2B6E85;
    --light-teal: #357796;
    
    --accent-orange: #BD4423;
    --accent-orange-dark: #A33A1D;
    
    --bg-dark: #f0f4f8; /* Light gray background */
    --bg-card: #ffffff; /* White cards */
    --border-color: #e2e8f0; /* Light borders */
    
    --text-main: #1e293b; /* Dark text */
    --text-muted: #64748b; /* Muted text */
    
    --glass-blur: blur(8px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Glassmorphism Utilities */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 5%;
    position: sticky;
    top: 0;
    z-index: 100;
    border-radius: 0 0 16px 16px;
    margin-bottom: 24px;
    background: linear-gradient(90deg, var(--primary-teal), var(--primary-teal-dark));
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
}

.logo img {
    height: 40px;
    border-radius: 8px;
}

/* Container */
.container {
    width: 95%;
    max-width: 800px; /* Keeping it narrow like a mobile app view but scalable */
    margin: 0 auto;
    flex-grow: 1;
    padding-bottom: 40px;
}

/* Section Containers */
.section-container {
    margin-bottom: 24px;
    padding: 16px;
    background: transparent;
    border-radius: 16px;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
}

.section-title img {
    height: 20px;
    filter: drop-shadow(0 0 2px rgba(255,255,255,0.5));
}

/* Dashboard: Score Section */
.score-box-container {
    display: flex;
    gap: 12px;
}

.score-box {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.circular-progress {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: conic-gradient(var(--light-teal) 75%, rgba(255,255,255,0.1) 0);
    display: flex;
    align-items: center;
    justify-content: center;
}
.circular-progress::before {
    content: "";
    position: absolute;
    width: 50px;
    height: 50px;
    background-color: var(--bg-dark);
    border-radius: 50%;
}
.circular-progress span {
    position: relative;
    font-weight: bold;
    font-size: 0.8rem;
}

.score-info h4 {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
}
.score-info .val {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-teal);
}
.score-info .target {
    font-size: 0.7rem;
    color: var(--accent-orange);
}

/* Dashboard: Streak Section */
.streak-container {
    background: rgba(189, 68, 35, 0.1);
    border: 1px solid rgba(189, 68, 35, 0.3);
    padding: 16px;
    border-radius: 12px;
    text-align: center;
}

.streak-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.streak-title {
    font-weight: bold;
    color: var(--primary-teal);
    font-family: monospace;
}

.streak-days {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
}

.streak-day {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}
.streak-day.active {
    background: var(--accent-orange);
    color: #fff;
    font-weight: bold;
}

/* Dashboard: Action Cards (English/Hindi) */
.action-grid {
    display: flex;
    gap: 12px;
}

.action-card {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.action-card:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

.action-card img {
    height: 40px;
    margin-bottom: 8px;
}

.action-card p {
    font-size: 0.85rem;
    font-weight: 600;
}

/* Dashboard: Exams Grid */
.exams-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.exam-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
}
.exam-card img {
    height: 40px;
    margin-bottom: 8px;
    border-radius: 50%;
}
.exam-card p {
    font-size: 0.8rem;
    font-weight: bold;
}

/* Utility layout selector */
.layout-selector {
    background: rgba(255,255,255,0.1);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-left: auto;
    cursor: pointer;
}

/* Screens Wrapper (Hidden by default) */
.screen {
    display: none;
    animation: fadeIn 0.3s ease;
}
.screen.active {
    display: block;
}

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

/* Typing Interface Styles (For Later Phases) */
.typing-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}
.typing-area {
    background: var(--bg-card);
    padding: 24px;
    border-radius: 12px;
    font-size: 1.5rem;
    line-height: 1.6;
    margin-bottom: 20px;
    min-height: 150px;
}
.keyboard-view {
    text-align: center;
    position: relative;
}
.keyboard-view img {
    max-width: 100%;
    border-radius: 12px;
}
.finger-highlight {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 193, 7, 0.6);
    box-shadow: 0 0 10px rgba(255,193,7,0.8);
    width: 30px;
    height: 30px;
    animation: pulse 1s infinite;
    display: none; /* Shown via JS */
}
@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

/* Sidebar Drawer */
.sidebar-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    display: none;
}
.sidebar-overlay.active {
    display: block;
}
.sidebar {
    position: fixed;
    top: 0; left: -320px;
    width: 300px; height: 100%;
    background: #fff;
    color: #000;
    z-index: 1000;
    transition: left 0.3s ease;
    overflow-y: auto;
}
.sidebar.active {
    left: 0;
}
.sidebar-header {
    width: 100%;
}
.sidebar-header img {
    width: 100%;
}
.sidebar-section {
    padding: 16px;
    border-bottom: 1px solid #eee;
}
.sidebar-section h4 {
    color: var(--primary-teal);
    margin-bottom: 8px;
    font-size: 0.9rem;
}
.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
}
.sidebar-item img {
    width: 24px;
    height: 24px;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: #fff;
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 60px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 100;
    border-radius: 20px 20px 0 0;
}
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--primary-teal);
    font-size: 0.7rem;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
}
.nav-item img {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
}
.fab-container {
    position: relative;
    top: -20px;
}
.fab {
    width: 56px;
    height: 56px;
    background: var(--primary-teal);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    border: 4px solid #fff;
}
.fab img {
    width: 28px;
    height: 28px;
}


/* Typing Engine Styles */
.correct { color: #4CAF50; background: rgba(76, 175, 80, 0.1); }
.incorrect { color: #F44336; text-decoration: underline; background: rgba(244, 67, 54, 0.2); }
.active-char { background: rgba(255,255,255,0.2); border-bottom: 3px solid var(--primary-teal); border-radius: 2px; }
#real-test-text span { font-size: 1.4rem; padding: 2px; border-radius: 4px; transition: all 0.1s; }

/* Responsive Desktop Layout */
@media (min-width: 768px) {
    .navbar { display: none; }
    .sidebar { display: none !important; }
    .sidebar-overlay { display: none !important; }
    .desktop-header { display: flex !important; }
    .bottom-nav {
        top: 0; left: 0; bottom: 0;
        width: 100px; height: 100vh;
        flex-direction: column; justify-content: center; align-items: center;
        border-radius: 0 20px 20px 0;
        box-shadow: 2px 0 10px rgba(0,0,0,0.05);
        background: #fff;
    }
    .fab-container { top: 0; margin: 15px 0; }
    .nav-item { margin: 15px 0; }
    .container { margin-left: 120px; max-width: 1000px; padding-top: 20px; }
}
.desktop-header {
    display: none; justify-content: space-between; align-items: center; padding: 20px 5%;
    background: var(--bg-card); box-shadow: 0 4px 15px rgba(0,0,0,0.05); margin-bottom: 30px; border-radius: 0 0 16px 16px;
}
.desktop-header .logo { color: var(--primary-teal); font-size: 1.8rem; }
.desktop-header-links { display: flex; gap: 20px; align-items: center; }
.desktop-header-links button { background: var(--primary-teal); color: #fff; border: none; padding: 10px 20px; border-radius: 8px; cursor: pointer; font-weight: bold; }
.desktop-header-links button:hover { background: var(--primary-teal-dark); }
