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

body {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(180deg, #2B0467 0%, #1a0033 100%);
    color: white;
    font-family: 'Press Start 2P', 'Courier New', monospace;
    position: relative;
}

.home-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    font-family: 'Press Start 2P', 'Courier New', monospace;
    font-size: 14px;
    color: #000;
    background-color: #FFE66D;
    border: none;
    padding: 12px 25px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    box-shadow: 
        0 0 0 4px #000,
        0 0 0 6px #FFE66D,
        0 6px 0 4px #000,
        0 6px 0 6px #C4A747;
    transition: all 0.1s ease;
    z-index: 100;
}

.home-btn:hover {
    background-color: #FFF4A3;
    box-shadow: 
        0 0 0 4px #000,
        0 0 0 6px #FFF4A3,
        0 6px 0 4px #000,
        0 6px 0 6px #D4B757;
}

.home-btn:active {
    transform: translateY(4px);
    box-shadow: 
        0 0 0 4px #000,
        0 0 0 6px #FFE66D,
        0 2px 0 4px #000,
        0 2px 0 6px #C4A747;
}

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2em;
    padding: 2em;
    max-width: 600px;
    width: 100%;
}

.stats {
    position: absolute;
    top: 20px;
    right: 20px;
    font-family: 'Press Start 2P', 'Courier New', monospace;
    font-size: 12px;
    color: #000;
    background-color: #FFE66D;
    padding: 12px 25px;
    box-shadow: 
        0 0 0 4px #000,
        0 0 0 6px #FFE66D,
        0 6px 0 4px #000,
        0 6px 0 6px #C4A747;
    z-index: 100;
}

/* Number Game Styles */
.number-game {
    text-align: center;
}

.number-display {
    font-size: 3rem;
    color: #FFE66D;
    margin: 20px 0;
    text-shadow: 
        -3px -3px 0 #000,
        3px -3px 0 #000,
        -3px 3px 0 #000,
        3px 3px 0 #000;
}

.input-group {
    display: flex;
    gap: 20px;
    margin: 20px 0;
}

input[type="number"], input[type="text"] {
    font-family: 'Press Start 2P', 'Courier New', monospace;
    font-size: 18px;
    color: #000;
    background-color: #fff;
    border: 4px solid #000;
    padding: 15px;
    width: 400px;
    text-align: center;
    box-shadow: 
        0 0 0 2px #FFE66D,
        0 6px 0 2px #000,
        0 6px 0 4px #FFE66D;
}

input:focus {
    outline: none;
    background-color: #FFF4A3;
}

button {
    font-family: 'Press Start 2P', 'Courier New', monospace;
    font-size: 18px;
    color: #000;
    background-color: #FFE66D;
    border: none;
    padding: 15px 40px;
    cursor: pointer;
    box-shadow: 
        0 0 0 4px #000,
        0 0 0 6px #FFE66D,
        0 8px 0 4px #000,
        0 8px 0 6px #C4A747;
    transition: all 0.1s ease;
}

button:hover {
    background-color: #FFF4A3;
    box-shadow: 
        0 0 0 4px #000,
        0 0 0 6px #FFF4A3,
        0 8px 0 4px #000,
        0 8px 0 6px #D4B757;
}

button:active {
    transform: translateY(4px);
    box-shadow: 
        0 0 0 4px #000,
        0 0 0 6px #FFE66D,
        0 4px 0 4px #000,
        0 4px 0 6px #C4A747;
}

.feedback {
    font-size: 14px;
    color: #FFE66D;
    min-height: 60px;
    margin: 20px 0;
    line-height: 1.6;
}

.guess-history {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
}

.guess-item {
    background-color: rgba(255, 230, 109, 0.2);
    border: 2px solid #FFE66D;
    padding: 10px 15px;
    font-size: 14px;
}

/* Wordle Styles */
.wordle-game {
    text-align: center;
}

.word-grid {
    display: grid;
    grid-template-rows: repeat(6, 60px);
    gap: 5px;
    margin: 20px auto;
}

.word-row {
    display: grid;
    grid-template-columns: repeat(5, 60px);
    gap: 5px;
    justify-content: center;
}

.letter-box {
    width: 60px;
    height: 60px;
    border: 3px solid #FFE66D;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    text-transform: uppercase;
    background-color: rgba(0, 0, 0, 0.3);
    box-shadow: 
        0 0 0 2px #000,
        0 4px 0 2px #000;
}

.letter-box.correct {
    background-color: #00ff00;
    border-color: #00ff00;
    color: #000;
}

.letter-box.present {
    background-color: #FFE66D;
    border-color: #FFE66D;
    color: #000;
}

.letter-box.absent {
    background-color: #333;
    border-color: #555;
    color: #999;
}

.letter-box.active {
    border-color: #fff;
    animation: pulse 0.5s ease-in-out;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.keyboard {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 20px auto;
    max-width: 500px;
}

.keyboard-row {
    display: flex;
    gap: 5px;
    justify-content: center;
}

.key {
    font-family: 'Press Start 2P', 'Courier New', monospace;
    font-size: 12px;
    color: #000;
    background-color: #FFE66D;
    border: none;
    padding: 15px;
    min-width: 40px;
    cursor: pointer;
    box-shadow: 
        0 0 0 2px #000,
        0 0 0 4px #FFE66D,
        0 4px 0 2px #000,
        0 4px 0 4px #C4A747;
    transition: all 0.1s ease;
}

.key:hover {
    background-color: #FFF4A3;
}

.key:active {
    transform: translateY(2px);
    box-shadow: 
        0 0 0 2px #000,
        0 0 0 4px #FFE66D,
        0 2px 0 2px #000,
        0 2px 0 4px #C4A747;
}

.key.wide {
    min-width: 80px;
    font-size: 10px;
}

.key.correct {
    background-color: #00ff00;
}

.key.present {
    background-color: #FFE66D;
}

.key.absent {
    background-color: #666;
    color: #999;
}

@media (max-width: 1366px) {
    .home-btn {
        font-size: 10px;
        padding: 10px 20px;
    }

    .stats {
        font-size: 10px;
    }

    button {
        font-size: 14px;
        padding: 12px 30px;
    }

    .number-display {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    body {
        min-height: 120vh;
    }

    .home-btn {
        font-size: 10px;
        padding: 10px 20px;
    }

    .stats {
        font-size: 10px;
    }

    button {
        font-size: 14px;
        padding: 12px 30px;
    }

    .number-display {
        font-size: 2rem;
    }

    input[type="number"], input[type="text"] {
        font-size: 14px;
        padding: 12px;
        width: 150px;
    }

    .word-row {
        grid-template-columns: repeat(5, 50px);
    }

    .letter-box {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .key {
        font-size: 10px;
        padding: 12px;
        min-width: 30px;
    }

    .key.wide {
        min-width: 60px;
        font-size: 8px;
    }
}