/**
 * City Memory Challenge game styles.
 * Modern, engaging dark-themed design.
 */

/* Hide WordPress page title on the challenge page */
body.page-id-3561 .entry-title,
body.page-id-3561 h1.entry-title,
body.page-id-3561 .et_pb_title_container,
body.page-id-3561 #main-content > .container > article > h1,
body.page-id-3561 article.page > h1,
body.page-id-3561 .et_post_meta_wrapper h1,
body.page-id-3561 #main-content h1.entry-title {
    display: none !important;
}

/* Container - Full screen immersive */
.sw-memory-challenge {
    width: 100vw;
    max-width: 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
}

/* Screens */
.sw-memory-screen {
    display: none;
}

.sw-memory-screen.active {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
}

.sw-memory-content {
    text-align: center;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 24px;
}

/* ===================== */
/* START SCREEN - Hero   */
/* ===================== */
.sw-memory-start {
    background: linear-gradient(135deg, #0a0a0a 0%, #141414 50%, #1e1e1e 100%);
    position: relative;
    overflow: hidden;
}

/* Subtle pattern overlay */
.sw-memory-start::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
    pointer-events: none;
}

.sw-memory-start .sw-memory-content {
    position: relative;
    z-index: 1;
}

.sw-memory-logo {
    margin-bottom: 32px;
}

.sw-memory-logo svg {
    width: 100px;
    height: 100px;
    color: rgba(255,255,255,0.9);
    filter: drop-shadow(0 4px 20px rgba(255,255,255,0.2));
}

.sw-memory-title {
    font-size: 48px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 20px;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 4px 30px rgba(0,0,0,0.3);
}

.sw-memory-description {
    font-size: 18px;
    color: rgba(255,255,255,0.75);
    margin: 0 0 48px;
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.sw-memory-rules {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 40px;
    text-align: left;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
}

.sw-memory-rules h3 {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255,255,255,0.5);
    margin: 0 0 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.sw-memory-rules ol {
    margin: 0;
    padding-left: 0;
    list-style: none;
    counter-reset: rules;
}

.sw-memory-rules li {
    color: rgba(255,255,255,0.85);
    margin-bottom: 14px;
    line-height: 1.6;
    font-size: 15px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    counter-increment: rules;
}

.sw-memory-rules li::before {
    content: counter(rules);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #555555 0%, #333333 100%);
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.sw-memory-rules li:last-child {
    margin-bottom: 0;
}

/* Primary Button - Glowing CTA */
.sw-memory-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 48px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
    text-decoration: none;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.sw-memory-button-primary {
    background: linear-gradient(135deg, #ffffff 0%, #d0d0d0 100%);
    color: #111111;
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.2);
}

.sw-memory-button-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(255, 255, 255, 0.3);
}

.sw-memory-button-primary:active {
    transform: translateY(-1px);
}

.sw-memory-button-secondary {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: 2px solid rgba(255,255,255,0.3);
}

.sw-memory-button-secondary:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.5);
}

/* ===================== */
/* LOADING SCREEN        */
/* ===================== */
.sw-memory-loading {
    background: linear-gradient(135deg, #0a0a0a 0%, #141414 50%, #1e1e1e 100%);
}

.sw-memory-loading .sw-memory-content {
    padding: 80px 24px;
}

.sw-memory-loading-text {
    color: rgba(255,255,255,0.7);
    font-size: 18px;
    margin: 0 0 28px !important;
}

.sw-memory-est-timer {
    max-width: 320px;
    margin: 0 auto;
}

.sw-memory-est-bar {
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 12px;
}

.sw-memory-est-progress {
    height: 100%;
    background: linear-gradient(90deg, #444444 0%, #aaaaaa 100%);
    border-radius: 2px;
    width: 100%;
    transition: width 1s linear;
}

.sw-memory-est-label {
    font-size: 13px;
    color: rgba(255,255,255,0.45);
    text-align: center;
    margin: 0;
    letter-spacing: 0.5px;
}

.sw-memory-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255,255,255,0.1);
    border-top-color: #aaaaaa;
    border-radius: 50%;
    animation: sw-memory-spin 1s linear infinite;
    margin: 0 auto 32px;
}

@keyframes sw-memory-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===================== */
/* MEMORIZE SCREEN       */
/* ===================== */
.sw-memory-memorize {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
}

.sw-memory-timer-container {
    margin-bottom: 32px;
}

.sw-memory-timer-label {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255,255,255,0.5);
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.sw-memory-timer {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 12px;
}

#sw-memory-countdown {
    font-size: 80px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    text-shadow: 0 0 40px rgba(255, 255, 255, 0.3);
}

.sw-memory-timer-unit {
    font-size: 20px;
    color: rgba(255,255,255,0.6);
    font-weight: 500;
}

.sw-memory-timer-bar {
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
    margin: 24px auto;
    max-width: 400px;
}

.sw-memory-timer-progress {
    height: 100%;
    background: linear-gradient(90deg, #555555 0%, #aaaaaa 100%);
    transition: width 0.1s linear;
    width: 100%;
    border-radius: 4px;
}

.sw-memory-image-container {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0,0,0,0.5);
    margin-bottom: 32px;
    border: 4px solid rgba(255,255,255,0.1);
}

.sw-memory-image-container img {
    width: 100%;
    height: auto;
    display: block;
}

.sw-memory-hint {
    font-size: 15px;
    color: rgba(255,255,255,0.6);
    margin: 0;
    font-style: italic;
}

/* ===================== */
/* QUESTIONS SCREEN      */
/* ===================== */
.sw-memory-questions {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.sw-memory-question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: #ffffff;
    border-radius: 16px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.sw-memory-question-counter {
    font-size: 15px;
    font-weight: 700;
    color: #111111;
}

.sw-memory-score-display {
    font-size: 15px;
    font-weight: 700;
    color: #10b981;
}

.sw-memory-question-container {
    background: #ffffff;
    border: none;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 24px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.1);
}

.sw-memory-question-text {
    font-size: 22px;
    font-weight: 700;
    color: #111111;
    margin: 0 0 32px;
    line-height: 1.4;
}

.sw-memory-options {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sw-memory-option {
    display: block;
    padding: 20px 24px;
    background: #f5f5f5;
    border: 3px solid transparent;
    border-radius: 14px;
    text-align: left;
    font-size: 17px;
    font-weight: 500;
    color: #111111;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sw-memory-option:hover {
    border-color: #555555;
    background: #ebebeb;
    transform: translateX(8px);
}

.sw-memory-option.selected {
    border-color: #333333;
    background: #333333;
    color: #fff;
}

.sw-memory-option.correct {
    border-color: #10b981;
    background: #d1fae5;
    color: #065f46;
}

.sw-memory-option.incorrect {
    border-color: #ef4444;
    background: #fee2e2;
    color: #991b1b;
}

.sw-memory-option.disabled {
    pointer-events: none;
    opacity: 0.7;
}

/* Feedback */
.sw-memory-feedback {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 16px;
}

.sw-memory-feedback.correct {
    background: #d1fae5;
    color: #065f46;
}

.sw-memory-feedback.incorrect {
    background: #fee2e2;
    color: #991b1b;
}

/* ===================== */
/* RESULTS SCREEN        */
/* ===================== */
.sw-memory-results {
    background: linear-gradient(135deg, #0a0a0a 0%, #141414 50%, #1e1e1e 100%);
}

/* Force all text on the dark results screen to be visible */
.sw-memory-results .sw-memory-content,
.sw-memory-results .sw-memory-content * {
    color: rgba(255,255,255,0.85) !important;
}

/* Explicit overrides for specific elements */
.sw-memory-results-title,
.sw-memory-score-label,
.sw-memory-score-value,
.sw-memory-results h2,
.sw-memory-results h3,
.sw-memory-results p,
.sw-memory-results li,
.sw-memory-results ul,
.sw-memory-promo p {
    color: rgba(255,255,255,0.85) !important;
}

/* Score value big number - full white */
.sw-memory-results .sw-memory-score-value {
    color: #ffffff !important;
}

/* Results icon colours preserved */
.sw-memory-results-icon.gold { color: #fbbf24 !important; }
.sw-memory-results-icon.silver { color: #d1d5db !important; }
.sw-memory-results-icon.bronze { color: #f59e0b !important; }

.sw-memory-results-icon {
    margin-bottom: 32px;
}

.sw-memory-results-icon svg {
    width: 100px;
    height: 100px;
    filter: drop-shadow(0 8px 30px rgba(255,255,255,0.2));
}

.sw-memory-results-icon.gold {
    color: #fbbf24;
}

.sw-memory-results-icon.silver {
    color: #9ca3af;
}

.sw-memory-results-icon.bronze {
    color: #f59e0b;
}

.sw-memory-results-title {
    font-size: 36px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 32px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.sw-memory-final-score {
    display: inline-flex;
    flex-direction: column;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    padding: 32px 64px;
    border-radius: 20px;
    margin-bottom: 40px;
    border: 1px solid rgba(255,255,255,0.15);
}

.sw-memory-score-label {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 12px;
}

.sw-memory-score-value {
    font-size: 64px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
}

.sw-memory-score-breakdown {
    margin-bottom: 40px;
}

.sw-memory-results-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 56px;
    flex-wrap: wrap;
}

/* Promo Section */
.sw-memory-promo {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    max-width: 500px;
    margin: 0 auto;
}

.sw-memory-promo p {
    margin: 0 0 20px;
    color: rgba(255,255,255,0.7);
    font-size: 16px;
    line-height: 1.6;
}

/* ===================== */
/* RESPONSIVE            */
/* ===================== */
@media (max-width: 768px) {
    .sw-memory-challenge {
        min-height: auto;
    }
    
    .sw-memory-content {
        padding: 32px 20px;
    }

    .sw-memory-title {
        font-size: 28px;
        letter-spacing: 1px;
    }
    
    .sw-memory-description {
        font-size: 16px;
    }

    #sw-memory-countdown {
        font-size: 56px;
    }
    
    .sw-memory-rules {
        padding: 24px;
    }
    
    .sw-memory-button {
        padding: 16px 32px;
        font-size: 14px;
    }
    
    .sw-memory-question-container {
        padding: 24px;
    }
    
    .sw-memory-question-text {
        font-size: 18px;
    }
    
    .sw-memory-option {
        padding: 16px 20px;
        font-size: 15px;
    }
    
    .sw-memory-results-title {
        font-size: 24px;
    }
    
    .sw-memory-score-value {
        font-size: 48px;
    }
    
    .sw-memory-final-score {
        padding: 24px 40px;
    }
    
    .sw-memory-results-actions {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .sw-memory-title {
        font-size: 22px;
    }
    
    .sw-memory-logo svg {
        width: 70px;
        height: 70px;
    }
    
    .sw-memory-rules li {
        font-size: 14px;
    }
    
    .sw-memory-rules li::before {
