@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700;900&display=swap');

/* Default Dark Mode Variables */
:root {
    --primary-gradient: linear-gradient(90deg, #6a11cb 0%, #2575fc 100%);
    --secondary-color: #b0b8c4;
    --background-color: #1a1a2e;
    --text-color: #e0e0e6;
    --card-background: rgba(255, 255, 255, 0.05);
    --shadow-color: rgba(0, 0, 0, 0.2);
    --border-color: rgba(255, 255, 255, 0.1);
    --glow-color: rgba(45, 129, 252, 0.7);
    --textarea-bg: rgba(0,0,0,0.2);
    --h1-color-transparent: transparent;
    --switch-bg: #4a4a6a;
}

/* Light Mode Variables */
body.light-mode {
    --primary-gradient: linear-gradient(90deg, #007bff 0%, #0056b3 100%);
    --secondary-color: #6c757d;
    --background-color: #f4f7f9;
    --text-color: #212529;
    --card-background: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --border-color: #dee2e6;
    --glow-color: rgba(0, 123, 255, 0.5);
    --textarea-bg: #f8f9fa;
    --h1-color-transparent: #343a40;
    --switch-bg: #ccc;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 40px 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.05) 1px, transparent 0);
    background-size: 40px 40px;
    transition: background-color 0.3s, color 0.3s;
}

/* Theme switch styles */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

.theme-icon {
    font-size: 24px;
    transition: opacity 0.4s ease;
    user-select: none;
}

.theme-icon.sun {
    opacity: 0.5;
}

.theme-icon.moon {
    opacity: 1;
}

body.light-mode .theme-icon.sun {
    opacity: 1;
}

body.light-mode .theme-icon.moon {
    opacity: 0.5;
}


.theme-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--switch-bg);
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background: var(--primary-gradient);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.container {
    width: 100%;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

header {
    text-align: center;
    padding: 20px 0;
}

header h1 {
    font-size: 3.5em;
    font-weight: 900;
    margin-bottom: 0.2em;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: var(--h1-color-transparent);
    background-clip: text;
}

body.light-mode header h1 {
    -webkit-text-fill-color: var(--text-color);
}


header p {
    font-size: 1.3em;
    color: var(--secondary-color);
}

.card, .info-card {
    background: var(--card-background);
    border-radius: 16px;
    padding: 30px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px 0 var(--shadow-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

body.light-mode .card, body.light-mode .info-card {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}


.card:hover, .info-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

body.light-mode .card:hover, body.light-mode .info-card:hover {
    border-color: var(--glow-color);
}

textarea {
    width: 100%;
    min-height: 120px;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--textarea-bg);
    color: var(--text-color);
    font-size: 1em;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
    transition: all 0.2s ease-in-out;
}

textarea:focus {
    outline: none;
    border-color: var(--glow-color);
    box-shadow: 0 0 10px var(--glow-color);
}

button#enhance-button {
    display: block;
    width: 100%;
    padding: 15px;
    margin-top: 20px;
    border: none;
    border-radius: 8px;
    background: var(--primary-gradient);
    color: white;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

button#enhance-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px var(--glow-color);
}

h2 {
    font-weight: 700;
    border: none;
    padding-bottom: 10px;
    margin-top: 0;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
}

#enhanced-question {
    min-height: 50px;
    font-size: 1.1em;
    line-height: 1.6;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--textarea-bg);
    padding: 1rem;
    margin-top: 1rem;
    white-space: pre-wrap;
}

.info-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 30px;
}

.info-card h2 {
    color: var(--secondary-color);
}

.info-card ul {
    padding-left: 20px;
    line-height: 1.8;
}

.info-card li {
    margin-bottom: 10px;
}

.info-card li::marker {
    color: #6a11cb;
}

body.light-mode .info-card li::marker {
    color: #007bff;
}

.info-card li strong {
    font-weight: 500;
    background: -webkit-linear-gradient(90deg, #6a11cb, #2575fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.light-mode .info-card li strong {
    background: -webkit-linear-gradient(90deg, #007bff, #0056b3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

@media (max-width: 768px) {
    body {
        padding: 20px 15px;
    }

    header h1 {
        font-size: 2.5em;
    }
    header p {
        font-size: 1.1em;
    }

    .card, .info-card {
        padding: 20px;
    }
}
