/* Easter Egg Styles - Wedding Theme Unified */

.easter-egg-modal {
    display: block;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(5px);
}

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

.modal-content {
    position: relative;
    background: #ffffff;
    margin: 5% auto;
    padding: 40px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.4s ease;
    color: #333;
}

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

.close-modal {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: 300;
    color: #999;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f5f5f5;
}

.close-modal:hover {
    color: #333;
    background: #eee;
    transform: rotate(90deg);
}

/* Scrollbar styling */
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

/* ==================== */
/* TMI Modal - Elegant Theme */
/* ==================== */
.tmi-content {
    background: linear-gradient(180deg, #fff 0%, #faf8f5 100%);
    border-top: 4px solid #d4a574;
}

.tmi-content h2 {
    text-align: center;
    margin-bottom: 10px;
    font-size: 1.8rem;
    font-weight: 400;
    color: #2c3e50;
    letter-spacing: 2px;
}

.tmi-subtitle {
    text-align: center;
    font-size: 1rem;
    margin-bottom: 30px;
    color: #888;
    font-weight: 300;
}

.tmi-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-top: 20px;
}

.tmi-person {
    background: #fff;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #f0ebe5;
}

.tmi-person h3 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.2rem;
    color: #d4a574;
    font-weight: 500;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0ebe5;
}

.tmi-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tmi-list li {
    padding: 12px 15px;
    margin: 8px 0;
    background: #faf8f5;
    border-radius: 10px;
    border-left: 3px solid #d4a574;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
}

.tmi-list li:hover {
    transform: translateX(5px);
    background: #f5f0ea;
    box-shadow: 0 2px 10px rgba(212, 165, 116, 0.1);
}

.tmi-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #f0ebe5;
    font-size: 1rem;
    color: #d4a574;
}

/* ==================== */
/* Name Game Modal */
/* ==================== */
.name-game-content {
    background: linear-gradient(180deg, #fff 0%, #faf8f5 100%);
    border-top: 4px solid #d4a574;
}

.name-game-content h2 {
    text-align: center;
    margin-bottom: 10px;
    font-size: 1.6rem;
    font-weight: 400;
    color: #2c3e50;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0 20px;
    padding: 0 10px;
}

.game-level {
    font-size: 1.1rem;
    font-weight: 500;
    color: #d4a574;
    margin: 0;
}

.game-timer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    background: #f5f5f5;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.timer-icon {
    font-size: 1.1rem;
}

.game-timer.timer-warning {
    color: #f39c12;
    background: #fef9e7;
    animation: pulse 1s infinite;
}

.game-timer.timer-critical {
    color: #e74c3c;
    background: #fdeaea;
    animation: pulse 0.5s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.game-instruction {
    text-align: center;
    margin: 20px 0;
    font-size: 1rem;
    color: #666;
}

.name-grid {
    display: grid;
    gap: 12px;
    margin: 30px 0;
    padding: 0 10px;
}

.name-grid.level-1 { grid-template-columns: repeat(2, 1fr); }
.name-grid.level-2 { grid-template-columns: repeat(4, 1fr); }
.name-grid.level-3 { grid-template-columns: repeat(4, 1fr); }
.name-grid.level-4 { grid-template-columns: repeat(6, 1fr); }
.name-grid.level-5 { grid-template-columns: repeat(6, 1fr); }

.name-option {
    padding: 14px 10px;
    background: #fff;
    border: 2px solid #f0ebe5;
    border-radius: 12px;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333;
    font-weight: 500;
}

.name-option:hover {
    border-color: #d4a574;
    background: #faf8f5;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212, 165, 116, 0.15);
}

.name-option:active {
    transform: translateY(0);
}

.game-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 30px 50px;
    border-radius: 16px;
    font-size: 1.2rem;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 100;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.game-message.show {
    opacity: 1;
}

.correct-message {
    color: #4caf50;
    margin: 0;
}

.wrong-message {
    color: #e57373;
    margin: 0;
}

/* ==================== */
/* Complete Modal */
/* ==================== */
.complete-content {
    background: linear-gradient(180deg, #fff 0%, #faf8f5 100%);
    border-top: 4px solid #d4a574;
    text-align: center;
}

.complete-content h2 {
    margin-bottom: 25px;
    font-size: 1.6rem;
    font-weight: 400;
    color: #2c3e50;
}

.score-display {
    background: #faf8f5;
    border-radius: 16px;
    padding: 25px;
    margin: 25px 0;
    border: 1px solid #f0ebe5;
}

.score-display p {
    margin: 12px 0;
    font-size: 1.1rem;
    color: #555;
}

.score-display strong {
    color: #d4a574;
}

.ranking-form {
    margin: 30px 0;
}

.ranking-form p {
    color: #666;
    margin-bottom: 15px;
}

.ranking-form input {
    width: 60%;
    padding: 14px 20px;
    font-size: 1rem;
    border: 2px solid #f0ebe5;
    border-radius: 12px;
    margin: 10px 0;
    transition: border-color 0.3s ease;
}

.ranking-form input:focus {
    outline: none;
    border-color: #d4a574;
}

.ranking-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.ranking-buttons button {
    padding: 14px 35px;
    font-size: 1rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.ranking-buttons button:first-child {
    background: #d4a574;
    color: white;
}

.ranking-buttons button:first-child:hover {
    background: #c49464;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212, 165, 116, 0.3);
}

.ranking-buttons button:last-child {
    background: #f5f5f5;
    color: #666;
}

.ranking-buttons button:last-child:hover {
    background: #eee;
}

/* ==================== */
/* Ranking List */
/* ==================== */
.ranking-list {
    margin-top: 30px;
    background: #fff;
    border-radius: 16px;
    padding: 25px;
    border: 1px solid #f0ebe5;
    max-height: 300px;
    overflow-y: auto;
    text-align: left;
}

.ranking-list h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #d4a574;
    font-size: 1.3rem;
    font-weight: 500;
}

.ranking-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ranking-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    margin: 8px 0;
    background: #faf8f5;
    border-radius: 10px;
    transition: background 0.3s ease;
}

.ranking-item:hover {
    background: #f5f0ea;
}

.rank-medal {
    font-size: 1.2rem;
    min-width: 35px;
}

.rank-name {
    flex: 1;
    font-weight: 500;
    margin: 0 15px;
    color: #333;
}

.rank-time {
    font-weight: 600;
    color: #d4a574;
    margin-right: 15px;
}

.rank-mistakes {
    color: #999;
    font-size: 0.9rem;
}

/* ==================== */
/* Mobile Responsive */
/* ==================== */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 8% auto;
        padding: 25px;
    }

    .tmi-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .tmi-content h2,
    .name-game-content h2,
    .complete-content h2 {
        font-size: 1.4rem;
    }

    .name-grid.level-3,
    .name-grid.level-4,
    .name-grid.level-5 {
        grid-template-columns: repeat(3, 1fr);
    }

    .name-option {
        padding: 12px 8px;
        font-size: 0.95rem;
    }

    .ranking-form input {
        width: 80%;
    }

    .ranking-buttons {
        flex-direction: column;
        align-items: center;
    }

    .ranking-buttons button {
        width: 200px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        margin: 15% auto;
        padding: 20px;
    }

    .tmi-content h2,
    .name-game-content h2,
    .complete-content h2 {
        font-size: 1.2rem;
    }

    .name-grid.level-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .name-grid.level-3,
    .name-grid.level-4,
    .name-grid.level-5 {
        grid-template-columns: repeat(2, 1fr);
    }

    .name-option {
        font-size: 0.85rem;
        padding: 10px 5px;
    }

    .tmi-list li {
        font-size: 0.9rem;
        padding: 10px 12px;
    }
}
