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

body {
    font-family: 'Arial', sans-serif;
    background: #000080;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,.03) 2px, rgba(255,255,255,.03) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(255,255,255,.03) 2px, rgba(255,255,255,.03) 4px);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.game-container {
    background: #c0c0c0;
    border: 4px ridge #ffffff;
    box-shadow: 8px 8px 0 #000000;
    max-width: 700px;
    width: 100%;
}

.title {
    background: #000080;
    color: #ffffff;
    padding: 15px;
    text-align: center;
    font-size: 32px;
    letter-spacing: 3px;
    border-bottom: 4px groove #808080;
}

.subtitle {
    background: #008080;
    color: #ffffff;
    padding: 10px;
    text-align: center;
    font-size: 14px;
    border-bottom: 2px solid #000000;
}

.game-area {
    padding: 30px;
    min-height: 400px;
    position: relative;
}

.instructions {
    background: #ffffff;
    border: 3px inset #808080;
    padding: 20px;
    margin-bottom: 20px;
}

.instructions h2 {
    color: #000080;
    font-size: 20px;
    margin-bottom: 15px;
}

.instructions p {
    color: #000000;
    margin: 8px 0;
    font-size: 14px;
}

.warning {
    color: #ff0000;
    font-weight: bold;
    margin-top: 15px !important;
}

.target-zone {
    background: #ffffff;
    border: 3px inset #808080;
    height: 250px;
    position: relative;
    margin-bottom: 20px;
    display: none;
}

.target-zone.active {
    display: block;
}

.target {
    position: absolute;
    width: 50px;
    height: 50px;
    background: #ff0000;
    border: 4px outset #ff6666;
    color: #ffffff;
    font-size: 10px;
    font-weight: bold;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-align: center;
    box-shadow: 3px 3px 0 #990000;
}

.target.visible {
    display: flex;
    animation: appear 0.1s ease-out;
}

.target:active {
    border-style: inset;
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 #990000;
}

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

.stats {
    background: #e0e0e0;
    border: 2px solid #000000;
    padding: 15px;
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: #000080;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 20px;
    color: #000000;
    font-weight: bold;
    font-family: 'Courier New', monospace;
}

.action-btn {
    width: 100%;
    height: 50px;
    background: #008080;
    border: 3px outset #ffffff;
    color: #ffffff;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    letter-spacing: 2px;
}

.action-btn:hover {
    background: #009999;
}

.action-btn:active {
    border-style: inset;
    background: #006666;
}

.action-btn:disabled {
    background: #808080;
    cursor: not-allowed;
    opacity: 0.6;
}

.message {
    margin-top: 15px;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    min-height: 25px;
}

.message.success {
    color: #008000;
}

.message.error {
    color: #ff0000;
}

.message.warning {
    color: #ff8800;
}

.cipher-reveal {
    display: none;
    padding: 30px;
    animation: slideIn 0.5s ease-out;
}

.cipher-reveal.visible {
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cipher-reveal h2 {
    color: #008000;
    text-align: center;
    font-size: 28px;
    margin-bottom: 15px;
}

.reveal-text {
    text-align: center;
    color: #000080;
    font-size: 16px;
    margin-bottom: 20px;
}

.cipher-box {
    background: #ffffff;
    border: 4px groove #808080;
    padding: 20px;
    margin-bottom: 20px;
}

.cipher-box h3 {
    color: #000080;
    text-align: center;
    font-size: 18px;
    margin-bottom: 15px;
    text-decoration: underline;
}

.cipher-grid {
    background: #000000;
    color: #00ff00;
    padding: 15px;
    border: 2px solid #008000;
    font-family: 'Courier New', monospace;
    margin-bottom: 15px;
}

.cipher-row {
    margin: 8px 0;
    display: flex;
    gap: 10px;
}

.cipher-label {
    font-weight: bold;
    color: #ffff00;
    min-width: 60px;
}

.cipher-letters {
    letter-spacing: 4px;
    font-size: 14px;
}

.cipher-symbols {
    letter-spacing: 4px;
    font-size: 16px;
}

.cipher-note {
    text-align: center;
    color: #ff0000;
    font-weight: bold;
    font-size: 14px;
}

.card-hint {
    background: #ffffe0;
    border: 3px solid #ffa500;
    padding: 15px;
    text-align: center;
    margin-bottom: 20px;
}

.card-hint p {
    color: #000000;
    font-size: 16px;
    margin: 8px 0;
}

.example {
    font-family: 'Courier New', monospace;
    color: #000080;
    font-weight: bold;
    font-size: 14px;
}
