/* 16-Day Escape Game Styles */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --success-green: #10b981;
    --warning-orange: #f59e0b;
    --error-red: #ef4444;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --gradient-success: linear-gradient(135deg, var(--success-green), #059669);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.main-header {
    text-align: center;
    margin-bottom: 3rem;
}

.header-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.game-title {
    font-size: 3rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.title-icon {
    font-size: 3.5rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.game-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Calendar Styles */
.calendar-container {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    align-items: start;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.calendar-day::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.calendar-day.unlocked {
    background: var(--bg-primary);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.calendar-day.unlocked:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-dark);
}

.calendar-day.unlocked:hover::before {
    opacity: 0.1;
}

@keyframes shake {
    0% { transform: translate(0); }
    20% { transform: translate(-3px); }
    40% { transform: translate(3px); }
    60% { transform: translate(-3px); }
    80% { transform: translate(3px); }
    100% { transform: translate(0); }
}

.calendar-day.locked {
    background: var(--bg-tertiary);
    color: var(--text-light);
    border-color: var(--border-color);
    cursor: not-allowed;
    transition: all 0.2s ease;
}

/* 🔒 Shake + red border on hover for locked days */
.calendar-day.locked:hover {
    animation: shake 0.4s;
    border-color: var(--error-red); /* You can define --error-red in your root */
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.calendar-day.completed {
    background: var(--success-green);
    color: white;
    border-color: var(--success-green);
    box-shadow: var(--shadow-md);
}

.calendar-day.completed:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.day-number {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.day-status {
    font-size: 1.2rem;
}

/* Game Info Styles */
.game-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-card, .progress-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.info-card h3, .progress-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-card ul {
    list-style: none;
}

.info-card li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.5rem;
}

.info-card li::before {
    content: '✨';
    position: absolute;
    left: 0;
    top: 0.5rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

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

.progress-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
}

/* Puzzle Page Styles */
.puzzle-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.puzzle-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 600px;
    width: 100%;
    text-align: center;
}

.day-indicator {
    display: inline-block;
    background: var(--gradient-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

.puzzle-text {
    font-size: 1.3rem;
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: 2rem;
    font-weight: 400;
}

.input-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

#answer {
    width: 100%;
    max-width: 400px;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.3s ease;
    text-align: center;
}

#answer:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

#continueBtn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    background: var(--bg-tertiary);
    color: var(--text-light);
    cursor: not-allowed;
    transition: all 0.3s ease;
    min-width: 150px;
}

#continueBtn:not(:disabled) {
    background: var(--gradient-success);
    color: white;
    cursor: pointer;
    box-shadow: var(--shadow-md);
}

#continueBtn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.not-available {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
    font-size: 1.2rem;
}

/* Navigation Styles */
.navigation {
    margin-top: 2rem;
    text-align: center;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.nav-link:hover {
    background: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    max-width: 400px;
    width: 90%;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

.modal-header {
    margin-bottom: 1rem;
}

.modal-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.modal-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.modal-subtitle {
    font-size: 0.9rem;
    color: var(--text-light);
}

.modal-btn {
    padding: 0.75rem 2rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

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

/* Win Modal Styles */
.win-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.win-modal.show {
    opacity: 1;
    visibility: visible;
}

.win-modal .modal-content {
    background: var(--bg-primary);
    padding: 3rem 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    max-width: 450px;
    width: 90%;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.win-modal.show .modal-content {
    transform: scale(1);
}

.checkmark {
    font-size: 4rem;
    color: var(--success-green);
    display: block;
    margin-bottom: 1rem;
    animation: bounce 0.6s ease;
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0,0,0);
    }
    40%, 43% {
        transform: translate3d(0, -20px, 0);
    }
    70% {
        transform: translate3d(0, -10px, 0);
    }
    90% {
        transform: translate3d(0, -4px, 0);
    }
}

/* Footer Styles */
.main-footer {
    text-align: center;
    margin-top: 3rem;
    padding: 1rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* Locked Message Styles */
.locked-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.locked-message.show {
    opacity: 1;
    visibility: visible;
}

.locked-message-content {
    text-align: center;
}

.locked-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.locked-message p {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 600;
}

.locked-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .calendar-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .game-info {
        flex-direction: row;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .game-title {
        font-size: 2rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .title-icon {
        font-size: 2.5rem;
    }
    
    .calendar-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 1.5rem;
    }
    
    .game-info {
        flex-direction: column;
    }
    
    .puzzle-content {
        padding: 2rem 1.5rem;
    }
    
    .puzzle-text {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .calendar-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .calendar-day {
        aspect-ratio: 3/1;
        flex-direction: row;
        gap: 1rem;
    }
    
    .day-number {
        font-size: 1.2rem;
        margin-bottom: 0;
    }
    
    .puzzle-content {
        padding: 1.5rem 1rem;
    }
    
    .header-content {
        padding: 1.5rem;
    }
}

.puzzle-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}
