
:root {
    --bg-color: #1a233a;
    --text-color: #e0e0e0;
    --primary-color: #f0c479;
    --primary-color-hover: #d4a660;
    --component-bg-color: #2c3a55;
    --component-border-color: #f0c479;
    --input-bg-color: #1a233a;
    --button-text-color: #1a233a;
    --header-text-shadow: 0 0 10px #f0c479, 0 0 20px #f0c479;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.light-theme {
    --bg-color: #f0f2f5;
    --text-color: #1c1e21;
    --primary-color: #1877f2;
    --primary-color-hover: #166fe5;
    --component-bg-color: #ffffff;
    --component-border-color: #dce1e6;
    --input-bg-color: #e9ebee;
    --button-text-color: #ffffff;
    --header-text-shadow: none;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    transition: background-color 0.3s, color 0.3s;
}

header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    width: 100%;
    padding-top: 20px; /* Added for spacing */
    padding-right: 20px; /* Added for spacing */
}

#theme-toggle {
    position: absolute;
    top: 15px; /* Adjusted spacing */
    right: 15px; /* Adjusted spacing */
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    width: 70px; /* Increased width to accommodate both icons with spacing */
    height: 40px;
    border-radius: 20px; /* More rounded shape for the wider button */
    cursor: pointer;
    font-size: 1rem;
    display: flex; /* Use flexbox to center icons */
    align-items: center;
    justify-content: space-around; /* Distribute space around icons */
    transition: background-color 0.3s, color 0.3s, border-color 0.3s, width 0.3s, border-radius 0.3s;
}

#theme-toggle:hover {
    background-color: var(--primary-color);
    color: var(--button-text-color);
}

#theme-toggle span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px; /* Size of the circle/icon area */
    height: 30px;
    border-radius: 50%;
    transition: background-color 0.3s, color 0.3s;
}

body:not(.light-theme) #theme-toggle #moon-icon {
    background-color: var(--primary-color);
    color: var(--button-text-color);
}

body.light-theme #theme-toggle #sun-icon {
    background-color: var(--primary-color);
    color: var(--button-text-color);
}

h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    text-shadow: var(--header-text-shadow);
    transition: color 0.3s, text-shadow 0.3s;
}

main {
    width: 100%;
    max-width: 500px;
}

saju-input-form, saju-result-display {
    display: block;
    background-color: var(--component-bg-color);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: var(--box-shadow);
    border: 1px solid var(--component-border-color);
    transition: background-color 0.3s, border-color 0.3s;
}

#about-saju {
    width: 100%;
    max-width: 500px;
    background-color: var(--component-bg-color);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: var(--box-shadow);
    border: 1px solid var(--component-border-color);
    transition: background-color 0.3s, border-color 0.3s;
}

#about-saju h2 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 20px;
    font-size: 2rem;
    transition: color 0.3s;
}

#about-saju p {
    line-height: 1.8;
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 15px;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    body {
        padding: 15px;
    }

    h1 {
        font-size: 2rem;
    }

    #about-saju h2 {
        font-size: 1.7rem;
    }

    #about-saju p {
        font-size: 1rem;
    }

    saju-input-form, saju-result-display, #about-saju {
        padding: 20px;
    }
}
