:root {
    --primary: #4a90e2;
    --secondary: #357abd;
    --text: #333;
    --light-bg: #f5f5f5;
    --white: #ffffff;
    --red: #e74c3c;
    --green: #2ecc71;
}

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

body {
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #4a90e2, #357abd);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.game-container {
    background: var(--white);
    border-radius: 16px;
    padding: 2rem;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.game-instructions {
    text-align: center;
    padding: 2rem;
}

.game-instructions h2 {
    color: var(--primary);
    font-size: 2rem;
    margin-bottom: 2rem;
}

.game-instructions ul {
    list-style: none;
    margin-bottom: 2rem;
    text-align: left;
    padding-left: 2rem;
}

.game-instructions li {
    margin: 1rem 0;
    font-size: 1.2rem;
    color: var(--text);
    position: relative;
}

.game-instructions li:before {
    content: "•";
    color: var(--primary);
    font-weight: bold;
    position: absolute;
    left: -1.5rem;
}

.start-btn, .restart-btn, .guess-btn {
    font-size: 1.5rem;
    padding: 1rem 3rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.start-btn:hover, .restart-btn:hover, .guess-btn:hover {
    background: var(--secondary);
}

.game-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    font-size: 1.2rem;
    color: var(--text);
}

.guess-history {
    margin: 2rem 0;
    max-height: 300px;
    overflow-y: auto;
}

.guess-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    margin: 0.5rem 0;
    background: var(--light-bg);
    border-radius: 8px;
    font-size: 1.2rem;
}

.guess-number {
    font-weight: bold;
    color: var(--primary);
}

.guess-result {
    color: var(--secondary);
}

.input-section {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
}

#guessInput {
    flex: 1;
    font-size: 1.5rem;
    padding: 1rem;
    border: 2px solid var(--primary);
    border-radius: 8px;
    text-align: center;
    letter-spacing: 0.5rem;
}

.guess-btn {
    padding: 1rem 2rem;
    font-size: 1.2rem;
}

.game-result {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--white);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.game-result h2 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.game-result p {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.secret-code {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary);
    margin: 1.5rem 0;
    letter-spacing: 0.5rem;
}

.hidden {
    display: none;
}

@media (max-width: 768px) {
    .game-container {
        padding: 1rem;
    }

    .input-section {
        flex-direction: column;
    }

    #guessInput {
        width: 100%;
    }

    .guess-btn {
        width: 100%;
    }
}
