:root {
    --primary-pink: #FFB7B2;
    --soft-pink: #FFE9E8;
    --mint-green: #B5EAD7;
    --baby-blue: #C7CEEA;
    --cream: #FFFDF9;
    --text-color: #6B4C4C;
    --red-ball: #FF6B6B;
    --blue-ball: #4ECDC4;
    --yellow-ball: #FFE66D;
}

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

body {
    font-family: 'ZCOOL KuaiLe', cursive, sans-serif;
    background: linear-gradient(135deg, var(--soft-pink) 0%, var(--cream) 100%);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

header {
    text-align: center;
    margin-bottom: 10px;
}

header h1 {
    font-size: 2.5rem;
    color: var(--text-color);
    text-shadow: 2px 2px 0px #fff;
    margin-bottom: 5px;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 8px 32px 0 rgba(255, 183, 178, 0.37);
    border: 2px solid rgba(255, 255, 255, 0.8);
    transition: transform 0.3s ease;
}

.glass-panel:hover {
    transform: translateY(-2px);
}

.input-group {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 1.1rem;
    color: var(--text-color);
}

input[type="date"] {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    border: 2px solid var(--baby-blue);
    background: #fff;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-color);
    outline: none;
    transition: border-color 0.3s;
}

input[type="date"]:focus {
    border-color: var(--primary-pink);
}

.mode-selector {
    margin: 15px 0;
}

.mode-selector label {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 8px;
    display: block;
}

.radio-group {
    display: flex;
    gap: 15px;
}

.radio-label {
    flex: 1;
    background: white;
    padding: 10px;
    border-radius: 12px;
    border: 2px solid var(--baby-blue);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.radio-label:hover {
    border-color: var(--primary-pink);
    background: var(--soft-pink);
}

.radio-label input {
    display: none;
}

.radio-label input:checked+span {
    color: var(--text-color);
    font-weight: bold;
}

.radio-label input:checked~small {
    color: var(--red-ball);
}

.radio-label input:checked+span::before {
    content: '🌸 ';
}

.radio-label span {
    font-size: 1.1rem;
    display: block;
}

.radio-label small {
    font-size: 0.8rem;
    color: #888;
    margin-top: 4px;
}

/* Selected State Style override parent hover if needed, but handled mostly by input:checked logic above */
.radio-label:has(input:checked) {
    border-color: var(--primary-pink);
    background: #fff0f5;
    box-shadow: 0 4px 10px rgba(255, 183, 178, 0.3);
}

.lottery-type-selector {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.type-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 12px;
    background: white;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.type-btn.active {
    background: var(--primary-pink);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 183, 178, 0.5);
}

.generate-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(45deg, var(--primary-pink), var(--baby-blue));
    border: none;
    border-radius: 50px;
    color: white;
    font-family: inherit;
    font-size: 1.3rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.generate-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.generate-btn:active {
    transform: scale(0.98);
}

.balls-container {
    min-height: 100px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.ball {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    box-shadow: inset -5px -5px 15px rgba(0, 0, 0, 0.1), 0 5px 10px rgba(0, 0, 0, 0.1);
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    opacity: 0;
}

.ball.red {
    background: var(--red-ball);
}

.ball.blue {
    background: var(--blue-ball);
}

.ball.yellow {
    background: var(--yellow-ball);
    color: #8a6d3b;
}

@keyframes popIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.message-box {
    margin-top: 15px;
    text-align: center;
    font-size: 0.9rem;
    color: #888;
    min-height: 1.2em;
}

.placeholder-text {
    color: #aaa;
    font-style: italic;
}

footer {
    text-align: center;
    color: #aaa;
    margin-top: 20px;
}