/* Code Secret Game */
.code-game-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeIn 1s ease-out;
    max-width: 100%;
}

.code-subtitle {
    color: var(--text-secondary);
    font-family: 'IM Fell DW Pica', serif;
    font-size: 1.3rem;
    font-style: italic;
    margin-bottom: 2rem;
}

/* Input Section */
.code-input-section {
    display: flex;
    gap: 1rem;
    align-items: center;
    width: 100%;
    max-width: 400px;
    justify-content: center;
}

.code-input {
    padding: 12px 24px;
    border: 2px solid var(--sage-green-dark);
    border-radius: 30px;
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--cream-light);
    font-family: 'IM Fell DW Pica', serif;
    font-size: 1.1rem;
    outline: none;
    transition: all 0.3s ease;
    flex: 1;
    text-align: center;
}

.code-input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.code-input:focus {
    border-color: var(--sage-green-light);
    background-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 12px rgba(93, 123, 85, 0.3);
}

.code-validate-button {
    padding: 12px 28px;
    background-color: var(--sage-green-dark);
    color: var(--cream-light);
    border: none;
    border-radius: 30px;
    font-family: 'IM Fell DW Pica', serif;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px var(--shadow-color);
    white-space: nowrap;
}

.code-validate-button:hover {
    background-color: var(--sage-green-light);
    color: var(--forest-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-color-dark);
}

.code-error {
    color: #e07a5f;
    font-family: 'IM Fell DW Pica', serif;
    font-size: 1.1rem;
    margin-top: 1.5rem;
    animation: fadeIn 0.3s ease-out;
}

/* Victory Screen */
.code-victory-screen {
    position: relative;
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.code-confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.code-victory-content {
    text-align: center;
    animation: fadeInScale 0.8s ease-out;
    z-index: 5;
}

.code-victory-title {
    font-size: 4rem !important;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .code-input-section {
        flex-direction: column;
        max-width: 300px;
    }

    .code-input {
        width: 100%;
        box-sizing: border-box;
    }

    .code-victory-title {
        font-size: 2.8rem !important;
    }
}

@media (max-width: 480px) {
    .code-victory-title {
        font-size: 2.2rem !important;
    }
}

/* Touch-friendly */
@media (hover: none) and (pointer: coarse) {
    .code-input {
        min-height: 44px;
    }

    .code-validate-button {
        min-height: 44px;
    }
}
