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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
    position: relative;
    overflow-x: hidden;
}

.stars-background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.star {
    position: absolute;
    color: rgba(255, 255, 255, 0.6);
    font-size: 20px;
    animation: twinkle 3s ease-in-out infinite;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.star:nth-child(2n) {
    animation-delay: 0.5s;
    font-size: 16px;
}

.star:nth-child(3n) {
    animation-delay: 1s;
    font-size: 24px;
}

.star:nth-child(4n) {
    animation-delay: 1.5s;
    font-size: 14px;
}

.star:nth-child(5n) {
    animation-delay: 2s;
    font-size: 18px;
}

@keyframes twinkle {
    0%, 100% { 
        opacity: 0.3;
        transform: scale(1);
    }
    50% { 
        opacity: 1;
        transform: scale(1.2);
    }
}

.container {
    max-width: 520px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

header {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    padding: 40px 20px 30px;
    text-align: center;
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.header-logo {
    width: 180px;
    height: auto;
    max-width: 90%;
    object-fit: contain;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.header-text {
    width: 100%;
    text-align: center;
}

h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 14px;
    opacity: 0.95;
    margin-bottom: 8px;
}

.disclaimer {
    font-size: 11px;
    opacity: 0.85;
    font-style: italic;
}

main {
    padding: 30px 20px;
}

.generator-section {
    margin-bottom: 30px;
}

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

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #555;
    font-size: 14px;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #3b82f6;
}

.generate-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

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

.results-section {
    margin-bottom: 30px;
}

.result-line {
    background: #f8f9fa;
    border-left: 4px solid #3b82f6;
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 8px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-line .numbers {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.result-line .label {
    font-weight: 600;
    color: #555;
    font-size: 14px;
    margin-bottom: 8px;
}

.number-ball {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    font-weight: 700;
    font-size: 16px;
    line-height: 1;
    position: relative;
}

.star-ball {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1e40af;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
}

.star-ball::before {
    content: '★';
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 18px;
    color: #fbbf24;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.separator {
    color: #999;
    font-weight: 700;
    font-size: 20px;
}

.history-section {
    border-top: 2px solid #e0e0e0;
    padding-top: 30px;
    margin-bottom: 20px;
}

.history-section h2 {
    font-size: 20px;
    margin-bottom: 16px;
    color: #333;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-item {
    background: #f8f9fa;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    color: #555;
}

.history-item .history-numbers {
    font-weight: 600;
    color: #333;
}

.info-section {
    border-top: 2px solid #e0e0e0;
    padding-top: 20px;
}

.info-text {
    font-size: 12px;
    color: #777;
    text-align: center;
    line-height: 1.6;
}

.empty-state {
    text-align: center;
    color: #999;
    padding: 40px 20px;
    font-style: italic;
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .container {
        border-radius: 12px;
    }

    .header-logo {
        width: 140px;
        padding: 15px;
    }

    .header-content {
        gap: 15px;
    }

    header {
        padding: 30px 15px 25px;
    }

    h1 {
        font-size: 24px;
    }

    .number-ball {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .star-ball::before {
        font-size: 16px;
        top: -6px;
        right: -6px;
    }
}
