/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette - Pastel Sea Green Theme */
    --primary-color: #7dd3c0;
    --primary-light: #a8e6d7;
    --primary-dark: #5cb3a0;
    --accent-color: #ffd6cc;
    --background-color: #fefefe;
    --card-background: #ffffff;
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --text-light: #a0aec0;
    --border-color: #e2e8f0;
    --shadow-light: 0 2px 8px rgba(125, 211, 192, 0.1);
    --shadow-medium: 0 4px 16px rgba(125, 211, 192, 0.15);
    --shadow-strong: 0 8px 32px rgba(125, 211, 192, 0.2);
    --gradient-primary: linear-gradient(135deg, #7dd3c0 0%, #a8e6d7 100%);
    --gradient-accent: linear-gradient(135deg, #ffd6cc 0%, #ffe4db 100%);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-color);
    font-size: 16px;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Login Screen */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    padding: 24px;
}

.login-container {
    background: var(--card-background);
    padding: 48px;
    border-radius: 24px;
    box-shadow: var(--shadow-strong);
    width: 100%;
    max-width: 420px;
    text-align: center;
}

.login-header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 32px;
}

.login-form {
    text-align: left;
}

.input-group {
    margin-bottom: 24px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.input-group input {
    width: 100%;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--background-color);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(125, 211, 192, 0.1);
}

.login-btn {
    width: 100%;
    padding: 16px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 16px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.error-message {
    color: #e53e3e;
    font-size: 0.9rem;
    text-align: center;
    margin-top: 8px;
}

/* Header */
.header {
    background: var(--card-background);
    box-shadow: var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.logout-btn {
    padding: 8px 16px;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.logout-btn:hover {
    background: var(--primary-light);
    color: white;
    border-color: var(--primary-light);
}

/* Main Content */
.main-content {
    padding: 40px 0;
}

/* Welcome Section */
.welcome-section {
    text-align: center;
    margin-bottom: 48px;
}

.welcome-title {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.welcome-message {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Card Styles */
.progress-card,
.prompt-card,
.streak-card,
.word-card,
.countdown-card,
.history-card {
    background: var(--card-background);
    border-radius: 20px;
    padding: 32px;
    box-shadow: var(--shadow-light);
    margin-bottom: 32px;
    transition: all 0.3s ease;
}

.progress-card:hover,
.prompt-card:hover,
.streak-card:hover,
.word-card:hover,
.countdown-card:hover,
.history-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
}

/* Day Tracker */
.day-tracker {
    margin-bottom: 48px;
}

.progress-card h3 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 16px;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 6px;
    transition: width 0.5s ease;
    width: 1%;
}

.progress-percent {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Prompt Section */
.prompt-section {
    margin-bottom: 48px;
}

.prompt-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.prompt-content {
    margin-bottom: 24px;
}

#currentPrompt {
    font-size: 1.2rem;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--gradient-accent);
    padding: 24px;
    border-radius: 16px;
    border-left: 4px solid var(--primary-color);
}

.prompt-actions {
    text-align: center;
}

.mark-done-btn {
    padding: 16px 32px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mark-done-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.mark-done-btn:disabled {
    background: var(--text-light);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Streak Section */
.streak-section {
    margin-bottom: 48px;
}

.streak-card {
    display: flex;
    align-items: center;
    gap: 24px;
    text-align: left;
}

.streak-icon {
    font-size: 3rem;
    line-height: 1;
}

.streak-info h4 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.streak-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Word Section */
.word-section {
    margin-bottom: 48px;
}

.word-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.word {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.word-meaning {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-style: italic;
}

.word-usage {
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--gradient-accent);
    padding: 16px;
    border-radius: 12px;
    border-left: 3px solid var(--primary-color);
}

/* Countdown Section */
.countdown-section {
    margin-bottom: 48px;
}

.countdown-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.countdown-text {
    font-size: 1.3rem;
    color: var(--primary-color);
    font-weight: 600;
    text-align: center;
}

/* History Section */
.history-section {
    margin-bottom: 48px;
}

.history-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 12px;
    max-width: 800px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.calendar-day.locked {
    background: var(--border-color);
    color: var(--text-light);
    cursor: not-allowed;
}

.calendar-day.available {
    background: var(--gradient-accent);
    color: var(--text-primary);
    border-color: var(--primary-light);
}

.calendar-day.completed {
    background: var(--gradient-primary);
    color: white;
}

.calendar-day.current {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(125, 211, 192, 0.2);
}

.calendar-day:hover:not(.locked) {
    transform: scale(1.1);
}

/* Motivational Footer */
.motivational-footer {
    text-align: center;
    padding: 48px 0;
    margin-top: 48px;
}

.motivation-quote {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-style: italic;
    font-weight: 500;
}

/* Success Animation */
.success-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.success-animation .confetti {
    position: absolute;
    font-size: 4rem;
    animation: confetti 2s ease-in-out infinite;
}

.success-message {
    background: var(--card-background);
    padding: 48px;
    border-radius: 24px;
    text-align: center;
    box-shadow: var(--shadow-strong);
    animation: slideUp 0.5s ease;
}

.success-message h3 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.success-message p {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes confetti {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-20px) rotate(90deg); }
    50% { transform: translateY(-40px) rotate(180deg); }
    75% { transform: translateY(-20px) rotate(270deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .login-container {
        padding: 32px 24px;
        margin: 16px;
    }
    
    .login-header h1 {
        font-size: 2rem;
    }
    
    .welcome-title {
        font-size: 2rem;
    }
    
    .welcome-message {
        font-size: 1.1rem;
    }
    
    .progress-card,
    .prompt-card,
    .streak-card,
    .word-card,
    .countdown-card,
    .history-card {
        padding: 24px;
        margin-bottom: 24px;
    }
    
    .header .container {
        padding: 16px;
    }
    
    .logo {
        font-size: 1.3rem;
    }
    
    .streak-card {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .calendar-grid {
        grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
        gap: 8px;
    }
    
    .calendar-day {
        font-size: 0.8rem;
    }
    
    .success-message {
        padding: 32px 24px;
        margin: 16px;
    }
    
    .success-message h3 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .welcome-title {
        font-size: 1.8rem;
    }
    
    .progress-card h3 {
        font-size: 1.5rem;
    }
    
    .word {
        font-size: 1.5rem;
    }
    
    .countdown-text {
        font-size: 1.1rem;
    }
    
    .calendar-grid {
        grid-template-columns: repeat(auto-fill, minmax(35px, 1fr));
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus styles for accessibility */
button:focus,
input:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .header,
    .logout-btn,
    .mark-done-btn,
    .success-animation {
        display: none;
    }
    
    body {
        background: white;
    }
    
    .progress-card,
    .prompt-card,
    .streak-card,
    .word-card,
    .countdown-card,
    .history-card {
        box-shadow: none;
        border: 1px solid var(--border-color);
    }
}

