:root {
    --text-color: #ffffff;
    --muted-text: #cccccc;
    --bg-color: #1a1a1a;
    --pattern-color: #333333;
    --grid-bg: rgba(255,255,255,0.05);
    --grid-item-bg: rgba(255,255,255,0.1);
    --grid-item-hover: rgba(255,255,255,0.2);
    --grid-selected: #f81cde;
    --btn-text: #ffffff;
}

body {
    font-family: 'Montserrat', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--bg-color);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23333333' fill-opacity='0.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E");
    color: var(--text-color);
    padding: 20px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body[data-theme="light"] {
    --text-color: #1f1d1a;
    --muted-text: #5a4f45;
    --bg-color: #f7f1e7;
    --pattern-color: #d8cfc2;
    --grid-bg: rgba(90,79,69,0.08);
    --grid-item-bg: rgba(90,79,69,0.12);
    --grid-item-hover: rgba(90,79,69,0.18);
    --grid-selected: #f06c57;
    --btn-text: #ffffff;
}

body[data-theme="light"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23d9d3cc' fill-opacity='0.5' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E");
}

.container {
    text-align: center;
    width: 100%;
    max-width: 1100px;
}

.layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.main-content {
    flex: 1 1 0;
    min-width: 0;
}

.side-banner {
    width: 320px;
    position: sticky;
    top: 20px;
}

.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

header h1 {
    font-family: 'Roboto', sans-serif;
    font-size: 3.5rem;
    margin: 0;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.4), 0 0 25px rgba(255, 255, 255, 0.2);
}

header p {
    font-size: 1.1rem;
    color: var(--muted-text);
    margin-bottom: 30px;
}

.qr-link {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--muted-text);
    font-size: 0.9rem;
}

.qr-image {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    background: #ffffff;
    padding: 6px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

.qr-caption {
    font-weight: 600;
}

.page-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 30px;
}

.page-nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    transition: transform 0.2s ease, background 0.2s ease;
}

.page-nav a:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,0.16);
}

.intro {
    text-align: left;
    background: rgba(255,255,255,0.03);
    border-radius: 16px;
    padding: 22px;
    border: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 30px;
}

.intro p {
    margin: 12px 0 0;
    color: var(--muted-text);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.info-card {
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    padding: 14px;
    border: 1px solid rgba(255,255,255,0.08);
}

.info-card h3 {
    margin: 0 0 8px;
    font-size: 1rem;
}

.info-card p {
    margin: 0;
    color: var(--muted-text);
    font-size: 0.95rem;
}

.lotto-display {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
    perspective: 1000px;
    min-height: 80px;
}

@keyframes appear {
    from {
        transform: translateY(50px) rotateX(-90deg);
        opacity: 0;
    }
    to {
        transform: translateY(0) rotateX(0deg);
        opacity: 1;
    }
}

lotto-ball {
    animation: appear 0.5s ease-out forwards;
    opacity: 0;
}

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

.btn {
    padding: 15px 30px;
    font-size: 1.2rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    cursor: pointer;
    border: none;
    border-radius: 10px;
    color: var(--btn-text);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease-in-out;
}

.generate-btn {
    background: linear-gradient(145deg, #f81cde, #7e1cf8);
    box-shadow: 0 0 20px rgba(248, 28, 222, 0.6), 0 0 40px rgba(126, 28, 248, 0.4);
}

.clear-btn {
    background: linear-gradient(145deg, #ff5f6d, #ffc371);
    box-shadow: 0 0 20px rgba(255, 95, 109, 0.6), 0 0 40px rgba(255, 195, 113, 0.4);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

h2 {
    font-size: 1.5rem;
    color: var(--muted-text);
    margin-top: 40px;
    margin-bottom: 20px;
}

.guide {
    text-align: left;
    background: rgba(255,255,255,0.02);
    border-radius: 14px;
    padding: 20px;
    border: 1px solid rgba(255,255,255,0.06);
}

.steps {
    margin: 0;
    padding-left: 20px;
    color: var(--muted-text);
}

.faq {
    display: grid;
    gap: 16px;
}

.faq h3 {
    margin: 0 0 6px;
    font-size: 1rem;
}

.faq p {
    margin: 0;
    color: var(--muted-text);
}

.checklist {
    margin: 0;
    padding-left: 20px;
    color: var(--muted-text);
    display: grid;
    gap: 8px;
}

.policy h3,
.updates h3 {
    margin: 0 0 6px;
    font-size: 1rem;
}

.updates {
    display: grid;
    gap: 16px;
    color: var(--muted-text);
}

.inquiry {
    margin-top: 50px;
    padding: 20px;
    background: linear-gradient(145deg, rgba(255,255,255,0.05), rgba(0,0,0,0.15));
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.08);
}

.inquiry-subtitle {
    margin: 0 0 20px;
    color: var(--muted-text);
}

.comments {
    margin-top: 40px;
    padding: 20px;
    background: linear-gradient(145deg, rgba(255,255,255,0.04), rgba(0,0,0,0.18));
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.08);
}

.policy {
    text-align: left;
    margin-top: 40px;
    padding: 20px;
    border-radius: 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
}

body[data-theme="light"] .comments {
    background: linear-gradient(145deg, rgba(255,255,255,0.95), rgba(245,236,226,0.9));
    border: 1px solid rgba(90,79,69,0.2);
}

body[data-theme="light"] .intro,
body[data-theme="light"] .guide,
body[data-theme="light"] .policy {
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(90,79,69,0.2);
}

body[data-theme="light"] .page-nav a {
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(90,79,69,0.2);
}

body[data-theme="light"] .info-card {
    background: rgba(255,255,255,0.85);
    border: 1px solid rgba(90,79,69,0.2);
}

.tm-panel {
    padding: 20px;
    border-radius: 16px;
    background: linear-gradient(160deg, rgba(255,255,255,0.06), rgba(0,0,0,0.4));
    border: 1px solid rgba(255,255,255,0.12);
    text-align: left;
}

.tm-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.tm-status {
    font-size: 0.9rem;
    color: var(--muted-text);
}

.tm-preview {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 220px;
    background: rgba(0,0,0,0.25);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 16px;
    overflow: hidden;
}

.tm-preview canvas {
    width: 100%;
    height: auto;
    display: block;
}

.tm-labels {
    display: grid;
    gap: 8px;
    font-size: 0.95rem;
    color: var(--text-color);
}

body[data-theme="light"] .tm-panel {
    background: linear-gradient(160deg, rgba(255,255,255,0.95), rgba(236,228,218,0.9));
    border: 1px solid rgba(90,79,69,0.2);
}

body[data-theme="light"] .tm-preview {
    background: rgba(255,255,255,0.85);
    border: 1px solid rgba(90,79,69,0.2);
}

@media (max-width: 980px) {
    .layout {
        flex-direction: column;
    }

    .side-banner {
        width: 100%;
        position: static;
    }

    .tm-panel {
        text-align: center;
    }

    .hero {
        flex-direction: column;
        align-items: center;
    }

    .intro,
    .guide,
    .policy {
        text-align: center;
    }
}
.inquiry-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
    font-weight: 600;
    color: var(--muted-text);
}

.field span {
    font-size: 0.95rem;
}

.field input,
.field textarea {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(0,0,0,0.25);
    color: var(--text-color);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.field input:focus,
.field textarea:focus {
    border-color: rgba(248, 28, 222, 0.7);
    box-shadow: 0 0 0 3px rgba(248, 28, 222, 0.2);
    background: rgba(0,0,0,0.35);
}

.field textarea {
    resize: vertical;
}

.field.full {
    grid-column: 1 / -1;
}

.submit-btn {
    grid-column: 1 / -1;
    justify-self: center;
    background: linear-gradient(145deg, #ff8a00, #ff5f6d);
    box-shadow: 0 0 20px rgba(255, 138, 0, 0.4), 0 0 40px rgba(255, 95, 109, 0.35);
}

body[data-theme="light"] .inquiry {
    background: linear-gradient(145deg, rgba(255,255,255,0.9), rgba(246,238,228,0.85));
    border: 1px solid rgba(90,79,69,0.2);
}

body[data-theme="light"] .field input,
body[data-theme="light"] .field textarea {
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(90,79,69,0.25);
    color: #2b241f;
}

body[data-theme="light"] .field input:focus,
body[data-theme="light"] .field textarea:focus {
    border-color: rgba(240, 108, 87, 0.7);
    box-shadow: 0 0 0 3px rgba(240, 108, 87, 0.2);
    background: rgba(255,255,255,0.98);
}

@media (max-width: 620px) {
    .inquiry-form {
        grid-template-columns: 1fr;
    }
}
.number-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(45px, 1fr));
    gap: 10px;
    background-color: var(--grid-bg);
    padding: 15px;
    border-radius: 10px;
}

.grid-number {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 45px;
    background-color: var(--grid-item-bg);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.grid-number:hover {
    background-color: var(--grid-item-hover);
}

.grid-number.selected {
    background-color: var(--grid-selected);
    color: white;
    font-weight: bold;
    box-shadow: 0 0 10px var(--grid-selected);
}

.toggle-btn {
    background: linear-gradient(145deg, #1fb6ff, #7b2ff7);
    box-shadow: 0 0 20px rgba(31, 182, 255, 0.5), 0 0 40px rgba(123, 47, 247, 0.35);
}
