/* Page background */
.page-bg {
    min-height: 100vh;
    background: radial-gradient(circle at top, #1f1c2c, #0f0c29);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

/* Container */
.dice-container {
    text-align: center;
    width: 100%;
    max-width: 420px;
}

/* Title */
h1 {
    color: #9d8cff;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 15px rgba(157,140,255,0.6);
}

.subtitle {
    color: #cfd3ff;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* Game card */
.dice-card {
    background: linear-gradient(145deg, #1b1b2f, #23235a);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    overflow: hidden;
}

/* Glow border animation */
.dice-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, #7a5cff, #00c6ff, #01f2fa);
    z-index: -1;
    filter: blur(25px);
    opacity: 0.6;
}

/* Input */
#guess-input {
    width: 100%;
    padding: 0.7rem;
    border-radius: 8px;
    border: none;
    outline: none;
    margin-bottom: 1rem;
    font-size: 1rem;
    text-align: center;
}

/* Buttons */
button {
    width: 100%;
    padding: 0.7rem;
    margin-top: 0.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(45deg, #7a5cff, #00c6ff);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Hover animation */
button:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 0 20px rgba(0,198,255,0.8);
}

/* Result text */
#dice-result {
    margin-top: 1rem;
    font-size: 1.1rem;
    color: #01f2fa;
    min-height: 1.5rem;
}

/* Score board */
.score-board {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
}

.score {
    font-size: 0.95rem;
    color: #fff;
}

.win span {
    color: #4cff7a;
    font-weight: bold;
}

.miss span {
    color: #ff6b6b;
    font-weight: bold;
}

/* Reset button */
#reset-btn {
    background: linear-gradient(45deg, #ff6b6b, #ffa36c);
    margin-top: 1rem;
}

/* Back link */
.back-link {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.6rem 1.2rem;
    background: linear-gradient(45deg, #7a5cff, #00c6ff);
    color: #000;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: transform 0.2s ease;
}

.back-link:hover {
    transform: scale(1.05);
}

/* Responsive */
@media (max-width: 480px) {
    .dice-card {
        padding: 1.5rem 1rem;
    }

    h1 {
        font-size: 1.5rem;
    }
}
