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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #FF8C42 0%, #FF6B9D 35%, #C73866 70%, #8B5CF6 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 20px 15px;
    overflow-x: hidden;
}

.container {
    max-width: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    text-align: center;
    color: white;
    font-size: 3.5rem;
    margin-bottom: 10px;
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 
        3px 3px 0px #1e3a8a,
        4px 4px 0px #1e40af,
        5px 5px 0px #1e40af,
        0 0 30px rgba(255, 255, 255, 0.3);
    transform: rotate(-2deg);
}

.tagline {
    text-align: center;
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 8px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    font-weight: 400;
    margin-bottom: 35px;
}

.wheel-container {
    position: relative;
    width: 90vw;
    height: 90vw;
    max-width: 500px;
    max-height: 500px;
    margin: 0 auto;
}

.wheel-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

#wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}

.pointer {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-top: 40px solid #FFD700;
    filter: drop-shadow(0 3px 5px rgba(0,0,0,0.4));
    z-index: 10;
}

.center-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #4A90E2, #2C5282);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 16px;
    text-align: center;
    border: 8px solid #1a365d;
    box-shadow: 0 0 20px rgba(0,0,0,0.4);
    z-index: 5;
    line-height: 1.3;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    user-select: none;
}

.center-circle:hover {
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 0 0 25px rgba(74, 144, 226, 0.6);
}

.center-circle:active {
    transform: translate(-50%, -50%) scale(0.98);
}

.center-circle.spinning {
    pointer-events: none;
    opacity: 0.8;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.card-flip-container {
    width: 90%;
    max-width: 450px;
    position: relative;
    perspective: 1000px;
    animation: cardEntrance 0.6s ease;
}

.card-flipper {
    position: relative;
    width: 100%;
    transition: transform 0.6s ease;
    transform-style: preserve-3d;
}

.card-flipper.flipped {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    background: white;
    border-radius: 24px;
    padding: 40px 30px 35px;
    box-shadow: 0 25px 80px rgba(0,0,0,0.6);
    border: 3px solid #f0f0f0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.card-front {
    text-align: center;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    transform: rotateY(180deg);
    max-height: 85vh;
    overflow-y: auto;
}

.close-button {
    position: absolute;
    top: 12px;
    right: 18px;
    font-size: 34px;
    font-weight: 300;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
    line-height: 1;
    user-select: none;
    z-index: 10;
}

.close-button:hover {
    color: #666;
    transform: scale(1.1);
}

.close-button:active {
    transform: scale(0.95);
}

#resultFront {
    text-align: center;
    margin-bottom: 25px;
}

#resultFront h2 {
    color: #888;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.reveal-button {
    background: linear-gradient(135deg, #FF8C42, #FF6B9D, #8B5CF6);
    color: white;
    border: none;
    padding: 16px 50px;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 700;
    font-family: 'Fredoka', sans-serif;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.reveal-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 157, 0.6);
}

.reveal-button:active {
    transform: translateY(0);
}

#resultContainer {
    text-align: center;
}

#resultContainer h2 {
    color: #888;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.result-category {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 25px;
    font-weight: bold;
    margin-bottom: 20px;
    font-size: 17px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.category-wild-solo,
.category-wild-group {
    background: linear-gradient(135deg, #FF9800, #FB8C00);
    color: white;
}

.category-real-question,
.category-real-solo,
.category-real-group {
    background: linear-gradient(135deg, #E91E63, #D81B60);
    color: white;
}

.category-deep-solo,
.category-deep-group {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
}

.result-prompt {
    font-size: 18px;
    line-height: 1.7;
    color: #444;
    white-space: pre-wrap;
    text-align: left;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 16px;
    border-left: 4px solid #ddd;
}

.challenge-title {
    font-size: 22px;
    font-weight: 700;
    display: block;
    margin-bottom: 10px;
    color: #222;
}

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

@keyframes cardEntrance {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Smaller mobile devices */
@media (max-width: 400px) {
    h1 {
        font-size: 2em;
    }

    .center-circle {
        width: 100px;
        height: 100px;
        font-size: 14px;
    }

    .card-front,
    .card-back {
        padding: 35px 25px 30px;
        border-radius: 20px;
    }

    #resultContainer h2,
    #resultFront h2 {
        font-size: 12px;
    }

    .result-prompt {
        font-size: 17px;
        padding: 18px;
    }

    .result-category {
        font-size: 15px;
        padding: 8px 20px;
    }

    .reveal-button {
        font-size: 1rem;
        padding: 14px 40px;
    }
}

/* Timer styles */
#timerContainer {
    margin-top: 20px;
}

.timer-button {
    width: 100%;
    padding: 18px;
    font-size: 1.1rem;
    border-radius: 16px;
    border: 3px solid;
    cursor: pointer;
    color: white;
    font-weight: 600;
    transition: transform 0.1s;
    position: relative;
    overflow: hidden;
    background: transparent;
}

.timer-button:active {
    transform: scale(0.98);
}

.timer-fill {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    transition: width 0.05s linear;
    z-index: 1;
    border-radius: 13px;
}

.timer-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.timer-time {
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.timer-button.active .timer-time {
    opacity: 1;
}

.timer-wild {
    border-color: #FC6C3F;
}

.timer-wild .timer-fill {
    background: linear-gradient(135deg, #FF9A44 0%, #FC6C3F 100%);
}

.timer-real {
    border-color: #F54EA2;
}

.timer-real .timer-fill {
    background: linear-gradient(135deg, #F54EA2 0%, #FF7676 100%);
}

.timer-deep {
    border-color: #2196F3;
}

.timer-deep .timer-fill {
    background: linear-gradient(135deg, #4FC3F7 0%, #2196F3 100%);
}

/* Spotify section */
.spotify-section {
    max-width: 500px;
    width: 90%;
    margin: 40px auto 30px;
    padding: 0 20px;
}

.spotify-header {
    color: white;
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 15px;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.spotify-section iframe {
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
    border-radius: 12px;
}

/* Amazon Promo Modal */
.promo-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.promo-modal.active {
    display: flex;
}

.promo-card {
    background: linear-gradient(135deg, #FF8C42 0%, #FF6B9D 50%, #8B5CF6 100%);
    border-radius: 20px;
    padding: 40px 30px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: popIn 0.3s ease-out;
}

@keyframes popIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.promo-card .close-button {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.promo-card .close-button:hover {
    opacity: 1;
}

.promo-title {
    color: white;
    font-size: 2rem;
    font-family: 'Fredoka', sans-serif;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.promo-body {
    color: white;
    font-size: 1.3rem;
    margin-bottom: 25px;
    opacity: 0.95;
}

.promo-button {
    display: inline-block;
    background: #FF9900;
    color: #111;
    font-size: 1.2rem;
    font-weight: bold;
    padding: 15px 40px;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(255, 153, 0, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.promo-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 153, 0, 0.6);
}

/* Landscape orientation */
@media (max-height: 600px) and (orientation: landscape) {
    body {
        justify-content: center;
    }

    h1 {
        font-size: 1.8em;
        margin-bottom: 15px;
    }

    .wheel-container {
        width: 50vh;
        height: 50vh;
        margin-bottom: 15px;
    }
}
