
:root {
    --bg-color-light: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --text-color-light: #fff;
    --container-bg-light: rgba(0, 0, 0, 0.8);
    --btn-draw-bg-light: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --btn-clear-bg-light: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

    --bg-color-dark: #2c3e50;
    --text-color-dark: #ecf0f1;
    --container-bg-dark: rgba(255, 255, 255, 0.1);
    --btn-draw-bg-dark: linear-gradient(135deg, #00F260 0%, #0575E6 100%);
    --btn-clear-bg-dark: linear-gradient(135deg, #1D2B64 0%, #F8CDDA 100%);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-color-light);
    color: var(--text-color-light);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    transition: background 0.3s, color 0.3s;
}

body[data-theme="dark"] {
    background: var(--bg-color-dark);
    color: var(--text-color-dark);
}

.container {
    background: var(--container-bg-light);
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 750px;
    transition: background 0.3s;
}

body[data-theme="dark"] .container {
    background: var(--container-bg-dark);
}

h1 {
    text-align: center;
    margin-bottom: 10px;
    font-size: 2.5em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.subtitle {
    text-align: center;
    color: #bbb;
    margin-bottom: 30px;
    font-size: 0.95em;
}

.controls {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

button {
    padding: 14px 30px;
    font-size: 1em;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-draw {
    background: var(--btn-draw-bg-light);
    color: white;
    flex: 1;
    min-width: 150px;
}

body[data-theme="dark"] .btn-draw {
    background: var(--btn-draw-bg-dark);
}

.btn-draw:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(245, 87, 108, 0.4);
}

.btn-draw:active {
    transform: translateY(0);
}

.btn-clear {
    background: var(--btn-clear-bg-light);
    color: white;
    min-width: 120px;
}

body[data-theme="dark"] .btn-clear {
    background: var(--btn-clear-bg-dark);
}

.btn-clear:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.game-count-selector {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
}

.game-count-btn {
    padding: 8px 15px;
    background: #333;
    border: 2px solid #555;
    color: #aaa;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9em;
}

.game-count-btn.active {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-color: #f5576c;
    color: white;
}

body[data-theme="dark"] .game-count-btn.active {
    background: linear-gradient(135deg, #00F260 0%, #0575E6 100%);
    border-color: #0575E6;
}

.game-count-btn:hover {
    border-color: #f093fb;
    color: #fff;
}

#results {
    min-height: 200px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.empty-message {
    grid-column: 1 / -1;
    text-align: center;
    color: #777;
    padding: 40px;
    font-size: 1.1em;
}

.game {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    padding: 20px;
    border-radius: 15px;
    border: 2px solid #3a7ca5;
    transition: all 0.3s;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.game:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(42, 82, 152, 0.4);
}

.game-header {
    font-size: 0.9em;
    color: #aaa;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.numbers {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.number {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1em;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    animation: popIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

@keyframes popIn {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    100% {
        transform: scale(1) rotate(360deg);
        opacity: 1;
    }
}

@keyframes spin {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}

.number.spin {
    animation: spin 0.6s ease-in-out;
}

.status {
    text-align: center;
    color: #aaa;
    margin-top: 20px;
    font-size: 0.9em;
    min-height: 20px;
}

.status.drawing {
    color: #f093fb;
    font-weight: bold;
    animation: pulse 1s infinite;
}

body[data-theme="dark"] .status.drawing {
    color: #00F260;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.theme-switch-wrapper {
    position: absolute;
    top: 20px;
    right: 20px;
}

.theme-switch {
    display: inline-block;
    height: 24px;
    position: relative;
    width: 50px;
}

.theme-switch input { display: none; }

.slider {
    background-color: #ccc;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
}

.slider:before {
    background-color: #fff;
    bottom: 4px;
    content: "";
    height: 16px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 16px;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.contact-container, .disqus-container {
    background: var(--container-bg-light);
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 750px;
    margin-top: 30px;
    transition: background 0.3s;
}

body[data-theme="dark"] .contact-container, body[data-theme="dark"] .disqus-container {
    background: var(--container-bg-dark);
}

.contact-container h2, .disqus-container h2 {
    text-align: center;
    margin-bottom: 10px;
    font-size: 2em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #bbb;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #555;
    background: #333;
    color: #fff;
    font-size: 1em;
}

.btn-submit {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    width: 100%;
    padding: 15px;
    font-size: 1.1em;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

body[data-theme="dark"] .btn-submit {
    background: linear-gradient(135deg, #00F260 0%, #0575E6 100%);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}
