@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@700&family=Montserrat:wght@500&family=Noto+Sans+KR:wght@400;700&display=swap');

:root {
    --header-bg: rgba(255, 255, 255, 0.7);
    --body-bg: #f0f0f0;
    --body-bg-gradient-1: hsl(220, 80%, 80%);
    --body-bg-gradient-2: hsl(280, 70%, 85%);
    --container-bg: rgba(255, 255, 255, 0.4);
    --text-color: #333;
    --h1-text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    --container-border-color: rgba(0, 0, 0, 0.1);
    --button-shadow-color: #aaa;
    --lotto-ball-text-color: #fff;
    --nav-link-color: #333;
    --footer-bg: rgba(255, 255, 255, 0.7);
    --footer-text-color: #333;
}

[data-theme='dark'] {
    --header-bg: rgba(0, 0, 0, 0.7);
    --body-bg: #121212;
    --body-bg-gradient-1: hsl(220, 80%, 30%);
    --body-bg-gradient-2: hsl(280, 70%, 40%);
    --container-bg: rgba(0, 0, 0, 0.4);
    --text-color: #fff;
    --h1-text-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px #e60073, 0 0 40px #e60073, 0 0 50px #e60073, 0 0 60px #e60073, 0 0 70px #e60073;
    --container-border-color: rgba(255, 255, 255, 0.1);
    --button-shadow-color: #eee;
    --lotto-ball-text-color: #fff;
    --nav-link-color: #fff;
    --footer-bg: rgba(0, 0, 0, 0.7);
    --footer-text-color: #fff;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans KR', 'Montserrat', sans-serif;
    background: var(--body-bg);
    background-image: 
        radial-gradient(at 47% 33%, var(--body-bg-gradient-1) 0, transparent 59%), 
        radial-gradient(at 82% 65%, var(--body-bg-gradient-2) 0, transparent 55%);
    background-attachment: fixed;
    margin: 0;
    padding-top: 80px; /* Header height */
    color: var(--text-color);
    overflow-x: hidden;
    transition: background 0.5s ease, color 0.5s ease;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 80px;
}

.nav-logo {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--nav-link-color);
    text-decoration: none;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.nav-menu a {
    color: var(--nav-link-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: #e60073;
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    padding: 40px 20px;
}

.content-section {
    width: 100%;
    display: flex;
    justify-content: center;
}

.theme-switch-container {
    position: relative;
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:focus + .slider {
    box-shadow: 0 0 1px #2196F3;
}

input:checked + .slider:before {
    transform: translateX(26px);
}


.container {
    text-align: center;
    background: var(--container-bg);
    padding: 50px 70px;
    border-radius: 30px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    border: 2px solid var(--container-border-color);
    transition: transform 0.3s ease;
    width: 90%;
    max-width: 800px;
}

.container:hover {
    transform: scale(1.02);
}

h1 {
    font-family: 'Roboto', sans-serif;
    font-size: 3em;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: var(--h1-text-shadow);
}

h2 {
    font-family: 'Roboto', sans-serif;
    font-size: 2em;
    margin-bottom: 20px;
    color: var(--text-color);
}

.subtitle {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: var(--text-color);
}

#how-to-use p, #disclaimer p {
    line-height: 1.8;
    text-align: left;
}


[data-theme='dark'] h1 {
    animation: neonGlow 1.5s ease-in-out infinite alternate;
}

@keyframes neonGlow {
  from {
    text-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px #e60073, 0 0 40px #e60073, 0 0 50px #e60073, 0 0 60px #e60073, 0 0 70px #e60073;
  }
  to {
    text-shadow: 0 0 20px #fff, 0 0 30px #ff4da6, 0 0 40px #ff4da6, 0 0 50px #ff4da6, 0 0 60px #ff4da6, 0 0 70px #ff4da6, 0 0 80px #ff4da6;
  }
}

.lotto-numbers-container {
    display: flex;
    flex-direction: column; /* 세로 방향으로 정렬 */
    align-items: center; /* 가운데 정렬 */
    gap: 20px; /* 각 줄 사이의 간격 */
    margin-bottom: 40px;
    min-height: 250px; /* 5줄이 표시될 충분한 공간 확보 */
}

.lotto-row {
    display: flex;
    justify-content: center;
    gap: 15px; /* 공 사이의 간격 */
}

.generate-btn {
    background-image: linear-gradient(to right, #DA22FF 0%, #9733EE  51%, #DA22FF  100%);
    padding: 20px 45px;
    text-align: center;
    text-transform: uppercase;
    transition: 0.5s;
    background-size: 200% auto;
    color: white;
    border-radius: 10px;
    display: inline-block;
    border: none;
    font-size: 1.2em;
    font-weight: 700;
    box-shadow: 0 0 20px var(--button-shadow-color);
    cursor: pointer;
}

.generate-btn:hover {
    background-position: right center; 
    color: #fff;
    text-decoration: none;
    transform: scale(1.05);
}

.generate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

footer {
    width: 100%;
    padding: 20px;
    text-align: center;
    background: var(--footer-bg);
    color: var(--footer-text-color);
    backdrop-filter: blur(10px);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}