:root {
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #38bdf8;
    --accent-hover: #0ea5e9;
    
    /* 로또 공 색상 (동행복권 기준) */
    --color-1-10: #fbc400;  /* 노란색 */
    --color-11-20: #69c8f2; /* 파란색 */
    --color-21-30: #ff7272; /* 빨간색 */
    --color-31-40: #aaaaaa; /* 회색 */
    --color-41-45: #b0d840; /* 녹색 */
}

body.light-mode {
    --bg-dark: #e2e8f0;
    --card-bg: rgba(255, 255, 255, 0.85);
    --text-main: #1e293b;
    --text-muted: #475569;
}

.theme-toggle-wrapper {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.theme-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--text-main);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.theme-btn:hover {
    background: rgba(255,255,255,0.2);
}

body.light-mode .theme-btn {
    background: rgba(0,0,0,0.05);
    border-color: rgba(0,0,0,0.1);
}

body.light-mode .theme-btn:hover {
    background: rgba(0,0,0,0.1);
}

body.light-mode .plus-sign {
    color: rgba(0,0,0,0.6);
    text-shadow: none;
}

body.light-mode .container {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: 'Noto Sans KR', 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(56, 189, 248, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(168, 85, 247, 0.15) 0%, transparent 50%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.container {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    padding: 4rem 3rem;
    width: 90%;
    max-width: 800px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.container:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

header {
    margin-bottom: 4rem;
}

h1 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 0.8rem;
    background: linear-gradient(135deg, #38bdf8, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 40px rgba(56, 189, 248, 0.3);
    letter-spacing: -1px;
}

p {
    color: var(--text-muted);
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.balls-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.8rem;
    min-height: 120px;
    margin-bottom: 4rem;
    position: relative;
}

.placeholder-text {
    color: var(--text-muted);
    font-size: 1.2rem;
    font-weight: 300;
    letter-spacing: 1px;
    opacity: 0.7;
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.ball {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.4);
    box-shadow: 
        inset -8px -8px 20px rgba(0,0,0,0.25),
        inset 8px 8px 20px rgba(255,255,255,0.4),
        0 15px 25px rgba(0,0,0,0.3);
    opacity: 0;
    transform: scale(0) translateY(50px) rotate(-180deg);
    animation: popIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    position: relative;
}

/* 빛 반사 효과 (Glass/3D feel) */
.ball::after {
    content: '';
    position: absolute;
    top: 12%;
    left: 20%;
    width: 35%;
    height: 35%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0) 70%);
    pointer-events: none;
}

@keyframes popIn {
    to {
        opacity: 1;
        transform: scale(1) translateY(0) rotate(0);
    }
}

.draw-btn {
    background: linear-gradient(135deg, #38bdf8, #818cf8);
    border: none;
    border-radius: 50px;
    padding: 1.2rem 3.5rem;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(56, 189, 248, 0.4), inset 0 1px 0 rgba(255,255,255,0.3);
}

.draw-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(56, 189, 248, 0.5), inset 0 1px 0 rgba(255,255,255,0.4);
}

.draw-btn:active {
    transform: translateY(1px);
    box-shadow: 0 5px 15px rgba(56, 189, 248, 0.4);
}

.btn-text {
    position: relative;
    z-index: 2;
    letter-spacing: 1px;
}

.btn-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 60%);
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.4s, transform 0.4s;
    pointer-events: none;
}

.draw-btn:hover .btn-glow {
    opacity: 1;
    transform: scale(1);
}

.draw-btn:disabled {
    background: #475569;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
    opacity: 0.7;
}

/* 색상 클래스 */
.c-1 { background: linear-gradient(135deg, #ffd700, var(--color-1-10)); }
.c-2 { background: linear-gradient(135deg, #87cefa, var(--color-11-20)); }
.c-3 { background: linear-gradient(135deg, #ff8c8c, var(--color-21-30)); }
.c-4 { background: linear-gradient(135deg, #d3d3d3, var(--color-31-40)); }
.c-5 { background: linear-gradient(135deg, #cde67e, var(--color-41-45)); }

/* 토글 스위치 스타일 */
.toggle-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 2rem;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 54px;
    height: 30px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .4s;
    border-radius: 34px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

input:checked + .slider {
    background-color: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

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

.toggle-label {
    color: var(--text-main);
    font-size: 1.1rem;
    font-weight: 400;
}

/* 플러스 기호 스타일 */
.plus-sign {
    font-size: 3rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.8);
    opacity: 0;
    transform: scale(0);
    animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

/* 제휴 문의 폼 스타일 */
.contact-section {
    margin-top: 3.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
}

body.light-mode .contact-section {
    border-top-color: rgba(0, 0, 0, 0.1);
}

.contact-section h2 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    text-align: center;
    color: var(--text-main);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.2rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(0, 0, 0, 0.3);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

body.light-mode .form-group input,
body.light-mode .form-group textarea {
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .form-group input:focus,
body.light-mode .form-group textarea:focus {
    background: rgba(255, 255, 255, 0.8);
    border-color: var(--accent);
}

.submit-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--text-main);
    padding: 1rem;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 0.5rem;
    font-family: inherit;
}

.submit-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(56, 189, 248, 0.3);
}

body.light-mode .submit-btn {
    background: rgba(0,0,0,0.05);
    border-color: rgba(0,0,0,0.1);
}

body.light-mode .submit-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

@media (max-width: 768px) {
    .container {
        padding: 3rem 1.5rem;
        width: 95%;
    }
    h1 { font-size: 2.5rem; }
    .ball {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }
    .balls-container { gap: 1rem; }
}
