:root {
    --bg-color: #f8f9fa;
    --container-bg: #ffffff;
    --text-color: #212529;
    --accent-color: #0d6efd;
    --ball-size: 60px;
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
    --ball-font-size: 1.5rem;
    --transition: 0.3s ease;
}

body.dark-mode {
    --bg-color: #212529;
    --container-bg: #343a40;
    --text-color: #f8f9fa;
    --accent-color: #0dcaf0;
    --shadow: 0 4px 6px rgba(0,0,0,0.3);
}

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

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background: var(--bg-color);
    background-attachment: fixed;
    color: var(--text-color);
    transition: background var(--transition), color var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    background-color: var(--container-bg);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    width: 95%;
    max-width: 600px;
    text-align: center;
    transition: all var(--transition);
    margin: 2rem 0;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.header-buttons {
    display: flex;
    gap: 0.5rem;
}

h1 {
    font-size: 1.5rem;
}

.btn-icon {
    background: none;
    border: 1px solid var(--text-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-color);
    transition: transform 0.2s, background-color 0.2s;
}

.btn-icon:hover {
    transform: scale(1.1);
    background-color: rgba(255,255,255,0.1);
}

.numbers-container {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.number-row {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    animation: slideIn 0.3s ease-out;
}

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

.ball {
    width: var(--ball-size);
    height: var(--ball-size);
    border-radius: 50%;
    background-color: var(--accent-color);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: var(--ball-font-size);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    animation: bounce 0.5s ease;
}

.ball.placeholder {
    background-color: #dee2e6;
    color: #adb5bd;
}

.ball.color-1 { background-color: #fbc02d; }
.ball.color-2 { background-color: #1976d2; }
.ball.color-3 { background-color: #d32f2f; }
.ball.color-4 { background-color: #757575; }
.ball.color-5 { background-color: #388e3c; }

@keyframes bounce {
    0% { transform: scale(0.5); opacity: 0; }
    70% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.controls {
    margin-bottom: 2.5rem;
}

.tool-hint {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #6c757d;
}

body.dark-mode .tool-hint {
    color: #adb5bd;
}

.info-content, .faq-section, .disclaimer-section {
    text-align: left;
    margin: 2rem 0;
}

.info-content article {
    margin-bottom: 2rem;
}

.info-content h2, .faq-section h2, .disclaimer-section h2 {
    font-size: 1.3rem;
    margin-bottom: 1.2rem;
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
    padding-bottom: 0.3rem;
}

.info-content p, .faq-section p, .disclaimer-section p {
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.info-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.info-content li {
    margin-bottom: 0.5rem;
}

.faq-item {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: rgba(0,0,0,0.03);
    border-radius: 0.5rem;
}

body.dark-mode .faq-item {
    background-color: rgba(255,255,255,0.05);
}

.faq-item h3 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.disclaimer-section {
    font-size: 0.85rem;
    color: #6c757d;
    background-color: #f1f3f5;
    padding: 1.5rem;
    border-radius: 0.5rem;
}

body.dark-mode .disclaimer-section {
    color: #adb5bd;
    background-color: #2b3035;
}

.disclaimer-section h2 {
    font-size: 1.1rem;
    color: #dc3545;
    border-color: #dc3545;
}

.partnership-form {
    text-align: left;
    margin-top: 1rem;
}

.partnership-form h2,
.comments-section h2 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    font-weight: 500;
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    background-color: var(--container-bg);
    color: var(--text-color);
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.btn-secondary {
    background-color: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
    padding: 0.7rem 1.5rem;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 0.5rem;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.2s, color 0.2s;
}

.btn-secondary:hover {
    background-color: var(--accent-color);
    color: white;
}

.comments-section {
    margin-top: 1rem;
    text-align: left;
}

#disqus_thread {
    width: 100%;
}

footer {
    font-size: 0.9rem;
    opacity: 0.7;
}

@media (max-width: 450px) {
    :root {
        --ball-size: 40px;
        --ball-font-size: 1rem;
    }
    .container {
        padding: 1rem;
    }
}
