:root {
    --background-color: #fff;
    --text-color: #333;
}

[data-theme='dark'] {
    --background-color: #333;
    --text-color: #fff;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: 'Helvetica Neue', sans-serif;
    display: flex;
    flex-direction: column; /* Allow content and footer to stack */
    min-height: 100vh; /* Ensure body takes at least full viewport height */
    margin: 0;
    text-align: center;
    transition: background-color 0.3s, color 0.3s;
}

.top-right-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1001; /* Ensure it's above other elements */
}

.signup-button-main {
    background-color: #6c757d; /* Grey for signup */
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap; /* Prevent button text from wrapping */
}

.signup-button-main:hover {
    background-color: #5a6268;
}

#auth-container {
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

#auth-container .username {
    font-weight: bold;
    color: var(--text-color);
}

#auth-container .login-button,
#auth-container .logout-button,
#auth-container .mypage-button {
    background-color: #28a745; /* Green for login/mypage */
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap; /* Prevent button text from wrapping */
}

#auth-container .logout-button {
    background-color: #dc3545; /* Red for logout */
}

#auth-container .mypage-button {
    background-color: #17a2b8; /* Info blue for My Page */
}

#auth-container .login-button:hover {
    background-color: #218838;
}

#auth-container .logout-button:hover {
    background-color: #c82333;
}

#auth-container .mypage-button:hover {
    background-color: #138496;
}

.hero-container {
    max-width: 600px;
    flex-grow: 1; /* Allow hero content to take available space */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px; /* Add padding to prevent content from touching edges */
}

.hero-title {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #6c757d;
    margin-bottom: 2rem;
}

.cta-button {
    background-color: #007bff;
    color: white;
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: bold;
    transition: background-color 0.2s;
}

.cta-button:hover {
    background-color: #0056b3;
}

.theme-toggle-main {
    background: none;
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.5rem;
    padding: 5px 10px;
    color: var(--text-color);
}

/* Footer Styles */
.main-footer {
    width: 100%;
    background-color: #f8f9fa; /* Light grey background */
    color: #495057;
    padding: 40px 20px;
    border-top: 1px solid #e9ecef;
    margin-top: auto; /* Push footer to the bottom */
}

[data-theme='dark'] .main-footer {
    background-color: #212529; /* Darker background for dark theme */
    color: #adb5bd;
    border-top-color: #343a40;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    max-width: 1200px;
    margin: 0 auto;
    text-align: left;
}

.footer-section {
    flex: 1;
    min-width: 200px;
    margin: 20px;
}

.footer-section h3 {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: var(--text-color);
}

.footer-section p {
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #495057;
    text-decoration: none;
    font-size: 0.9rem;
}

[data-theme='dark'] .footer-section ul li a {
    color: #adb5bd;
}

.footer-section ul li a:hover {
    text-decoration: underline;
    color: #007bff;
}

[data-theme='dark'] .footer-section ul li a:hover {
    color: #6cbfff;
}

.footer-bottom {
    text-align: center;
    margin-top: 40px;
    font-size: 0.8rem;
    color: #6c757d;
}

[data-theme='dark'] .footer-bottom {
    color: #6c757d;
}