/* CSS Variables for theming */
:root {
    --bg-color: #f0f2f5;
    --container-bg: white;
    --text-color: #333;
    --text-secondary: #666;
    --btn-bg: #007bff;
    --btn-hover: #0056b3;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --toggle-bg: #e0e0e0;
    --toggle-slider: #fff;
}

/* Dark mode theme */
[data-theme="dark"] {
    --bg-color: #1a1a2e;
    --container-bg: #16213e;
    --text-color: #eaeaea;
    --text-secondary: #b0b0b0;
    --btn-bg: #0d6efd;
    --btn-hover: #3d8bfd;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --toggle-bg: #4a4a6a;
    --toggle-slider: #1a1a2e;
}

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

.container {
    text-align: center;
    background-color: var(--container-bg);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 12px var(--shadow-color);
    width: 90%;
    max-width: 500px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

h1 {
    color: var(--text-color);
    margin-bottom: 1.5rem;
    transition: color 0.3s ease;
}

#generate-btn {
    background-color: var(--btn-bg);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 1.5rem;
}

#generate-btn:hover {
    background-color: var(--btn-hover);
}

/* Theme Toggle Switch */
.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-toggle-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.toggle-switch {
    position: relative;
    width: 60px;
    height: 30px;
    background-color: var(--toggle-bg);
    border-radius: 30px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.toggle-switch::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background-color: var(--toggle-slider);
    border-radius: 50%;
    transition: transform 0.3s ease, background-color 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .toggle-switch::before {
    transform: translateX(30px);
    background-color: #ffd43b;
}

.toggle-switch .icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
}

.toggle-switch .sun-icon {
    left: 8px;
}

.toggle-switch .moon-icon {
    right: 8px;
}

/* Responsive styles */
@media (max-width: 600px) {
    .container {
        padding: 1.5rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    #generate-btn {
        width: 100%;
        padding: 0.8rem;
    }

    .theme-toggle {
        top: 10px;
        right: 10px;
    }

    .theme-toggle-label {
        display: none;
    }

    .toggle-switch {
        width: 50px;
        height: 26px;
    }

    .toggle-switch::before {
        width: 20px;
        height: 20px;
    }

    [data-theme="dark"] .toggle-switch::before {
        transform: translateX(24px);
    }
}
