:root {
    --wheel-size: 350px;
    /* Extra space for text */
    --primary-color: #ff6b6b;
    --secondary-color: #4ecdc4;
    --accent-color: #ffeaa7;
    --danger-color: #ff6b6b;
    --success-color: #4ecdc4;
    --bg-light: #f7f9fc;
    --text-dark: #2d3436;
    --font-heading: 'Playfair Display', serif;
}

.game-container {
    padding-top: 150px;
    min-height: 100vh;
    background: var(--bg-color, #f7f9fc);
    font-family: 'Outfit', sans-serif;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    z-index: 100;
}

.game-title {
    font-size: 1.5rem;
    margin: 0;
}

.highlight {
    color: var(--primary-color);
}

.game-area {
    margin-top: 100px;
    padding: 2rem 5%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.overlay {
    background: #fff;
    padding: 2rem;
    border-radius: 40px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    max-width: 400px;
    width: 90%;
}

.icon-circle {
    width: 80px;
    height: 80px;
    background: rgba(108, 92, 231, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin: 0 auto 1.5rem;
}

.hidden {
    display: none !important;
}

/* Wheels */
.wheels-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.wheel-box {
    text-align: center;
    position: relative;
    opacity: 0.6;
    /* Increased for better visibility */
    transition: opacity 0.3s;
}

.wheel-box.active {
    opacity: 1;
    transform: scale(1.05);
}

#topicWheelBox.active {
    filter: drop-shadow(0 0 15px rgba(74, 144, 226, 0.3));
}

#situationWheelBox.active {
    filter: drop-shadow(0 0 15px rgba(231, 76, 60, 0.3));
}

#emotionWheelBox.active {
    filter: drop-shadow(0 0 15px rgba(241, 196, 15, 0.3));
}

#timeWheelBox.active {
    filter: drop-shadow(0 0 15px rgba(46, 204, 113, 0.3));
}

.wheel {
    width: var(--wheel-size);
    height: var(--wheel-size);
    border-radius: 50%;
    border: 10px solid #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    transition: transform 4s cubic-bezier(0.1, 0, 0, 1);
}

.wheel-pointer {
    width: 40px;
    height: 40px;
    background: var(--danger-color);
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    z-index: 10;
    clip-path: polygon(100% 0, 0 0, 100% 100%);
    border-radius: 5px;
}

/* Results Card */
.result-board {
    background: #fff;
    padding: 2rem;
    border-radius: 30px;
    width: 100%;
    max-width: 600px;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.05);
}

.result-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.result-item {
    font-size: 1rem;
    padding: 0.8rem;
    background: var(--bg-light);
    border-radius: 15px;
}

.instruction {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.hindi-instruction {
    font-size: 0.9rem;
    color: #636e72;
}

/* Speaking UI */
.speaking-ui {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timer-container {
    position: relative;
    width: 150px;
    height: 150px;
    margin-bottom: 1.5rem;
}

.timer-svg {
    transform: rotate(-90deg);
}

.timer-bg {
    fill: none;
    stroke: #eee;
    stroke-width: 8;
}

.timer-progress {
    fill: none;
    stroke: var(--secondary-color);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 0.1s linear;
}

.timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-dark);
}

.countdown {
    font-size: 5rem;
    font-weight: 900;
    color: var(--primary-color);
    animation: scaleIn 0.5s infinite alternate;
}

@keyframes scaleIn {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.2);
    }
}

.mic-status {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #636e72;
    margin-bottom: 2rem;
}

.listening i {
    color: var(--danger-color);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.3);
        opacity: 0.7;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.silence-warning {
    color: var(--danger-color);
    font-weight: 700;
    margin-bottom: 1rem;
    animation: shake 0.5s;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

.btn-primary-alt {
    background: var(--primary-color);
    color: #fff;
    padding: 1.2rem 3.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.3);
}

.btn-primary-alt:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.4);
}

.controls {
    position: fixed;
    bottom: 4rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    justify-content: center;
    pointer-events: none;
    transition: opacity 0.4s, transform 0.4s;
}

.btn-spin {
    background: var(--secondary-color);
    color: #fff;
    padding: 1.2rem 4rem;
    border: none;
    border-radius: 50px;
    font-size: 2rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(78, 205, 196, 0.4);
    pointer-events: auto;
    border: 5px solid #fff;
    animation: btnPulse 2s infinite;
    transition: transform 0.3s, opacity 0.3s;
}

@keyframes btnPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.btn-spin:active {
    transform: scale(0.95);
    animation: none;
}

.btn-spin:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(1);
}

@media (max-width: 600px) {
    .game-container {
        padding-top: 100px;
    }

    .game-header {
        padding: 0.8rem 1rem;
        position: relative;
        top: 0;
    }

    .game-title {
        font-size: 1.1rem;
    }

    .game-area {
        margin-top: 20px;
        padding: 1rem;
    }

    .wheels-container {
        grid-template-columns: 1fr;
        gap: 3rem;
        padding-bottom: 100px;
        /* Space for floating button */
    }

    .result-board {
        padding: 1.5rem;
    }

    .result-items {
        grid-template-columns: 1fr;
    }

    :root {
        --wheel-size: 280px;
        /* Better size for mobile portrait */
    }

    .timer-container {
        width: 120px;
        height: 120px;
    }

    .timer-text {
        font-size: 2rem;
    }

    .btn-spin {
        padding: 1rem 3rem;
        font-size: 1.2rem;
    }
}

@media (max-width: 350px) {
    :root {
        --wheel-size: 240px;
    }
}