/* bigram.css - Bigram Blitz Page Styles */

/* ================= CSS VARIABLES ================= */
:root {
    /* Light Theme */
    --bg-primary: #f5f8ff;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-main: #ffffff;
    --bg-right: #ffffff;
    
    --text-primary: #1e2b3c;
    --text-secondary: #3a4b62;
    --text-muted: #6b7a8f;
    --text-inverse: #ffffff;
    
    --border-color: #d9e2ef;
    --border-strong: #a0b8d4;
    --border-focus: #2b6ed9;
    
    --accent-primary: #2b6ed9;
    --accent-secondary: #1e4b8c;
    --accent-light: #e8f0fe;
    --accent-hover: #4895ef;
    --accent-transparent: rgba(43, 110, 217, 0.1);
    --accent-success: #28a745;
    --accent-warning: #ffc107;
    --accent-danger: #dc3545;
    --accent-info: #17a2b8;
    
    --shadow-color: rgba(0, 40, 100, 0.08);
    --shadow-hover: rgba(43, 110, 217, 0.15);
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    
    /* Game specific colors */
    --streak-color: #ff6b6b;
    --score-color: #4ecdc4;
    --bigram-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    
    --transition-speed: 0.3s;
}

/* ================= DARK THEME ================= */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --bg-sidebar: #1e293b;
    --bg-main: #1e293b;
    --bg-right: #1e293b;
    
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-inverse: #0f172a;
    
    --border-color: #334155;
    --border-strong: #475569;
    --border-focus: #3b82f6;
    
    --accent-primary: #3b82f6;
    --accent-secondary: #60a5fa;
    --accent-light: #1e293b;
    --accent-hover: #2563eb;
    --accent-transparent: rgba(59, 130, 246, 0.15);
    --accent-success: #4ade80;
    --accent-warning: #fbbf24;
    --accent-danger: #f87171;
    --accent-info: #38bdf8;
    
    --shadow-color: rgba(0, 0, 0, 0.3);
    --shadow-hover: rgba(59, 130, 246, 0.2);
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    
    --bigram-bg: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
}

/* ================= BASE ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
    transition: background-color var(--transition-speed) ease, 
                color var(--transition-speed) ease;
}

/* ================= DARK MODE TOGGLE ================= */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.theme-btn {
    background: var(--bg-card);
    border: 2px solid var(--border-strong);
    color: var(--text-primary);
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--card-shadow);
    transition: all var(--transition-speed) ease;
}

.theme-btn:hover {
    transform: scale(1.05);
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px var(--shadow-hover);
}

/* ================= MAIN LAYOUT ================= */
.bigram-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    overflow-x: hidden;
}

.bigram-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0 20px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 25px;
}

.site-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    cursor: pointer;
    transition: color var(--transition-speed) ease;
}

.site-title:hover {
    color: var(--accent-primary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.login-btn {
    background: transparent;
    border: 2px solid var(--border-strong);
    color: var(--text-primary);
    padding: 8px 28px;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    white-space: nowrap;
    font-size: 14px;
}

.login-btn:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    transform: scale(1.05);
}

.mobile-menu-btn {
    display: none;
    background: var(--accent-primary);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
    order: 1;
}

/* ================= 3-COLUMN LAYOUT ================= */
.bigram-layout {
    display: grid;
    grid-template-columns: 260px 1fr 280px;
    gap: 25px;
    margin-bottom: 40px;
}

/* ================= LEFT SIDEBAR ================= */
.bigram-sidebar {
    background: var(--bg-sidebar);
    border: 2px solid var(--border-color);
    border-radius: 24px;
    padding: 20px 15px;
    transition: all var(--transition-speed) ease;
    box-shadow: var(--card-shadow);
}

.bigram-sidebar:hover {
    border-color: var(--accent-primary);
    transform: scale(1.02);
    box-shadow: 0 8px 25px var(--shadow-hover);
}

.sidebar-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.nav-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Navigation */
.bigram-nav ul {
    list-style: none;
}

.bigram-nav li {
    margin-bottom: 5px;
}

.bigram-nav a {
    display: block;
    padding: 12px 15px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    transition: all var(--transition-speed) ease;
}

.bigram-nav li.active a {
    background: var(--accent-transparent);
    color: var(--accent-primary);
    font-weight: 600;
    border-left: 3px solid var(--accent-primary);
}

.bigram-nav a:hover {
    background: var(--accent-light);
    color: var(--accent-primary);
    transform: translateX(5px);
}

.home-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
}

.home-icon {
    font-size: 1.1rem;
}

/* Bigram Stats */
.bigram-stats {
    background: var(--bg-secondary);
    border-radius: 18px;
    padding: 20px;
    margin: 25px 0;
    border: 1px solid var(--border-color);
}

.bigram-stats h4 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.stats-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.stat-value {
    font-weight: 600;
    color: var(--accent-primary);
}

/* Top Bigrams */
.top-bigrams {
    background: var(--bg-secondary);
    border-radius: 18px;
    padding: 20px;
    border: 1px solid var(--border-color);
}

.top-bigrams h4 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.bigram-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bigram-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: var(--bg-card);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.bigram-pair {
    font-family: 'Fira Code', monospace;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--accent-primary);
}

.bigram-count {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ================= MAIN CONTENT ================= */
.bigram-main {
    background: var(--bg-main);
    border: 2px solid var(--border-color);
    border-radius: 24px;
    padding: 25px;
    transition: all var(--transition-speed) ease;
    box-shadow: var(--card-shadow);
}

.bigram-main:hover {
    border-color: var(--accent-primary);
    transform: scale(1.01);
    box-shadow: 0 8px 25px var(--shadow-hover);
}

.bigram-header-section h1 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.bigram-subtitle {
    color: var(--text-muted);
    margin-bottom: 30px;
}

/* Game Modes */
.game-modes {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.mode-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 25px;
    border: 2px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.mode-btn.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    transform: scale(1.05);
    box-shadow: 0 5px 15px var(--shadow-hover);
}

.mode-btn:hover {
    transform: translateY(-2px);
    border-color: var(--accent-primary);
    box-shadow: 0 5px 15px var(--shadow-hover);
}

.mode-icon {
    font-size: 1.2rem;
}

/* Game Area */
.bigram-game-area {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 30px;
    padding: 30px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.game-timer {
    margin-bottom: 20px;
}

.timer-display {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-primary);
    text-align: center;
    font-family: 'Fira Code', monospace;
    margin-bottom: 10px;
}

.timer-progress {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.timer-progress .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-success), var(--accent-primary));
    transition: width 1s linear;
}

/* Bigram Display */
.bigram-display {
    text-align: center;
    margin: 20px 0 30px;
}

.bigram-card {
    display: inline-block;
    font-size: 8rem;
    font-weight: 800;
    background: var(--bigram-bg);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin-bottom: 10px;
    animation: pulse 2s infinite;
    font-family: 'Fira Code', monospace;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.bigram-hint {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Game Stats */
.game-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 25px;
    background: var(--bg-card);
    border-radius: 50px;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
}

.stat-icon {
    font-size: 2rem;
}

.stat-info {
    text-align: left;
}

.stat-label {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 2px;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-primary);
}

/* Input Area */
.input-area {
    max-width: 400px;
    margin: 0 auto 20px;
    text-align: center;
}

.bigram-input {
    width: 100%;
    padding: 15px 25px;
    font-size: 1.5rem;
    border: 3px solid var(--border-color);
    border-radius: 60px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-family: 'Fira Code', monospace;
    text-align: center;
    letter-spacing: 4px;
    transition: all var(--transition-speed) ease;
}

.bigram-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px var(--accent-light);
    transform: scale(1.02);
}

.bigram-input.correct {
    border-color: var(--accent-success);
    animation: correctPulse 0.3s ease;
}

.bigram-input.incorrect {
    border-color: var(--accent-danger);
    animation: shake 0.3s ease;
}

@keyframes correctPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); background: rgba(40, 167, 69, 0.1); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.input-feedback {
    margin-top: 10px;
    min-height: 30px;
    font-size: 1rem;
    color: var(--text-muted);
}

.input-feedback.success {
    color: var(--accent-success);
}

.input-feedback.error {
    color: var(--accent-danger);
}

/* Next Bigrams */
.next-bigrams {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
    padding: 15px;
    background: var(--bg-card);
    border-radius: 50px;
}

.next-label {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.bigram-preview {
    display: flex;
    gap: 15px;
}

.preview-item {
    font-family: 'Fira Code', monospace;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-secondary);
    opacity: 0.7;
}

.preview-item:first-child {
    opacity: 1;
    color: var(--accent-primary);
}

/* Game Controls */
.game-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.control-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 30px;
    border: none;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.restart-btn {
    background: var(--accent-primary);
    color: white;
}

.pause-btn {
    background: var(--accent-warning);
    color: var(--text-primary);
}

.control-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px var(--shadow-hover);
}

/* Challenge Mode */
.challenge-mode, .precision-mode {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 25px;
    margin: 30px 0;
}

.challenge-mode h3, .precision-mode h3 {
    color: var(--text-primary);
    margin-bottom: 15px;
}

.challenge-card, .precision-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--border-color);
}

.challenge-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.challenge-label {
    color: var(--text-muted);
}

.challenge-value {
    font-weight: 600;
    color: var(--accent-primary);
}

.challenge-progress {
    margin-top: 15px;
}

.challenge-progress .progress-bar {
    height: 10px;
    background: var(--border-color);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 5px;
}

.challenge-progress .progress-fill {
    height: 100%;
    background: var(--accent-success);
    transition: width 0.3s ease;
}

.progress-text {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Precision Mode */
.precision-target {
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent-success);
    text-align: center;
    margin-bottom: 15px;
}

.precision-info {
    text-align: center;
    color: var(--text-secondary);
}

.precision-info span {
    font-weight: 600;
    color: var(--accent-primary);
}

/* Bigram Library */
.bigram-library {
    margin-top: 40px;
}

.bigram-library h3 {
    color: var(--text-primary);
    margin-bottom: 20px;
}

.library-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}

.library-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 5px;
    text-align: center;
    transition: all var(--transition-speed) ease;
}

.library-item:hover {
    transform: scale(1.05);
    border-color: var(--accent-primary);
    box-shadow: 0 5px 15px var(--shadow-hover);
}

.library-item .bigram {
    font-family: 'Fira Code', monospace;
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--accent-primary);
}

.library-item .freq {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ================= RIGHT SIDEBAR ================= */
.bigram-right {
    background: var(--bg-right);
    border: 2px solid var(--border-color);
    border-radius: 24px;
    padding: 20px;
    transition: all var(--transition-speed) ease;
    box-shadow: var(--card-shadow);
}

.bigram-right:hover {
    border-color: var(--accent-primary);
    transform: scale(1.02);
    box-shadow: 0 8px 25px var(--shadow-hover);
}

.leaderboard-card, .achievements-card, .tips-card {
    background: var(--bg-secondary);
    border-radius: 18px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
}

.leaderboard-card h3, .achievements-card h3, .tips-card h3 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--bg-card);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.leaderboard-rank {
    font-weight: 700;
    color: var(--accent-primary);
    width: 30px;
}

.leaderboard-name {
    flex: 1;
    color: var(--text-primary);
}

.leaderboard-score {
    font-weight: 600;
    color: var(--text-primary);
}

.achievements-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.achievement-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: var(--bg-card);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    opacity: 0.7;
}

.achievement-item.unlocked {
    opacity: 1;
    border-color: var(--accent-success);
}

.achievement-icon {
    font-size: 1.8rem;
}

.achievement-info {
    flex: 1;
}

.achievement-name {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
}

.achievement-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.tips-card ul {
    list-style: none;
}

.tips-card li {
    padding: 8px 0;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.tips-card li:last-child {
    border-bottom: none;
}

.tips-card li::before {
    content: "⚡";
    font-size: 1rem;
}

/* ================= FOOTER ================= */
.test-footer {
    margin-top: 60px;
    padding: 0;
    border-top: 2px solid var(--border-color);
    width: 100%;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 30px;
    padding: 40px 0;
    width: 100%;
}

/* LEFT SIDE: Logo + Copyright under logo */
.footer-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    flex: 1;
    min-width: 200px;
}

.footer-logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--accent-primary);
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 14px;
}

/* CENTER: 2 rows with 4 buttons each */
.footer-center {
    flex: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    min-width: 300px;
}

.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(4, auto);
    gap: 15px 25px;
    justify-content: center;
}

.footer-links-grid a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.footer-links-grid a:hover {
    color: var(--accent-primary);
}

/* RIGHT SIDE: Independent platform text with email */
.footer-right {
    flex: 1;
    text-align: right;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
    min-width: 220px;
}

.footer-right p {
    margin-bottom: 5px;
}

.footer-right a {
    color: var(--accent-primary);
    text-decoration: none;
}

.footer-right a:hover {
    text-decoration: underline;
}

/* ================= ANIMATIONS ================= */
@keyframes slideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.bigram-card {
    animation: float 3s ease-in-out infinite;
}

/* ================= RESPONSIVE ================= */
@media screen and (max-width: 1200px) {
    .bigram-layout {
        grid-template-columns: 220px 1fr 240px;
        gap: 20px;
    }
    
    .library-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media screen and (max-width: 992px) {
    .bigram-layout {
        grid-template-columns: 1fr;
    }
    
    .bigram-sidebar, 
    .bigram-right {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .bigram-header {
        padding: 10px 0;
    }
    
    .site-title {
        font-size: 1.5rem;
    }
    
    .login-btn {
        padding: 6px 15px;
        font-size: 13px;
    }
    
    .mobile-menu-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .footer-left, .footer-right {
        align-items: center;
        text-align: center;
    }
    
    .footer-links-grid {
        grid-template-columns: repeat(2, auto);
    }
}

@media screen and (max-width: 768px) {
    .bigram-main {
        padding: 20px;
    }
    
    .bigram-header-section h1 {
        font-size: 1.8rem;
    }
    
    .bigram-subtitle {
        font-size: 1rem;
    }
    
    .game-modes {
        flex-direction: column;
        gap: 8px;
    }
    
    .mode-btn {
        width: 100%;
        justify-content: center;
        padding: 10px;
    }
    
    .bigram-card {
        font-size: 6rem;
    }
    
    .game-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .stat-card {
        width: 100%;
        padding: 12px 15px;
    }
    
    .stat-icon {
        font-size: 1.8rem;
    }
    
    .stat-value {
        font-size: 1.3rem;
    }
    
    .timer-display {
        font-size: 2rem;
    }
    
    .bigram-input {
        font-size: 1.2rem;
        padding: 12px 20px;
    }
    
    .next-bigrams {
        flex-direction: column;
        gap: 10px;
    }
    
    .bigram-preview {
        justify-content: center;
    }
    
    .preview-item {
        font-size: 1rem;
    }
    
    .game-controls {
        flex-direction: column;
        gap: 8px;
    }
    
    .control-btn {
        width: 100%;
        justify-content: center;
    }
    
    .library-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .theme-toggle {
        bottom: 10px;
        right: 10px;
    }
    
    .theme-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

@media screen and (max-width: 480px) {
    .bigram-main {
        padding: 15px;
    }
    
    .site-title {
        font-size: 1.1rem;
    }
    
    .login-btn {
        padding: 4px 10px;
        font-size: 11px;
        border-width: 1.5px;
    }
    
    .mobile-menu-btn {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .bigram-header-section h1 {
        font-size: 1.5rem;
    }
    
    .bigram-subtitle {
        font-size: 0.9rem;
    }
    
    .bigram-card {
        font-size: 4rem;
    }
    
    .timer-display {
        font-size: 1.8rem;
    }
    
    .stat-icon {
        font-size: 1.5rem;
    }
    
    .stat-value {
        font-size: 1.1rem;
    }
    
    .bigram-input {
        font-size: 1rem;
        padding: 10px 15px;
        letter-spacing: 2px;
    }
    
    .library-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .library-item .bigram {
        font-size: 1rem;
    }
    
    .footer-links-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .footer-links-grid a {
        font-size: 12px;
    }
    
    .footer-left, .footer-right {
        width: 100%;
    }
    
    .footer-copyright {
        font-size: 12px;
    }
    
    .footer-right p {
        font-size: 12px;
    }
}

@media screen and (max-width: 360px) {
    .site-title {
        font-size: 1rem;
    }
    
    .login-btn {
        padding: 3px 8px;
        font-size: 10px;
    }
    
    .mobile-menu-btn {
        padding: 3px 6px;
        font-size: 10px;
    }
    
    .bigram-header-section h1 {
        font-size: 1.3rem;
    }
    
    .bigram-card {
        font-size: 3rem;
    }
    
    .timer-display {
        font-size: 1.5rem;
    }
    
    .library-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 5px;
    }
    
    .footer-links-grid {
        grid-template-columns: 1fr;
    }
}