/* Pre-EMT School - Dark Theme */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #0a0e17;
    --surface: #111827;
    --surface-2: #1a2332;
    --surface-3: #243044;
    --accent: #00f5d4;
    --accent-dim: #00b8a0;
    --accent-glow: rgba(0, 245, 212, 0.15);
    --text: #e2e8f0;
    --text-dim: #94a3b8;
    --text-muted: #64748b;
    --danger: #ef4444;
    --warning: #f59e0b;
    --success: #22c55e;
    --info: #3b82f6;
    --radius: 12px;
    --radius-sm: 8px;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: opacity 0.2s;
}

a:hover {
    opacity: 0.8;
}

/* Navigation */
.nav {
    background: var(--surface);
    border-bottom: 1px solid var(--surface-3);
    padding: 0 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.nav-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-brand .icon {
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-dim);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text);
    background: var(--surface-2);
}

.nav-links a.btn-accent {
    background: var(--accent);
    color: var(--bg);
    font-weight: 600;
}

.nav-links a.btn-accent:hover {
    background: var(--accent-dim);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.container-sm {
    max-width: 480px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Cards */
.card {
    background: var(--surface);
    border: 1px solid var(--surface-3);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.card-header {
    border-bottom: 1px solid var(--surface-3);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.card h2, .card h3 {
    color: var(--accent);
    margin-bottom: 0.5rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: 0.375rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--surface-2);
    border: 1px solid var(--surface-3);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 1rem;
    transition: border-color 0.2s;
    outline: none;
}

.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input::placeholder {
    color: var(--text-muted);
}

select.form-input {
    cursor: pointer;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
    line-height: 1;
}

.btn-accent {
    background: var(--accent);
    color: var(--bg);
}

.btn-accent:hover {
    background: var(--accent-dim);
    color: var(--bg);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
}

.btn-outline:hover {
    background: var(--accent-glow);
    color: var(--accent);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger);
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: var(--success);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--info);
}

/* Hero section */
.hero {
    text-align: center;
    padding: 4rem 1rem 3rem;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero h1 span {
    color: var(--accent);
}

.hero p {
    font-size: 1.125rem;
    color: var(--text-dim);
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* Game UI */
.game-container {
    max-width: 700px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.game-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.game-stat {
    background: var(--surface);
    border: 1px solid var(--surface-3);
    border-radius: var(--radius);
    padding: 0.75rem 1.25rem;
    text-align: center;
    min-width: 80px;
}

.game-stat .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    display: block;
}

.game-stat .label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.game-timer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.game-timer .time {
    color: var(--accent);
    font-size: 1.5rem;
}

.game-timer .time.warning {
    color: var(--warning);
}

.game-timer .time.danger {
    color: var(--danger);
    animation: pulse 0.5s ease-in-out infinite alternate;
}

@keyframes pulse {
    from { opacity: 1; }
    to { opacity: 0.5; }
}

.game-word {
    background: var(--surface);
    border: 1px solid var(--surface-3);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.game-word h2 {
    font-size: 1.75rem;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.game-word .category-badge {
    display: inline-block;
    background: var(--accent-glow);
    color: var(--accent);
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.game-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.game-option {
    background: var(--surface);
    border: 2px solid var(--surface-3);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: left;
    font-size: 0.95rem;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1.4;
}

.game-option:hover:not(:disabled) {
    border-color: var(--accent);
    background: var(--accent-glow);
}

.game-option.correct {
    border-color: var(--success);
    background: rgba(34, 197, 94, 0.1);
}

.game-option.wrong {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

.game-option:disabled {
    cursor: default;
    opacity: 0.85;
}

.game-option.reveal {
    border-color: var(--success);
}

.game-feedback {
    text-align: center;
    padding: 1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    margin-bottom: 1rem;
    display: none;
}

.game-feedback.show {
    display: block;
}

.game-feedback.correct {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.game-feedback.wrong {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.game-progress-bar {
    width: 100%;
    height: 6px;
    background: var(--surface-2);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.game-progress-bar .fill {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.game-start {
    text-align: center;
    padding: 3rem 1rem;
}

.game-start h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.game-start p {
    color: var(--text-dim);
    margin-bottom: 2rem;
}

/* Pricing */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.pricing-card {
    background: var(--surface);
    border: 1px solid var(--surface-3);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    transition: all 0.3s;
    position: relative;
}

.pricing-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 245, 212, 0.1);
}

.pricing-card.featured {
    border-color: var(--accent);
    box-shadow: 0 0 32px rgba(0, 245, 212, 0.15);
}

.pricing-card.featured::before {
    content: 'Best Value';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: var(--bg);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 1rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pricing-card .plan-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.pricing-card .plan-price {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.pricing-card .plan-price .currency {
    font-size: 1.5rem;
    vertical-align: super;
}

.pricing-card .plan-duration {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.pricing-card .plan-features {
    list-style: none;
    margin-bottom: 2rem;
    text-align: left;
}

.pricing-card .plan-features li {
    padding: 0.5rem 0;
    color: var(--text-dim);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pricing-card .plan-features li::before {
    content: '✓';
    color: var(--accent);
    font-weight: 700;
}

/* Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.dashboard-stat {
    background: var(--surface);
    border: 1px solid var(--surface-3);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
}

.dashboard-stat .value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    display: block;
}

.dashboard-stat .label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: var(--surface-2);
    border-radius: 6px;
    overflow: hidden;
}

.progress-bar .fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--info));
    border-radius: 6px;
    transition: width 0.5s ease;
}

/* Admin tables */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.admin-table th,
.admin-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--surface-3);
    font-size: 0.875rem;
}

.admin-table th {
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.admin-table tr:hover td {
    background: var(--surface-2);
}

.admin-table .badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-active {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.badge-inactive {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.badge-pending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

/* Messages */
.message {
    text-align: center;
    padding: 3rem 1rem;
}

.message-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.message h2 {
    color: var(--text);
    margin-bottom: 0.5rem;
}

.message p {
    color: var(--text-dim);
    margin-bottom: 1.5rem;
}

/* Footer */
.footer {
    border-top: 1px solid var(--surface-3);
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.badge-info {
    background: rgba(59, 130, 246, 0.15);
    color: var(--info);
}

/* Admin sidebar */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 240px;
    background: var(--surface);
    border-right: 1px solid var(--surface-3);
    padding: 1.5rem 0;
    flex-shrink: 0;
}

.admin-sidebar h3 {
    padding: 0 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent);
    font-size: 0.9rem;
}

.admin-sidebar a {
    display: block;
    padding: 0.625rem 1.5rem;
    color: var(--text-dim);
    font-size: 0.875rem;
    transition: all 0.2s;
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
    background: var(--surface-2);
    color: var(--accent);
}

.admin-content {
    flex: 1;
    padding: 2rem;
    overflow-x: auto;
}

/* Edit form for words */
.word-edit {
    background: var(--surface);
    border: 1px solid var(--surface-3);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.word-edit textarea {
    width: 100%;
    min-height: 80px;
    padding: 0.75rem;
    background: var(--surface-2);
    border: 1px solid var(--surface-3);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.875rem;
    resize: vertical;
    outline: none;
}

.word-edit textarea:focus {
    border-color: var(--accent);
}

/* Mobile */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.75rem;
    }

    .nav-links a {
        font-size: 0.8rem;
        padding: 0.4rem 0.5rem;
    }

    .game-options {
        grid-template-columns: 1fr;
    }

    .game-header {
        flex-direction: column;
        align-items: stretch;
    }

    .game-stats {
        justify-content: center;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
    }

    .admin-sidebar {
        width: 100%;
        display: flex;
        overflow-x: auto;
        padding: 0.5rem 0;
    }

    .admin-sidebar h3 { display: none; }
    .admin-sidebar a {
        white-space: nowrap;
        padding: 0.5rem 1rem;
    }

    .admin-layout {
        flex-direction: column;
    }

    .admin-content {
        padding: 1rem;
    }

    .admin-table {
        font-size: 0.8rem;
    }

    .admin-table th,
    .admin-table td {
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    .container, .container-sm {
        padding: 1rem 0.75rem;
    }
    
    .hero {
        padding: 2rem 0.75rem;
    }
    
    .game-stat {
        min-width: 60px;
        padding: 0.5rem 0.75rem;
    }
    
    .game-stat .value {
        font-size: 1.125rem;
    }

    .dashboard-stat .value {
        font-size: 1.5rem;
    }

    .pricing-card {
        padding: 1.5rem;
    }
}
