:root {
    --background: #0a0e17;
    --surface: #111827;
    --surface-light: #1f2937;
    --text: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --border: rgba(255, 255, 255, 0.1);
    --accent-primary: #4f46e5;
    --accent-secondary: #8b5cf6;
    --accent-tertiary: #3b82f6;
    --gradient-primary: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    --gradient-secondary: linear-gradient(135deg, var(--accent-tertiary), var(--accent-secondary));
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --glow: 0 0 15px rgba(79, 70, 229, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background);
    color: var(--text);
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(79, 70, 229, 0.15), transparent 70%),
                radial-gradient(circle at bottom left, rgba(139, 92, 246, 0.1), transparent 70%);
    z-index: -1;
}

/* Header Styles */
.app-header {
    background: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem 1.5rem;
    position: relative;
    z-index: 10;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.025em;
}

.header-left i {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 1.5rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-select {
    background: rgba(31, 41, 55, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text);
    padding: 0.6rem 2.5rem 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    cursor: pointer;
    min-width: 160px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
}

.header-select:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.header-select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.3);
}

.clear-button {
    background: rgba(31, 41, 55, 0.5);
    border: none;
    color: var(--text);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.clear-button:hover {
    background: rgba(79, 70, 229, 0.2);
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--glow);
}

/* Chat Area */
.chat-area {
    flex: 1;
    overflow-y: auto;
    padding: 2rem 0;
    position: relative;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-primary) var(--surface);
}

.chat-area::-webkit-scrollbar {
    width: 6px;
}

.chat-area::-webkit-scrollbar-track {
    background: var(--surface);
}

.chat-area::-webkit-scrollbar-thumb {
    background-color: rgba(79, 70, 229, 0.5);
    border-radius: 20px;
}

.messages {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.message {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    border-radius: 12px;
    background: rgba(31, 41, 55, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    animation: fadeScale 0.4s ease-out;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.message:hover::before {
    opacity: 1;
}

.message:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    background: rgba(31, 41, 55, 0.9);
}

.message.user-message {
    background: rgba(79, 70, 229, 0.15);
    border: 1px solid rgba(79, 70, 229, 0.2);
}

.message.user-message:hover {
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.2);
}

.message.bot-message {
    position: relative;
}

.message.bot-message::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgba(79, 70, 229, 0.1)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 8V4H8'%3E%3C/path%3E%3Cpath d='M4 12H2'%3E%3C/path%3E%3Cpath d='M2 12a10 10 0 0 0 10 10c5.5 0 10-4.5 10-10S17.5 2 12 2'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: bottom right;
    background-size: 80px;
    opacity: 0.5;
    pointer-events: none;
}

/* Input Area */
.input-area {
    background: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.25rem 0;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 10;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
}

.input-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    gap: 0.75rem;
    align-items: center;
    background: rgba(31, 41, 55, 0.8);
    border-radius: 16px;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.input-container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient-primary);
    z-index: -1;
    border-radius: 18px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.input-container:focus-within::before {
    opacity: 1;
}

.input-container:focus-within {
    box-shadow: var(--glow);
    transform: translateY(-2px);
    border-color: transparent;
}

.input-container:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.upload-button {
    background: rgba(31, 41, 55, 0.5);
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.6rem;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-button:hover {
    background: rgba(79, 70, 229, 0.2);
    color: var(--text);
    transform: scale(1.1);
}

#user-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 1rem;
    padding: 0.5rem;
    font-family: 'Inter', sans-serif;
}

#user-input:focus {
    outline: none;
    color: var(--text);
}

#user-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.send-button {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.6rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.send-button:not(:disabled) {
    background: var(--gradient-primary);
    color: white;
    width: 40px;
    height: 40px;
    box-shadow: var(--shadow-sm);
}

.send-button:not(:disabled):hover {
    transform: scale(1.1);
    box-shadow: var(--glow);
}

.input-footer {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 1rem;
    animation: fadeScale 0.3s ease-out;
    transition: all 0.3s ease;
    opacity: 0.7;
    letter-spacing: 0.025em;
}

/* Styling for code blocks and formatting */
code {
    background: rgba(0, 0, 0, 0.2);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9em;
    color: #a5b4fc;
}

strong {
    color: #c7d2fe;
    font-weight: 600;
}

em {
    color: #a5b4fc;
}

hr {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.1), transparent);
    margin: 1.5rem 0;
}

li {
    margin-left: 1.5rem;
    margin-bottom: 0.5rem;
    position: relative;
}

li::before {
    content: '•';
    color: var(--accent-primary);
    position: absolute;
    left: -1.2rem;
}

/* Special formatting for solution steps and answers */
.solution-step {
    border-left: 3px solid var(--accent-primary);
    padding-left: 1rem;
    margin: 1rem 0;
    animation: fadeScale 0.3s ease-out;
    transition: all 0.3s ease;
    background: rgba(79, 70, 229, 0.05);
    padding: 1rem;
    border-radius: 0 8px 8px 0;
}

.solution-step:hover {
    transform: translateX(5px);
    background: rgba(79, 70, 229, 0.1);
}

.final-answer {
    background: linear-gradient(to right, rgba(79, 70, 229, 0.1), rgba(139, 92, 246, 0.1));
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border: 1px solid rgba(79, 70, 229, 0.2);
    animation: fadeScale 0.3s ease-out;
    transition: all 0.3s ease;
}

.final-answer:hover {
    transform: scale(1.02);
    box-shadow: var(--glow);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-select {
        min-width: 120px;
        font-size: 0.8rem;
        padding: 0.5rem 2rem 0.5rem 0.75rem;
    }
    
    .header-left {
        font-size: 1.1rem;
    }
    
    .message {
        padding: 1rem;
    }
    
    .input-container {
        padding: 0.6rem 0.8rem;
    }
}

/* Add more specific mobile adjustments for smaller screens */
@media (max-width: 576px) {
    /* Header adjustments for very small screens */
    .header-content {
        flex-direction: column;
        gap: 0.75rem;
        padding: 0.5rem 0;
    }
    
    .header-right {
        width: 100%;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .header-select {
        min-width: 110px;
        font-size: 0.75rem;
        flex: 1;
        max-width: 45%;
    }
    
    .exam-countdown {
        order: -1;
        width: 100%;
        justify-content: center;
        margin-bottom: 0.25rem;
    }
    
    /* Input area fixes */
    .input-area {
        padding: 0.75rem 0.5rem;
    }
    
    .input-container {
        margin: 0 0.5rem;
        padding: 0.5rem 0.75rem;
    }
    
    /* Footer fixes */
    .input-footer {
        padding: 0 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .features-badges {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(31, 41, 55, 0.9);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.875rem;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-md);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Animations */
@keyframes fadeScale {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideUp {
    0% {
        transform: translateY(20px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Typing indicator animation */
.typing-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background: var(--accent-primary);
    border-radius: 50%;
    display: inline-block;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) {
    animation-delay: 0s;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-4px);
    }
}

/* Image styling in messages */
.message img {
    max-width: 100%;
    border-radius: 8px;
    margin-top: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.message img:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

/* Add a futuristic grid background */
.chat-area::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(31, 41, 55, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(31, 41, 55, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    z-index: -1;
    pointer-events: none;
}

/* Add styles for the premium badge */
.badge-premium {
    background: var(--gradient-primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: var(--shadow-sm);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.4);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(79, 70, 229, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0);
    }
}

/* Floating particles animation */
.floating-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.floating-particles::before,
.floating-particles::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(79, 70, 229, 0.05) 1px, transparent 1px),
        radial-gradient(circle at 75% 75%, rgba(139, 92, 246, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: particleFloat 20s linear infinite;
}

.floating-particles::after {
    background-size: 30px 30px;
    animation-duration: 30s;
    animation-direction: reverse;
    opacity: 0.5;
}

@keyframes particleFloat {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-100%);
    }
}

/* Scroll to bottom button */
.scroll-to-bottom {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    z-index: 100;
    opacity: 0.8;
}

.scroll-to-bottom:hover {
    transform: translateY(-3px);
    box-shadow: var(--glow);
    opacity: 1;
}

/* Feature badges */
.features-badges {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.feature-badge {
    background: rgba(79, 70, 229, 0.1);
    color: var(--text);
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.3s ease;
}

.feature-badge:hover {
    background: rgba(79, 70, 229, 0.2);
    transform: translateY(-2px);
}

.feature-badge i {
    color: var(--accent-primary);
}

.gemini-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 600;
}

/* Enhanced input footer */
.input-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.powered-by {
    font-size: 0.8rem;
}

/* Add a subtle animation to the messages */
.message {
    position: relative;
    overflow: hidden;
}

.message::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.05), transparent);
    transform: translateX(-100%);
    animation: shimmer 3s infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    20%, 100% {
        transform: translateX(100%);
    }
}

/* Responsive adjustments for the new elements */
@media (max-width: 768px) {
    .features-badges {
        gap: 0.5rem;
    }
    
    .feature-badge {
        font-size: 0.65rem;
        padding: 0.15rem 0.4rem;
    }
    
    .badge-premium {
        font-size: 0.65rem;
        padding: 0.15rem 0.4rem;
    }
    
    .scroll-to-bottom {
        width: 36px;
        height: 36px;
        bottom: 80px;
        right: 15px;
    }
}

@media (max-width: 576px) {
    .badge-premium {
        font-size: 0.6rem;
        padding: 0.1rem 0.3rem;
    }
    
    .feature-badge {
        font-size: 0.6rem;
        padding: 0.1rem 0.3rem;
        margin-bottom: 0.25rem;
    }
    
    .powered-by {
        font-size: 0.7rem;
        margin-bottom: 0.25rem;
    }
}

/* Message appear animation */
.message-appear {
    animation: messageAppear 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes messageAppear {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Floating particle animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0);
    }
    25% {
        transform: translateY(-15px) translateX(10px);
    }
    50% {
        transform: translateY(0) translateX(20px);
    }
    75% {
        transform: translateY(15px) translateX(10px);
    }
}

/* Rotating animation for clear button */
.rotating {
    animation: rotate 0.5s ease-in-out;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Typing indicator styling */
.typing-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background: var(--accent-primary);
    border-radius: 50%;
    display: inline-block;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) {
    animation-delay: 0s;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-4px);
    }
}

/* Question Templates */
.question-templates {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    display: none; /* Hidden when there are messages */
}

.question-templates h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--text);
    letter-spacing: -0.025em;
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.template-card {
    background: rgba(31, 41, 55, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
    animation: fadeScale 0.4s ease-out;
}

.template-card i {
    font-size: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.template-card span {
    font-size: 0.95rem;
    line-height: 1.4;
}

.template-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    background: rgba(79, 70, 229, 0.15);
    border-color: rgba(79, 70, 229, 0.2);
}

/* Exam Countdown */
.exam-countdown {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(31, 41, 55, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text);
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.exam-countdown i {
    color: var(--accent-primary);
}

#countdown-value {
    font-weight: 600;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Settings */
.settings-container {
    position: relative;
}

.settings-button {
    background: rgba(31, 41, 55, 0.5);
    border: none;
    color: var(--text);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.settings-button:hover {
    background: rgba(79, 70, 229, 0.2);
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--glow);
}

.settings-button.active {
    background: var(--accent-primary);
    color: white;
}

.settings-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.25rem;
    width: 250px;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    display: none;
    animation: fadeScale 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.settings-dropdown h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.theme-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.theme-option {
    background: rgba(31, 41, 55, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text);
    padding: 0.6rem;
    border-radius: 8px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.theme-option:hover {
    background: rgba(79, 70, 229, 0.1);
    transform: translateY(-2px);
}

.theme-option.active {
    background: var(--accent-primary);
    color: white;
    border-color: transparent;
}

.exam-date-setting {
    display: flex;
    gap: 0.5rem;
}

.exam-date-input {
    flex: 1;
    background: rgba(31, 41, 55, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text);
    padding: 0.6rem;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.exam-date-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.3);
}

.set-exam-date {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.set-exam-date:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow);
}

/* Light Theme Variables */
[data-theme="light"] {
    --background: #f8fafc;
    --surface: #ffffff;
    --surface-light: #f1f5f9;
    --text: #1e293b;
    --text-secondary: rgba(30, 41, 59, 0.7);
    --border: rgba(30, 41, 59, 0.1);
}

/* Purple Theme Variables */
[data-theme="purple"] {
    --accent-primary: #8b5cf6;
    --accent-secondary: #c084fc;
    --accent-tertiary: #a78bfa;
}

/* Blue Theme Variables */
[data-theme="blue"] {
    --accent-primary: #3b82f6;
    --accent-secondary: #60a5fa;
    --accent-tertiary: #93c5fd;
}

/* Sunset Theme Variables */
[data-theme="sunset"] {
    --accent-primary: #f97316;
    --accent-secondary: #fb923c;
    --accent-tertiary: #fdba74;
    --gradient-primary: linear-gradient(135deg, #f97316, #ec4899);
    --gradient-secondary: linear-gradient(135deg, #f59e0b, #f97316);
    --glow: 0 0 15px rgba(249, 115, 22, 0.5);
}

/* Blue Theme Variables */
[data-theme="blue"] {
    --accent-primary: #3b82f6;
    --accent-secondary: #60a5fa;
    --accent-tertiary: #93c5fd;
    --gradient-primary: linear-gradient(135deg, #3b82f6, #8b5cf6);
    --gradient-secondary: linear-gradient(135deg, #0ea5e9, #3b82f6);
    --glow: 0 0 15px rgba(59, 130, 246, 0.5);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .templates-grid {
        grid-template-columns: 1fr;
    }
    
    .exam-countdown {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
    }
    
    .settings-dropdown {
        width: 220px;
        padding: 1rem;
        right: -80px;
    }
    
    .theme-options {
        gap: 0.5rem;
    }
    
    .theme-option {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .settings-dropdown {
        width: 200px;
        right: -50px;
        padding: 0.75rem;
    }
    
    .theme-options {
        grid-template-columns: 1fr;
    }
    
    .theme-option {
        padding: 0.4rem;
        font-size: 0.75rem;
    }
    
    .exam-date-setting {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .set-exam-date {
        width: 100%;
    }
}

/* Sunset Theme Specific Styles */
[data-theme="sunset"] body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(249, 115, 22, 0.15), transparent 70%),
                radial-gradient(circle at bottom left, rgba(236, 72, 153, 0.1), transparent 70%);
    z-index: -1;
}

[data-theme="sunset"] .floating-particles .particle {
    background: rgba(249, 115, 22, 0.3);
}

[data-theme="sunset"] .message.user-message {
    background: rgba(249, 115, 22, 0.15);
    border: 1px solid rgba(249, 115, 22, 0.2);
}

[data-theme="sunset"] .message.user-message:hover {
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.2);
}

/* Blue Theme Specific Styles */
[data-theme="blue"] body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.15), transparent 70%),
                radial-gradient(circle at bottom left, rgba(139, 92, 246, 0.1), transparent 70%);
    z-index: -1;
}

[data-theme="blue"] .floating-particles .particle {
    background: rgba(59, 130, 246, 0.3);
}

[data-theme="blue"] .message.user-message {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

[data-theme="blue"] .message.user-message:hover {
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.2);
}

/* GCSENINE Theme Variables */
[data-theme="gcsenine"] {
    --accent-primary: #e50914;
    --accent-secondary: #ff3d47;
    --accent-tertiary: #ff5f68;
    --gradient-primary: linear-gradient(135deg, #e50914, #b81d24);
    --gradient-secondary: linear-gradient(135deg, #ff3d47, #e50914);
    --glow: 0 0 15px rgba(229, 9, 20, 0.5);
}

/* GCSENINE Theme Specific Styles */
[data-theme="gcsenine"] body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(229, 9, 20, 0.15), transparent 70%),
                radial-gradient(circle at bottom left, rgba(184, 29, 36, 0.1), transparent 70%);
    z-index: -1;
}

[data-theme="gcsenine"] .floating-particles .particle {
    background: rgba(229, 9, 20, 0.3);
}

[data-theme="gcsenine"] .message.user-message {
    background: rgba(229, 9, 20, 0.15);
    border: 1px solid rgba(229, 9, 20, 0.2);
}

[data-theme="gcsenine"] .message.user-message:hover {
    box-shadow: 0 8px 20px rgba(229, 9, 20, 0.2);
}

[data-theme="gcsenine"] .message.bot-message::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgba(229, 9, 20, 0.1)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 8V4H8'%3E%3C/path%3E%3Cpath d='M4 12H2'%3E%3C/path%3E%3Cpath d='M2 12a10 10 0 0 0 10 10c5.5 0 10-4.5 10-10S17.5 2 12 2'%3E%3C/path%3E%3C/svg%3E");
}

[data-theme="gcsenine"] .typing-indicator span {
    background: var(--accent-primary);
}

[data-theme="gcsenine"] code {
    color: #ff8a90;
}

[data-theme="gcsenine"] strong {
    color: #ffcdd2;
}

[data-theme="gcsenine"] em {
    color: #ff8a90;
}

[data-theme="gcsenine"] li::before {
    color: var(--accent-primary);
}

[data-theme="gcsenine"] .solution-step {
    border-left: 3px solid var(--accent-primary);
    background: rgba(229, 9, 20, 0.05);
}

[data-theme="gcsenine"] .solution-step:hover {
    background: rgba(229, 9, 20, 0.1);
}

[data-theme="gcsenine"] .final-answer {
    background: linear-gradient(to right, rgba(229, 9, 20, 0.1), rgba(184, 29, 36, 0.1));
    border: 1px solid rgba(229, 9, 20, 0.2);
}

/* Chat Settings */
.chat-settings {
    margin-bottom: 1rem;
}

.setting-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.setting-option label {
    font-size: 0.875rem;
    color: var(--text);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(31, 41, 55, 0.8);
    transition: .4s;
    border-radius: 20px;
}

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

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

input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

input:focus + .toggle-slider {
    box-shadow: 0 0 1px var(--accent-primary);
} 