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

.cesar-subtitle {
    color: var(--text-secondary);
    font-family: 'IM Fell DW Pica', serif;
    font-size: 1.2rem;
    font-style: italic;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Encoded message */
.cesar-encoded {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    color: var(--text-primary);
    letter-spacing: 4px;
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem 2rem;
    border: 1px solid rgba(93, 123, 85, 0.3);
    border-radius: 12px;
    background:
        radial-gradient(ellipse at center, rgba(93, 123, 85, 0.08) 0%, transparent 70%),
        rgba(255, 255, 255, 0.03);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(186, 212, 181, 0.05);
    word-break: break-all;
}

.cesar-encoded-label {
    display: block;
    font-family: 'IM Fell DW Pica', serif;
    font-size: 0.9rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    font-style: italic;
}

/* Wheel container */
.cesar-wheel-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin-bottom: 2rem;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.cesar-wheel-svg {
    width: 100%;
    height: 100%;
}

/* Outer ring letters */
.cesar-outer-letter {
    font-family: 'IM Fell French Canon', serif;
    font-size: 14px;
    fill: var(--text-muted);
    text-anchor: middle;
    dominant-baseline: central;
    pointer-events: none;
}

/* Inner ring */
.cesar-inner-ring {
    cursor: grab;
    transition: none;
}

.cesar-inner-ring:active {
    cursor: grabbing;
}

.cesar-inner-letter {
    font-family: 'IM Fell French Canon', serif;
    font-size: 14px;
    fill: var(--text-primary);
    text-anchor: middle;
    dominant-baseline: central;
    pointer-events: none;
    font-weight: bold;
}

/* Ring circles */
.cesar-ring-outer {
    fill: none;
    stroke: rgba(93, 123, 85, 0.3);
    stroke-width: 1.5;
}

.cesar-ring-inner-bg {
    fill: rgba(93, 123, 85, 0.06);
    stroke: rgba(93, 123, 85, 0.5);
    stroke-width: 1.5;
}

.cesar-ring-center {
    fill: rgba(45, 54, 47, 0.8);
    stroke: rgba(93, 123, 85, 0.4);
    stroke-width: 1;
}

/* Alignment marker */
.cesar-marker {
    fill: var(--text-primary);
    opacity: 0.8;
}

/* Shift controls */
.cesar-shift-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.cesar-shift-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--sage-green-dark);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'IM Fell French Canon', serif;
    line-height: 1;
}

.cesar-shift-btn:hover {
    background: var(--sage-green-dark);
    transform: translateY(-2px);
}

.cesar-shift-label {
    font-family: 'IM Fell DW Pica', serif;
    font-size: 1.1rem;
    color: var(--text-secondary);
    min-width: 100px;
    text-align: center;
}

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

.cesar-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;
}

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

.cesar-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);
}

.cesar-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;
}

.cesar-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);
}

.cesar-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 */
.cesar-victory-screen {
    position: relative;
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

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

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

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

/* Mobile */
@media (max-width: 768px) {
    .cesar-wheel-container {
        width: 260px;
        height: 260px;
    }

    .cesar-encoded {
        font-size: 1.5rem;
        letter-spacing: 3px;
    }

    .cesar-input-section {
        flex-direction: column;
        max-width: 300px;
    }

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

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

    .cesar-outer-letter,
    .cesar-inner-letter {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .cesar-wheel-container {
        width: 240px;
        height: 240px;
    }

    .cesar-victory-title {
        font-size: 2.2rem !important;
    }

    .cesar-outer-letter,
    .cesar-inner-letter {
        font-size: 11px;
    }
}

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

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

    .cesar-shift-btn {
        width: 48px;
        height: 48px;
    }
}
