:root {
    --primary: #4CAF50;
    --danger: #E53935;
    --background: #f5f7fa;
    --card: white;
}

body {
    background: var(--background);
    margin: 0;
    padding: 10px;
    /* font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif; */
    font-family: 'Inter', sans-serif;
}

/* HEADER */
.header {
    display: flex;
    background: var(--primary);
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
}

.header a {
    font-weight: 600;
    text-decoration: none;
    color: white;
    padding: 12px;
    border-right: 1px solid rgba(255, 255, 255, 0.3);
}

.header a:hover {
    background: #388E3C;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
}

/* CARD */
.card {
    background: var(--card);
    border-radius: 12px;
    padding: 16px;
    margin: 15px 0;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

/* TITLE */
.title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.lottologo {
    text-align: center;
    font-size: .9rem;
    color: #00000069;
}

/* NUMBERS */
.huzottszamok,
.teszamaid,
.talalatok {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.huzottszam,
.teszamod {
    height: 40px;
    width: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    border: 2px solid transparent;
    transition: 0.2s;
}

/* lotto numbers */
.huzottszam {
    background: #eee;
    color: black;
}

.huzottszam:hover {
    transform: scale(1.1);
}

/* user numbers */
.teszamod {
    background: #eee;
}

.teszamod.talalt {
    background: var(--primary);
    color: white;
    animation: pop 0.3s ease;
}

.teszamod.nemtalalt {
    background: var(--danger);
    color: white;
}

/* RESULT */
.eredmeny {
    margin-top: 20px;
    padding: 12px;
    border-radius: 8px;
    font-weight: bold;
    text-align: center;
}

.vantalalat {
    background: var(--primary);
    color: white;
}

.nincstalalat {
    background: var(--danger);
    color: white;
}

/* MODAL */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background: white;
    margin: 10% auto;
    padding: 20px;
    width: 320px;
    border-radius: 12px;
    text-align: center;
}

input.teszamod {
    margin: 5px;
    font-size: 16px;
}

.close {
    float: right;
    font-size: 24px;
    cursor: pointer;
}

/* animation */
@keyframes pop {
    0% {
        transform: scale(0.7);
    }

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

/* MOBILE */
@media (max-width: 600px) {

    .huzottszam,
    .teszamod {
        width: 34px;
        height: 34px;
    }

    .modal-content {
        width: 90%;
        margin-top: 30%;
    }

    .header a {
        flex: 1;
        text-align: center;
        align-self: center;
    }
}

/* PREVIOUS RESULTS */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.06);
    font-weight: 600;
}

.stat-card span {
    display: block;
    font-size: 22px;
    margin-top: 4px;
}

.stat-1 {
    border-left: 5px solid #bbb;
}

.stat-2 {
    border-left: 5px solid #7dbf5f;
}

.stat-3 {
    border-left: 5px solid #4CAF50;
}

.stat-4 {
    border-left: 5px solid #2E7D32;
}

.stat-5 {
    border-left: 5px solid gold;
}

/* HISTORY LIST */

.history-list {
    margin-top: 10px;
    padding-left: 15px;
}

.history-list li {
    margin-bottom: 6px;
}

/* HOT NUMBERS */

.hot-list {
    margin-top: 12px;
}

.hot-row {
    margin-bottom: 10px;
}

.hot-label {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    margin-bottom: 4px;
}

.hot-bar {
    height: 8px;
    background: #eee;
    border-radius: 5px;
    overflow: hidden;
}

.hot-fill {
    height: 100%;
    background: linear-gradient(90deg, #8dc63f, #4CAF50);
}

/* NUMBER GRID */

.number-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 6px;
    margin-top: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.grid-number {
    padding: 8px;
    text-align: center;
    background: #eee;
    border-radius: 6px;
    cursor: pointer;
    user-select: none;
    transition: 0.2s;
    font-size: 14px;
}

.grid-number:hover {
    background: #ddd;
}

.grid-number.selected {
    background: var(--primary);
    color: white;
    font-weight: bold;
}

.grid-counter {
    margin-top: 10px;
    font-weight: bold;
}

@media (max-width: 600px) {
    .number-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* TIMELINE */

.timeline {
    margin-top: 15px;
    border-left: 3px solid #ddd;
    padding-left: 12px;
}

.timeline-item {
    margin-bottom: 18px;
    position: relative;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: -9px;
    top: 6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

/* találat színek */
.tl-3::before {
    background: #4CAF50;
}

.tl-4::before {
    background: #2E7D32;
}

.tl-5::before {
    background: gold;
}

.timeline-title {
    font-weight: 600;
    margin-bottom: 4px;
    margin-left: 16px;
    line-height: 24px;
}

.timeline-numbers {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.timeline-numbers div {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 13px;
    font-weight: bold;
    background: #eee;
}

.timeline-numbers .hit {
    background: var(--primary);
    color: white;
}

.timeline-numbers .drawn {
    border: 2px solid #999;
}

/* mobil */
@media (max-width: 600px) {
    .timeline {
        border-left-width: 2px;
    }
}

/* DROPDOWN MENU */
.dropdown {
    position: relative;
    align-self: center;
}

.dropbtn {
    cursor: pointer;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background: var(--primary);
    min-width: 160px;
    flex-direction: column;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}

.dropdown-content a {
    display: block;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.3);
}

.dropdown-content a:hover {
    background: #388E3C;
}

.dropdown:hover .dropdown-content {
    display: flex;
}