:root {
    --bg-color: #f4f4f9;
    --container-bg: #ffffff;
    --text-color: #333333;
    --row-bg: #fafafa;
    --row-border: #eeeeee;
    --btn-bg: #3498db;
    --btn-hover: #2980b9;
}

body.dark-mode {
    --bg-color: #1a1a1a;
    --container-bg: #2d2d2d;
    --text-color: #f0f0f0;
    --row-bg: #3d3d3d;
    --row-border: #444444;
    --btn-bg: #2980b9;
    --btn-hover: #3498db;
}

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

body {
    font-family: 'Pretendard', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 60px 20px;
    transition: background-color 0.3s, color 0.3s;
}

.theme-toggle {
    position: fixed; /* 페이지가 길어지므로 고정 */
    top: 20px;
    right: 20px;
    z-index: 1000;
}

#theme-btn {
    background: none;
    border: 1px solid var(--row-border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    background-color: var(--container-bg);
    transition: all 0.3s;
}

.container {
    background-color: var(--container-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 100%;
    max-width: 500px;
    transition: background-color 0.3s;
}

/* 댓글 섹션 스타일 */
.comment-section {
    margin-top: 3rem;
    text-align: left;
}

.comment-section hr {
    border: 0;
    border-top: 1px solid var(--row-border);
    margin-bottom: 2rem;
}

h1 {
    margin-bottom: 2rem;
    color: var(--text-color);
}

.ball-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    min-height: 50px;
}

.game-row {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background-color: var(--row-bg);
    border-radius: 10px;
    border: 1px solid var(--row-border);
    animation: slideIn 0.5s ease-out forwards;
    opacity: 0;
}

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

.ball {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-weight: bold;
    font-size: 1.2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    /* 3D 입체감을 위한 기본 그림자 */
    box-shadow: inset -5px -5px 10px rgba(0, 0, 0, 0.2), 
                2px 4px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

/* 공 상단의 하이라이트 효과 */
.ball::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 8px;
    width: 15px;
    height: 10px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    transform: rotate(-20deg);
}

/* 로또 번호별 3D 색상 그라데이션 */
.color-yellow { background: radial-gradient(circle at 30% 30%, #ffeb3b, #fbc400 70%, #d4a017); }
.color-blue   { background: radial-gradient(circle at 30% 30%, #87cefa, #69c8f2 70%, #3a9ad9); }
.color-red    { background: radial-gradient(circle at 30% 30%, #ff9a9a, #ff7272 70%, #d32f2f); }
.color-gray   { background: radial-gradient(circle at 30% 30%, #d3d3d3, #aaaaaa 70%, #777777); }
.color-green  { background: radial-gradient(circle at 30% 30%, #d4ed91, #b0d840 70%, #7cb342); }

#draw-btn {
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: bold;
    color: #fff;
    background-color: var(--btn-bg);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
}

#draw-btn:hover {
    background-color: var(--btn-hover);
}

#draw-btn:active {
    transform: scale(0.98);
}

/* 제휴 문의 섹션 스타일 */
.contact-section {
    margin-top: 2rem;
}

.contact-section hr {
    border: 0;
    border-top: 1px solid var(--row-border);
    margin-bottom: 1.5rem;
}

.contact-section h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

#contact-form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

#contact-form input,
#contact-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--row-border);
    border-radius: 5px;
    background-color: var(--row-bg);
    color: var(--text-color);
    font-family: inherit;
    font-size: 0.9rem;
    transition: border-color 0.3s;
}

#contact-form input:focus,
#contact-form textarea:focus {
    outline: none;
    border-color: var(--btn-bg);
}

#contact-form textarea {
    height: 80px;
    resize: none;
}

#submit-btn {
    padding: 10px;
    background-color: var(--text-color);
    color: var(--container-bg);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: opacity 0.3s;
}

#submit-btn:hover {
    opacity: 0.8;
}
