@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap');

:root {
    --primary-color: #0ea5e9;
    --background-color: #f8fafc;
    --text-color: #1e293b;
    --card-background-color: #ffffff;
    --border-color: #e2e8f0;
    --shadow-color: rgba(0, 0, 0, 0.05);
}

body {
    font-family: 'Inter', sans-serif;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

main .container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 1rem;
}

.tool-header {
    text-align: center;
    margin-bottom: 3rem;
}

.tool-header h2 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-color);
}

.tool-header p {
    font-size: 1.1rem;
    color: #64748b;
}

.btn-external {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.8rem 1.8rem;
    background: var(--primary-color);
    color: #fff;
    border-radius: 9999px;
    font-weight: bold;
    transition: all 0.2s;
    box-shadow: 0 1px 3px var(--shadow-color);
}

.btn-external:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

section {
    margin-bottom: 2.5rem;
    background: var(--card-background-color);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px var(--shadow-color);
    border: 1px solid var(--border-color);
}

h3 {
    font-size: 1.8rem;
    color: var(--text-color);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.lotto-ball {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-weight: 800;
    color: #fff;
    font-size: 1.15rem;
    margin: 0 0.25rem;
    box-shadow: inset -3px -3px 6px rgba(0, 0, 0, 0.2), inset 3px 3px 6px rgba(255, 255, 255, 0.3), 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.ball-yellow {
    background: linear-gradient(135deg, #facc15 0%, #eab308 50%, #ca8a04 100%);
}

.ball-blue {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 50%, #1d4ed8 100%);
}

.ball-red {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 50%, #b91c1c 100%);
}

.ball-grey {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 50%, #475569 100%);
}

.ball-green {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 50%, #15803d 100%);
}

.win-numbers {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.win-numbers .bonus-plus {
    font-size: 1.5rem;
    color: #94a3b8;
    margin: 0 0.5rem;
}

.generator { text-align: center; }

#generate-btn {
    padding: 1rem 3rem;
    font-size: 1.4rem;
    border: none;
    border-radius: 9999px;
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

#generate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

#generated-numbers-container {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.generated-set {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.25rem;
    gap: 0.5rem;
    background: linear-gradient(to right, #ffffff, #f8fafc);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 14px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.generated-set:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 10px 15px -3px rgba(14, 165, 233, 0.08), 0 4px 6px -2px rgba(14, 165, 233, 0.05);
    border-color: rgba(14, 165, 233, 0.3);
}

.dark .generated-set {
    background: linear-gradient(to right, #1e293b, #0f172a);
    border-color: rgba(71, 85, 105, 0.5);
}

.dark .generated-set:hover {
    border-color: rgba(14, 165, 233, 0.5);
}

.generated-set .numbers {
    display: flex;
    gap: 0.35rem;
}

.generated-set .lotto-ball {
    width: 40px;
    height: 40px;
    font-size: 1.15rem;
    margin: 0 0.15rem;
    box-shadow: inset -2px -2px 4px rgba(0, 0, 0, 0.15), inset 2px 2px 4px rgba(255, 255, 255, 0.25), 0 2px 4px rgba(0, 0, 0, 0.08);
}

.generated-set .timestamp {
    font-size: 0.95rem;
    font-weight: 600;
    color: #64748b;
    background-color: #f1f5f9;
    padding: 0.3rem 0.75rem;
    border-radius: 8px;
}

.dark .generated-set .timestamp {
    color: #94a3b8;
    background-color: #334155;
}

.latest-win table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
}

.latest-win th, .latest-win td {
    border: 1px solid var(--border-color);
    padding: 0.8rem;
    text-align: right;
}

.latest-win th {
    background-color: #f8fafc;
    font-weight: bold;
    text-align: center;
}

.latest-win td:first-child {
    text-align: center;
    font-weight: bold;
}

.lotto-group {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lotto-balls {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.lotto-label {
    font-size: 0.9rem;
    color: #64748b;
}



@media (max-width: 1200px) {
    body {
        max-width: 100%;
        box-shadow: none;
    }
}

@media (max-width: 768px) {
    main .container {
        padding: 0.5rem;
        margin: 1rem auto;
    }

    section {
        padding: 1.5rem;
    }

    .tool-header h1 {
        font-size: 2rem;
    }

    .lotto-ball {
        width: 38px;
        height: 38px;
        font-size: 1rem;
        margin: 0 0.1rem;
    }

    .win-numbers {
        flex-wrap: wrap;
        gap: 0.8rem;
    }
    
    .generated-set {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }

    .generated-set .numbers {
        flex-wrap: wrap;
        gap: 0.3rem;
    }

    .latest-win {
        overflow-x: auto;
    }

    .latest-win table {
        min-width: 600px;
    }
    
    #generate-btn {
        padding: 0.8rem 2rem;
        font-size: 1.2rem;
    }
}
