body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f4f9;
    display: flex;
    flex-direction: column; /* 아이템을 세로로 정렬 */
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    transition: background-color 0.3s, color 0.3s;
}

body.dark-mode {
    background-color: #1a1a1a;
    color: #f4f4f9;
}

.container {
    text-align: center;
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s;
    position: relative;
}

body.dark-mode .container {
    background-color: #2d2d2d;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
}

#theme-toggle-container {
    position: fixed; /* 뷰포트에 고정 */
    top: 1rem;
    right: 1rem;
    z-index: 1000; /* 다른 요소 위에 오도록 설정 */
}

#theme-toggle {
    background: none;
    border: 1px solid #ddd;
    padding: 5px 10px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
    color: #333; /* 기본 글자색 */
}

body.dark-mode #theme-toggle {
    border-color: #555;
    color: #f4f4f9;
}

h1 {
    color: #333;
    margin-bottom: 2rem;
    transition: color 0.3s;
}

body.dark-mode h1 {
    color: #f4f4f9;
}

/* Contact Panel Styles */
.contact-panel {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 3rem; /* 로또 생성기와의 간격 */
    max-width: 800px;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    transition: background-color 0.3s;
}

body.dark-mode .contact-panel {
    background-color: #2d2d2d;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
}

.contact-panel h2 {
    color: #333;
    margin-bottom: 1.5rem;
    transition: color 0.3s;
}

body.dark-mode .contact-panel h2 {
    color: #f4f4f9;
}

.contact-panel form {
    display: flex;
    flex-direction: column;
    max-width: 500px;
    margin: 0 auto;
}

.contact-panel label {
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
    align-self: flex-start; /* 라벨 왼쪽 정렬 */
    transition: color 0.3s;
}

body.dark-mode .contact-panel label {
    color: #ccc;
}

.contact-panel input[type="text"],
.contact-panel input[type="email"],
.contact-panel textarea {
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    width: 100%; /* 너비 100%로 설정 */
    box-sizing: border-box; /* padding이 너비에 포함되도록 */
    transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}

body.dark-mode .contact-panel input[type="text"],
body.dark-mode .contact-panel input[type="email"],
body.dark-mode .contact-panel textarea {
    background-color: #444;
    border-color: #666;
    color: #f4f4f9;
}

.contact-panel input[type="text"]:focus,
.contact-panel input[type="email"]:focus,
.contact-panel textarea:focus {
    border-color: #007bff;
    outline: none;
}

.contact-panel button[type="submit"] {
    background-color: #007bff;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s;
    align-self: center; /* 버튼 가운데 정렬 */
    width: auto; /* 내용에 따라 너비 조정 */
    min-width: 150px;
}

.contact-panel button[type="submit"]:hover {
    background-color: #0056b3;
}


.lotto-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 2rem;
    min-height: 50px;
}

.ball {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Ball colors based on number ranges */
.ball.yellow { background-color: #fbc400; color: #333; }
.ball.blue { background-color: #69c8f2; }
.ball.red { background-color: #ff7272; }
.ball.gray { background-color: #aaa; }
.ball.green { background-color: #b0d840; }

#generate-btn {
    padding: 10px 20px;
    font-size: 1rem;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#generate-btn:hover {
    background-color: #0056b3;
}
