:root {
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.4);
    --secondary: #ec4899;
    --secondary-glow: rgba(236, 72, 153, 0.4);
    --bg-gradient: linear-gradient(135deg, #e0e7ff 0%, #fef2f2 100%);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --card-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    --deep-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
}

body {
    min-height: 100vh;
    background: var(--bg-gradient);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    overflow-x: hidden;
}

.bg-noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3column%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: 1000;
}

.app-container {
    width: 100%;
    max-width: 600px;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

header {
    text-align: center;
    padding: 1rem 0;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.highlight {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

main {
    flex: 1;
}

footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Web Components Styling */
lotto-app {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
}

.btn-generate {
    width: 100%;
    padding: 1.2rem;
    border: none;
    border-radius: 16px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 10px 15px -3px var(--primary-glow);
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px var(--primary-glow);
}

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

.ticket-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: fadeIn 0.5s ease-out;
}

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

.ticket {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem;
    background: white;
    border-radius: 16px;
    box-shadow: var(--deep-shadow);
}

.group-tag {
    background: #1e293b;
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-weight: 800;
    font-size: 1.1rem;
    min-width: 60px;
    text-align: center;
}

.numbers {
    display: flex;
    gap: 0.5rem;
}

.digit {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.2rem;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.digit:nth-child(1) { color: #e11d48; }
.digit:nth-child(2) { color: #ea580c; }
.digit:nth-child(3) { color: #ca8a04; }
.digit:nth-child(4) { color: #16a34a; }
.digit:nth-child(5) { color: #2563eb; }
.digit:nth-child(6) { color: #7c3aed; }

.section-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.2rem;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    font-size: 0.9rem;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem 0;
}
