:root {
    /* Light Theme (Default) */
    --primary-color: #ff6b6b;
    --secondary-color: #f06595;
    --bg-gradient: linear-gradient(135deg, #fce4ec, #f3e5f5);
    --card-bg: rgba(255, 255, 255, 0.95);
    --text-color: #2d3436;
    --text-secondary: #636e72;
    --shadow-color: rgba(255, 107, 107, 0.2);
    --ball-bg: white;
    --ball-border: #f0f0f0;
    --btn-text: white;
}

[data-theme="dark"] {
    /* Dark Theme */
    --primary-color: #ff8e8e;
    --secondary-color: #ff85a2;
    --bg-gradient: linear-gradient(135deg, #2d3436, #000000);
    --card-bg: rgba(45, 52, 54, 0.95);
    --text-color: #f5f6fa;
    --text-secondary: #b2bec3;
    --shadow-color: rgba(0, 0, 0, 0.4);
    --ball-bg: #353b48;
    --ball-border: #4a5462;
    --btn-text: #2d3436;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-color);
    padding: 20px;
    overflow-x: hidden;
}

/* Texture effect */
body::before {
    content: "";
    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'%3%3Ffilter 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.05;
    pointer-events: none;
    z-index: 1;
}

.container {
    width: 100%;
    max-width: 500px;
    z-index: 2;
    text-align: center;
}

.header-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.theme-btn {
    background: var(--card-bg);
    border: 1px solid var(--ball-border);
    width: 44px;
    height: 44px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    font-size: 1.2rem;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.theme-btn:hover {
    transform: scale(1.1);
}

.love-message {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.05);
    animation: fadeInDown 1s ease-out;
}

.lotto-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: 0 15px 35px var(--shadow-color);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    animation: scaleUp 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.premium-btn {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border: none;
    color: white;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px var(--shadow-color);
    width: 100%;
    margin-bottom: 2rem;
}

.premium-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--shadow-color);
    filter: brightness(1.05);
}

.premium-btn:active {
    transform: scale(0.98);
}

.results-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.lotto-set {
    background: var(--ball-bg);
    padding: 12px;
    border-radius: 16px;
    display: flex;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    animation: slideIn 0.4s ease-out forwards;
    border: 1px solid var(--ball-border);
}

.number-ball {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    box-shadow: inset 0 -3px 5px rgba(0,0,0,0.1);
}

/* Lotto color schemes */
.ball-yellow { background: #fbc02d; }
.ball-blue { background: #1976d2; }
.ball-red { background: #e53935; }
.ball-gray { background: #757575; }
.ball-green { background: #43a047; }

.placeholder {
    color: var(--text-secondary);
    font-style: italic;
    margin: 2rem 0;
}

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

@keyframes scaleUp {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

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

@media (max-width: 400px) {
    .love-message { font-size: 1.6rem; }
    .number-ball { width: 32px; height: 32px; font-size: 0.8rem; }
}
