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

:root {
    --background-color: #f0f2f5;
    --container-bg-color: #ffffff;
    --text-color: #333333;
    --primary-color: #4a90e2;
    --primary-hover-color: #357abd;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --font-family: 'Noto Sans KR', sans-serif;
}

[data-theme='dark'] {
    --background-color: #1a1a1a;
    --container-bg-color: #2c2c2c;
    --text-color: #f0f0f0;
    --shadow-color: rgba(0, 0, 0, 0.4);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --background-color: #1a1a1a;
    --container-bg-color: #2c2c2c;
    --text-color: #f0f0f0;
    --shadow-color: rgba(0, 0, 0, 0.4);
  }
}

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background-image: linear-gradient(to top, rgba(0,0,0,0.02), rgba(0,0,0,0.02)), url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%239C92AC' fill-opacity='0.1' fill-rule='evenodd'%3E%3Cpath d='M0 40L40 0H20L0 20M40 40V20L20 40'/%3E%3C/g%3E%3C/svg%3E");
}

.container {
    background-color: var(--container-bg-color);
    padding: 2.5rem 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px var(--shadow-color);
    text-align: center;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.theme-toggle-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: 1px solid var(--text-color);
    color: var(--text-color);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s, color 0.3s;
}

.theme-toggle-btn:hover {
    background-color: var(--text-color);
    color: var(--container-bg-color);
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

header p {
    font-size: 1.1rem;
    color: #666666;
    margin-bottom: 2rem;
}

.number-display-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2.5rem 0;
    flex-wrap: wrap;
}

.lotto-ball {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    animation: pop-in 0.5s ease-out forwards;
}

@keyframes pop-in {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    60% {
        transform: scale(1.1);
        opacity: 1;
    }
    100% {
        transform: scale(1);
    }
}

#generate-btn {
    background-color: var(--primary-color);
    color: white;
    font-size: 1.2rem;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.4);
}

#generate-btn:hover {
    background-color: var(--primary-hover-color);
    transform: translateY(-2px);
}

#generate-btn:active {
    transform: translateY(0);
}

.divider {
    border: none;
    height: 1px;
    background-color: var(--shadow-color);
    margin: 2rem 0;
}

.dream-interpreter h2, .lotto-machine h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

#dream-input {
    width: 100%;
    height: 120px;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    border: 1px solid var(--shadow-color);
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: var(--font-family);
    font-size: 1rem;
    resize: vertical;
}

#dream-btn {
    background-color: #e24a68;
    color: white;
    font-size: 1.2rem;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    box-shadow: 0 4px 15px rgba(226, 74, 104, 0.4);
}

#dream-btn:hover {
    background-color: #c03954;
    transform: translateY(-2px);
}

#dream-btn:active {
    transform: translateY(0);
}

.reasoning-container {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: var(--background-color);
    border-radius: 8px;
    text-align: left;
    white-space: pre-wrap;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-color);
}

footer {
    margin-top: 2.5rem;
    font-size: 0.9rem;
    color: #aaaaaa;
}
