:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    --success-color: #26b050;
    --error-color: #ff4757;
    --bg-light: #f8f9fa;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --text-main: #2d3436;
    --accent-blue: #0984e3;
}

html, body {
    font-family: 'Lexend', 'Inter', -apple-system, sans-serif;
    background: #f0f2f5;
    color: var(--text-main);
    line-height: 1.6;
}

/* Glassmorphism Containers */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

/* Typography */
h3 {
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Reading Experience */
.text-container {
    background: white;
    border: 2px solid #e1e8ed;
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
    margin: 20px 0;
    min-height: 250px;
    line-height: 2.2;
    font-size: 24px;
    transition: all 0.3s ease;
}

.word {
    display: inline-block;
    padding: 0 4px;
    margin: 0 2px;
    border-radius: 8px;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
}

.word.current {
    background: rgba(38, 176, 80, 0.1);
    color: var(--success-color);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(38, 176, 80, 0.15);
}

.word.completed {
    color: #b2bec3;
    filter: blur(0.5px);
}

.word.wrong {
    background: rgba(255, 71, 87, 0.1);
    color: var(--error-color);
    text-decoration: underline wavy;
}

/* Controls & Buttons */
.btn-custom {
    padding: 12px 24px;
    border-radius: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-primary-custom {
    background: var(--primary-gradient);
    color: white;
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.3);
}

.btn-secondary-custom {
    background: white;
    color: var(--text-main);
    border: 1px solid #e1e8ed;
}

/* Progress Bar */
.progress-container {
    height: 12px;
    background: #e1e8ed;
    border-radius: 10px;
    overflow: hidden;
    margin: 20px 0;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary-gradient);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Statistics Badges */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 2rem;
}

.stat-card {
    background: white;
    padding: 1rem;
    border-radius: 16px;
    text-align: center;
    border: 1px solid #f1f2f6;
}

.stat-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--accent-blue);
    display: block;
}

.stat-label {
    font-size: 12px;
    color: #a4b0be;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Animations */
@keyframes wordPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1.1); }
}

.animate-pop {
    animation: wordPop 0.3s ease-out forwards;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .text-container {
        font-size: 20px;
        padding: 1.5rem;
    }
    
    .glass-card {
        padding: 1.5rem;
    }

    .auth-container {
        margin: 2rem 1rem;
    }
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 1.25rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #636e72;
    font-size: 0.9rem;
}

.input-custom {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 2px solid #e1e8ed;
    background: white;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.input-custom:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.auth-container {
    max-width: 450px;
    margin: 4rem auto;
}

.alert {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.alert-danger {
    background: #fff5f5;
    color: var(--error-color);
    border: 1px solid #fed7d7;
}

.alert-success {
    background: #f0fff4;
    color: var(--success-color);
    border: 1px solid #c6f6d5;
}

.auth-links {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.auth-links a {
    color: var(--accent-blue);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* Social Buttons */
.btn-google {
    background: white;
    color: #3d3d3d;
    border: 1px solid #dadce0;
    width: 100%;
    justify-content: center;
    margin-top: 1rem;
}

.btn-google:hover {
    background: #f8f9fa;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.w-100 { width: 100%; }