/* Inherit main site styles */
html, body {
    height: 100%;
    overflow: hidden;
}

body {
    background-color: #33333f;
    margin: 0;
    min-height: 100vh;
    font-family: 'Space Mono', monospace;
    color: white;
}

#back-arrow {
    position: fixed;
    top: 16px;
    left: 20px;
    background: #44444f;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    padding: 8px 14px;
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 0;
    transition: gap 0.2s ease, background-color 0.3s ease;
}

#back-arrow .back-text {
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: max-width 0.2s ease, opacity 0.2s ease;
}

#back-arrow:hover .back-text {
    max-width: 150px;
    opacity: 1;
}

#back-arrow:not(:hover) {
    transition: gap 0.2s ease 0.4s, background-color 0.3s ease 0.4s;
}

#back-arrow:not(:hover) .back-text {
    transition: max-width 0.2s ease 0.4s, opacity 0.2s ease 0.4s;
}

#back-arrow .arrow {
    font-weight: bold;
}

.ai-note {
    font-size: 12px;
    color: #cccccc;
    text-align: center;
    margin-top: 4px;
    margin-bottom: 2px;
}

#game-section {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    text-align: center;
}

h1 {
    color: #f5a623;
    font-size: clamp(40px, 5vw, 90px);
    margin-bottom: 30px;
}

#start-screen {
    max-width: 600px;
    margin-bottom: 40px;
}

#start-screen p {
    color: #9a9aa3;
    font-size: 18px;
    margin-bottom: 30px;
    line-height: 1.6;
}

#start-game {
    background-color: #f5a623;
    color: #33333f;
    border: none;
    padding: 15px 30px;
    font-size: 18px;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Space Mono', monospace;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

#start-game:hover {
    background-color: #e6951a;
}

#game-container {
    max-width: 800px;
    width: 100%;
}

.color-display {
    width: 200px;
    height: 200px;
    border: 3px solid #f5a623;
    border-radius: 10px;
    margin: 20px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

/* Bigger color display during picking phase */
#color-picker-section .color-display {
    width: 300px;
    height: 300px;
}

#instructions {
    font-size: 18px;
    margin: 20px 0;
    color: #9a9aa3;
}

#color-picker-section {
    margin: 30px 0;
}

#color-picker-container {
    margin: 20px 0;
}

#color-picker {
    width: 220px;
    height: 220px;
    border: 3px solid #f5a623;
    border-radius: 14px;
    cursor: pointer;
    background: none;
    padding: 0;
    -webkit-appearance: none;
    appearance: none;
}

#color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
}

#color-picker::-webkit-color-swatch {
    border: none;
    border-radius: 12px;
}

#color-picker::-moz-color-swatch {
    border: none;
    border-radius: 12px;
}

#submit-guess {
    background-color: #f5a623;
    color: #33333f;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 20px;
    font-family: 'Space Mono', monospace;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

#submit-guess:hover {
    background-color: #e6951a;
}

.color-comparison {
    display: flex;
    justify-content: center;
    margin: 30px 0;
    gap: 12px;
}

.color-result {
    text-align: center;
    flex: 0 0 auto;
}

.color-result h3 {
    margin-bottom: 10px;
    color: #f5a623;
}

#score-display {
    margin: 30px 0;
}

#accuracy {
    font-size: 24px;
    font-weight: bold;
    color: #f5a623;
}

#feedback {
    font-style: italic;
    color: #9a9aa3;
    margin: 10px 0;
}

#play-again {
    background-color: #f5a623;
    color: #33333f;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 20px;
    font-family: 'Space Mono', monospace;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

#play-again:hover {
    background-color: #e6951a;
}

.hidden {
    display: none;
}

@media (max-width: 768px) {
    #game-section {
        padding: 20px 20px;
    }

    h1 {
        font-size: clamp(28px, 8vw, 50px);
    }

    .color-display {
        width: 150px;
        height: 150px;
    }

    #color-picker-section .color-display {
        width: 200px;
        height: 200px;
    }

    .color-comparison {
        flex-direction: column;
        gap: 30px;
    }
}