/* Reset and Base Styles */
* {
    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;
}

/* Login Page */
.login-page {
    background: #f5f5f5;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.login-input {
    width: 100%;
    max-width: 300px;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    text-align: center;
}

.login-input:focus {
    outline: none;
    border-color: #999;
}

.login-button {
    padding: 12px 32px;
    background: #333;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
}

.login-button:hover {
    background: #555;
}

/* Calendar Page */
.calendar-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

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

.calendar-header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

.calendar-header h1 {
    font-size: 2.5rem;
    font-weight: 300;
}

/* Current Day Section */
.current-day-section {
    display: flex;
    justify-content: center;
    margin-bottom: 60px;
}

/* Past Days Section */
.past-days-section {
    margin-top: 40px;
}

.past-days-section h2 {
    color: white;
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 300;
}

.doors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

/* Door Styles */
.door {
    position: relative;
    aspect-ratio: 1;
    cursor: pointer;
    perspective: 1000px;
}

.door-large {
    width: 100%;
    max-width: 300px;
}

.door-small {
    width: 100%;
}

.door-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    font-weight: bold;
    color: white;
    z-index: 10;
    pointer-events: none;
}

.door-small .door-number {
    font-size: 2rem;
}

.door-panels {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.door-panel {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, #c94b4b 0%, #4b134f 100%);
    transition: transform 0.6s ease;
}

.door-panel-left {
    left: 0;
    transform-origin: left center;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.door-panel-right {
    right: 0;
    transform-origin: right center;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.door:hover .door-panel-left {
    transform: perspective(1000px) rotateY(-5deg);
}

.door:hover .door-panel-right {
    transform: perspective(1000px) rotateY(5deg);
}

.door.opening .door-panel-left {
    transform: perspective(1000px) rotateY(-90deg);
}

.door.opening .door-panel-right {
    transform: perspective(1000px) rotateY(90deg);
}

/* Door Page */
.door-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.content-container,
.riddle-container {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.content-container.fade-in,
.riddle-container.fade-in {
    opacity: 1;
    transform: scale(1);
}

/* Content Header */
.content-header {
    text-align: center;
    margin-bottom: 20px;
}

.content-header h2 {
    color: #667eea;
    font-size: 1.5rem;
    font-weight: 400;
}

/* Media */
.content-media-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.content-media {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.media-item {
    display: none;
    width: 100%;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.media-item.active {
    display: block;
    opacity: 1;
}

.content-media img,
.content-media video {
    width: 100%;
    border-radius: 8px;
    display: block;
}

/* Media Navigation */
.media-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}

.media-nav {
    background: #667eea;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.media-nav:hover {
    background: #5568d3;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.media-nav:active {
    transform: scale(0.95);
}

.media-nav span {
    display: block;
    line-height: 1;
    font-weight: bold;
}

/* Media Counter */
.media-counter {
    text-align: center;
    font-size: 0.95rem;
    color: #666;
    font-weight: 500;
    min-width: 60px;
}

/* Text Content */
.content-text {
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Riddle Styles */
.riddle-header h2 {
    text-align: center;
    color: #667eea;
    margin-bottom: 20px;
}

.riddle-question {
    font-size: 1.2rem;
    margin-bottom: 30px;
    text-align: center;
}

.riddle-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.riddle-option {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.riddle-option:hover {
    border-color: #667eea;
    background: #f5f5ff;
}

.riddle-option input[type="radio"] {
    margin-right: 12px;
}

.riddle-input input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
}

.riddle-input input:focus {
    outline: none;
    border-color: #667eea;
}

.riddle-attempts {
    text-align: center;
    margin: 20px 0;
    font-weight: bold;
    color: #666;
}

.riddle-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-secondary:hover {
    background: #d0d0d0;
}

.btn-back {
    background: #764ba2;
    color: white;
    text-decoration: none;
    display: inline-block;
}

.btn-back:hover {
    background: #633a87;
}

/* Riddle Solution */
.riddle-solution {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

.riddle-solution h3 {
    color: #667eea;
    margin-bottom: 10px;
}

.riddle-question-text {
    font-style: italic;
    color: #666;
    margin-bottom: 10px;
}

.solution-label {
    font-weight: bold;
    margin-bottom: 5px;
}

.solution-answer {
    color: #4b134f;
    font-size: 1.1rem;
    font-weight: bold;
}

.solution-note {
    font-size: 0.9rem;
    color: #999;
    font-style: italic;
}

/* Content Actions */
.content-actions {
    margin-top: 30px;
    text-align: center;
}

/* Message Container */
.message-container {
    text-align: center;
    color: white;
    font-size: 1.5rem;
    padding: 60px 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .calendar-header h1 {
        font-size: 2rem;
    }

    .door-large {
        max-width: 250px;
    }

    .doors-grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 15px;
    }

    .media-navigation {
        gap: 15px;
    }

    .media-nav {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .content-container,
    .riddle-container {
        padding: 20px;
    }
}

/* Reset Progress Button */
.reset-container {
    max-width: 1200px;
    margin: 30px auto 40px;
    padding: 0 20px;
    text-align: center;
}

.btn-reset {
    background: transparent;
    border: 1px solid #ddd;
    color: #999;
    padding: 8px 16px;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-reset:hover {
    border-color: #c44;
    color: #c44;
    background: #fff;
}

.btn-reset:active {
    transform: scale(0.98);
}
