/* Brain Gym - Base Styles */
/* This file contains the core styles that apply to all UI variants */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* Development Controls */
.dev-controls {
    position: fixed;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px;
    border-radius: 5px;
    z-index: 1000;
    font-size: 12px;
}

.dev-controls select {
    margin-left: 10px;
    padding: 5px;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.page {
    display: none;
    min-height: 100vh;
}

.page.active {
    display: block;
}

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Navigation */
.main-nav {
    background: #fff;
    padding: 15px 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Buttons */
button {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

button:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

/* Forms */
input[type="text"],
input[type="password"],
input[type="email"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    margin-bottom: 15px;
    transition: border-color 0.3s ease;
}

input:focus {
    outline: none;
    border-color: #3498db;
}

/* Grid Layouts */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.test-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

/* Test Buttons */
.test-button {
    background: white;
    border: 2px solid #e0e0e0;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #333;
}

.test-button:hover {
    border-color: #3498db;
    background: #f8f9fa;
    transform: translateY(-2px);
}

.test-button h4 {
    margin-bottom: 8px;
    color: #2c3e50;
}

.test-button p {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.test-status {
    display: inline-block;
    padding: 4px 12px;
    background: #27ae60;
    color: white;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

/* Progress Stats */
.progress-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 32px;
    font-weight: bold;
    color: #3498db;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: #666;
}

/* Login Page */
.app-title {
    font-size: 48px;
    text-align: center;
    margin-bottom: 10px;
    color: #2c3e50;
}

.app-subtitle {
    text-align: center;
    font-size: 18px;
    color: #666;
    margin-bottom: 40px;
}

.login-form {
    max-width: 400px;
    margin: 0 auto 40px;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.login-form h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #2c3e50;
}

.demo-users {
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
}

.demo-users h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.demo-user {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    background: #ecf0f1;
    color: #2c3e50;
    border: 1px solid #bdc3c7;
}

.demo-user:hover {
    background: #d5dbdb;
}

/* Results Display */
.recent-results {
    max-height: 300px;
    overflow-y: auto;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.result-item:last-child {
    border-bottom: none;
}

.result-info h4 {
    margin-bottom: 5px;
    color: #2c3e50;
}

.result-info p {
    font-size: 14px;
    color: #666;
}

.result-score {
    font-size: 24px;
    font-weight: bold;
    color: #27ae60;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .test-grid {
        grid-template-columns: 1fr;
    }
    
    .progress-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .container {
        padding: 10px;
    }
    
    .app-title {
        font-size: 36px;
    }
    
    .main-nav {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

/* Loading States */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus indicators */
button:focus,
input:focus,
.test-button:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid #000;
    }
    
    button {
        border: 2px solid #000;
    }
}