/* Layout Classes */
.min-h-screen { min-height: 100vh; }
.transition-all { transition: all 0.5s ease; }
.duration-500 { transition-duration: 0.5s; }
.fixed { position: fixed; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.overflow-hidden { overflow: hidden; }
.pointer-events-none { pointer-events: none; }
.absolute { position: absolute; }
.relative { position: relative; }
.z-10 { z-index: 10; }

/* Container and spacing */
.container { max-width: 1200px; margin: 0 auto; }
.mx-auto { margin-left: auto; margin-right: auto; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.p-8 { padding: 2rem; }
.p-6 { padding: 1.5rem; }
.p-3 { padding: 0.75rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mr-2 { margin-right: 0.5rem; }
.mr-3 { margin-right: 0.75rem; }
.mr-4 { margin-right: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-20 { margin-top: 5rem; }

/* Flexbox */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.flex-1 { flex: 1; }
.flex-col { flex-direction: column; }
.space-x-1 > * + * { margin-left: 0.25rem; }
.space-x-4 > * + * { margin-left: 1rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-8 { gap: 2rem; }

/* Grid */
.grid { display: grid;}
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }

/* Text */
.text-center { text-align: center; }
.text-5xl { font-size: 3rem; line-height: 1; }
.text-xl { font-size: 1.25rem; }
.text-lg { font-size: 1.125rem; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.leading-relaxed { line-height: 1.625; }

/* Width and Height */
.w-full { width: 100%; }
.w-20 { width: 5rem; }
.w-16 { width: 4rem; }
.w-12 { width: 3rem; }
.w-10 { width: 2.5rem; }
.w-8 { width: 2rem; }
.w-6 { width: 1.5rem; }
.w-5 { width: 1.25rem; }
.w-4 { width: 1rem; }
.w-3 { width: 0.75rem; }
.w-80 { width: 20rem; }
.h-full { height: 100%; }
.h-20 { height: 5rem; }
.h-16 { height: 4rem; }
.h-12 { height: 3rem; }
.h-10 { height: 2.5rem; }
.h-8 { height: 2rem; }
.h-6 { height: 1.5rem; }
.h-5 { height: 1.25rem; }
.h-4 { height: 1rem; }
.h-3 { height: 0.75rem; }
.h-80 { height: 20rem; }
.min-h-80 { min-height: 20rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-6xl { max-width: 72rem; }

/* Borders and Rounded */
.rounded-full { border-radius: 9999px; }
.rounded-3xl { border-radius: 1.5rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-xl { border-radius: 0.75rem; }
.border-0 { border-width: 0; }
.border { border-width: 1px; }
.border-2 { border-width: 2px; }
.border-dashed { border-style: dashed; }

/* Colors - using CSS variables */
.bg-gradient-to-r { background: linear-gradient(to right, var(--from-color), var(--to-color)); }
.bg-red-500 { background-color: #ef4444; }
.bg-yellow-500 { background-color: #eab308; }
.bg-green-500 { background-color: #22c55e; }
.bg-purple-500 { background-color: #a855f7; }
.bg-blue-500 { background-color: #3b82f6; }
.bg-indigo-500 { background-color: #6366f1; }
.from-purple-500 { --from-color: #a855f7; }
.from-purple-600 { --from-color: #9333ea; }
.from-purple-700 { --from-color: #7c3aed; }
.from-green-500 { --from-color: #22c55e; }
.from-blue-500 { --from-color: #3b82f6; }
.from-red-500 { --from-color: #ef4444; }
.to-purple-500 { --to-color: #a855f7; }
.from-yellow-500 { --from-color: #eab308; }
.to-orange-500 { --to-color: #f59e42; }
.to-blue-500 { --to-color: #3b82f6; }
.to-blue-600 { --to-color: #2563eb; }
.to-blue-700 { --to-color: #1d4ed8; }
.to-pink-500 { --to-color: #ec4899; }
.to-teal-500 { --to-color: #14b8a6; }
.to-cyan-500 { --to-color: #06b6d4; }
.to-emerald-500 { --to-color: #10b981; }
.text-white { color: white; }

/* Transform and Animation */
.transform { transform: translateX(0) translateY(0) rotate(0) skewX(0) skewY(0) scaleX(1) scaleY(1); }
.-translate-x-1\/2 { transform: translateX(-50%); }
.-translate-y-1\/2 { transform: translateY(-50%); }
.-top-40 { top: -10rem; }
.-right-40 { right: -10rem; }
.-bottom-40 { bottom: -10rem; }
.-left-40 { left: -10rem; }
.top-1\/2 { top: 50%; }
.left-1\/2 { left: 50%; }
.mix-blend-multiply { mix-blend-mode: multiply; }
.filter { filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); }
.blur-xl { --tw-blur: blur(24px); filter: var(--tw-blur); }
.opacity-20 { opacity: 0.2; }
.opacity-50 { opacity: 0.5; }

/* Hover and Focus states */
.hover\:scale-105:hover { transform: scale(1.05); }
.hover\:transform:hover { transform: translateX(0) translateY(0) rotate(0) skewX(0) skewY(0) scaleX(1) scaleY(1); }
.hover\:from-purple-700:hover { --from-color: #7c3aed; }
.hover\:to-blue-700:hover { --to-color: #1d4ed8; }
.transition-all { transition: all 0.3s ease; }
.duration-300 { transition-duration: 0.3s; }
.duration-200 { transition-duration: 0.2s; }
.focus\:outline-none:focus { outline: none; }
.focus\:ring-4:focus { box-shadow: 0 0 0 4px rgba(var(--ring-color), 0.5); }
.focus\:ring-purple-500:focus { --ring-color: 147, 51, 234; }
.focus\:ring-gray-500:focus { --ring-color: 107, 114, 128; }
.focus\:ring-opacity-50:focus { box-shadow: 0 0 0 4px rgba(var(--ring-color), 0.5); }
.resize-none { resize: none; }
.cursor-pointer { cursor: pointer; }

/* Display utilities */
.hidden { display: none; }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }

/* Responsive prefixes */
@media (min-width: 640px) {
    .sm\:flex-row { flex-direction: row; }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
    .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
}

.btn-gradient-primary {
    background: linear-gradient(to right, #9333ea, #2563eb);
}

.btn-gradient-primary:hover {
    background: linear-gradient(to right, #7c3aed, #1d4ed8);
}
/* CSS Custom Properties for Theme Management */
:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-surface: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #ffffff;
    --border-color: #475569;
    --accent-color: #6366f1;
    --accent-hover: #4f46e5;
    --glass-bg: rgba(30, 41, 59, 0.8);
    --glass-border: rgba(148, 163, 184, 0.2);
    --shadow-color: rgba(0, 0, 0, 0.3);
}

/* Theme Variables */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-surface: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #475569;
    --accent-color: #890eee;
    --accent-hover: #4f46e5;
    --glass-bg: rgba(30, 41, 59, 0.8);
    --glass-border: rgba(148, 163, 184, 0.2);
    --shadow-color: rgba(0, 0, 0, 0.3);
}

[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-surface: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --border-color: #cbd5e1;
    --accent-color: #6366f1;
    --accent-hover: #4f46e5;
    --glass-bg: rgba(248, 250, 252, 0.8);
    --glass-border: rgba(71, 85, 105, 0.2);
    --shadow-color: rgba(0, 0, 0, 0.1);
}

/* Global Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    transition: all 0.3s ease;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Background Effects */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-20px) rotate(5deg); }
    50% { transform: translateY(-40px) rotate(0deg); }
    75% { transform: translateY(-20px) rotate(-5deg); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* Enhanced Glassmorphism Effects */
.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: 
        0 8px 32px var(--shadow-color),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.glass-effect:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 12px 40px var(--shadow-color),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Theme Toggle Button */
.theme-toggle-btn {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.theme-toggle-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px var(--shadow-color);
}

.theme-toggle-btn:focus {
    outline: none;
    ring: 4px;
    ring-color: rgba(99, 102, 241, 0.5);
}

/* Gradient Text Effect */
.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(99, 102, 241, 0.4); }
    50% { box-shadow: 0 0 30px rgba(99, 102, 241, 0.8); }
}

.animate-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Tab Navigation Styles */
.tab-navigation {
    margin-bottom: 1rem;
}

.tab-btn {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    position: relative;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(99, 102, 241, 0.1);
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.tab-btn.active:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

/* Enhanced Code Editor */
.code-editor {
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    font-family: 'SF Mono', Monaco, Inconsolata, 'Roboto Mono', Consolas, 'Courier New', monospace;
    resize: vertical;
    transition: all 0.3s ease;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color) var(--bg-surface);
}

.code-editor:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.code-editor::-webkit-scrollbar {
    width: 8px;
}

.code-editor::-webkit-scrollbar-track {
    background: var(--bg-surface);
}

.code-editor::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 4px;
}

.code-editor::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}

/* File Upload Zone */
.file-upload-zone {
    width: 100%;
}

#dropZone {
    border-color: var(--border-color);
    background: transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

#dropZone:hover {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.05);
    transform: translateY(-2px);
}

#dropZone.drag-over {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
    transform: scale(1.02);
}

/* File List Styles */
.file-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.file-item:hover {
    background: var(--bg-secondary);
    border-color: var(--accent-color);
}

/* Language Detector */
#languageDetector {
    transition: all 0.3s ease;
}

#languageDetector span {
    background: var(--accent-color);
    color: white;
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-weight: 500;
}

/* Enhanced Button Styles */
button {
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-weight: 500;
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

button:focus {
    outline: none;
}

/* Primary Button (Analyze) */
.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #5a67d8, #6b46c1);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Secondary Button (Clear, Copy) */
.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    padding: 1.75rem 3.5rem; /* Even larger padding for bigger background */
    font-size: 1.15rem; /* Optional: slightly larger text for balance */
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--accent-color);
}

/* Utility Classes */
.bg-primary { background-color: var(--bg-primary); }
.bg-secondary { background-color: var(--bg-secondary); }
.bg-surface { background-color: var(--bg-surface); }
.bg-accent { background-color: var(--accent-color); }
.bg-accent-hover { background-color: var(--accent-hover); }

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.border-accent { border-color: var(--border-color); }

/* Loading Animation */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

.loading-dots .dot {
    opacity: 0.4;
    animation: loading-pulse 1.4s infinite ease-in-out;
}

@keyframes loading-pulse {
    0%, 80%, 100% { opacity: 0.4; }
    40% { opacity: 1; }
}

/* Enhanced Output Formatting */
.formatted-output {
    line-height: 1.7;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.formatted-output h1,
.formatted-output h2,
.formatted-output h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

.formatted-output h1 {
    font-size: 1.5rem;
    color: #60a5fa;
    border-bottom: 2px solid rgba(96, 165, 250, 0.3);
    padding-bottom: 0.5rem;
}

.formatted-output h2 {
    font-size: 1.25rem;
    color: #93c5fd;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.formatted-output h3 {
    font-size: 1.125rem;
    color: #a78bfa;
}

.formatted-output p {
    margin-bottom: 1rem;
    text-align: justify;
    line-height: 1.6;
}

.formatted-output code {
    padding: 0.25rem 0.5rem;
    background-color: var(--bg-surface);
    color: #10b981;
    border-radius: 0.375rem;
    font-family: 'SF Mono', Monaco, Inconsolata, 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 0.875rem;
    border: 1px solid var(--border-color);
    font-weight: 500;
}

[data-theme="light"] .formatted-output code {
    background-color: #f1f5f9;
    color: #059669;
    border-color: #cbd5e1;
}

.formatted-output pre {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    margin: 1rem 0;
    overflow-x: auto;
    font-family: 'SF Mono', Monaco, Inconsolata, 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    position: relative;
}

.formatted-output pre:hover {
    border-color: var(--accent-color);
}

.formatted-output pre code {
    background: none;
    border: none;
    padding: 0;
    color: #10b981;
}

[data-theme="light"] .formatted-output pre code {
    color: #059669;
}

.formatted-output ul,
.formatted-output ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.formatted-output li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.formatted-output li::marker {
    color: var(--accent-color);
}

.formatted-output blockquote {
    border-left: 4px solid var(--accent-color);
    padding-left: 1rem;
    margin: 1rem 0;
    font-style: italic;
    color: var(--text-secondary);
    background: linear-gradient(90deg, 
        rgba(99, 102, 241, 0.1) 0%, 
        rgba(99, 102, 241, 0.05) 50%,
        transparent 100%);
    border-radius: 0 0.375rem 0.375rem 0;
    padding: 0.75rem 1rem;
    position: relative;
}

.formatted-output blockquote::before {
    content: '"';
    font-size: 3rem;
    color: var(--accent-color);
    position: absolute;
    top: -0.5rem;
    left: 0.5rem;
    opacity: 0.3;
}

.formatted-output strong {
    font-weight: 600;
    color: var(--text-primary);
}

.formatted-output em {
    font-style: italic;
    color: #93c5fd;
}

[data-theme="light"] .formatted-output em {
    color: #3730a3;
}

.formatted-output table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 12px var(--shadow-color);
}

.formatted-output th,
.formatted-output td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.formatted-output th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
    position: relative;
}

.formatted-output th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-color), transparent);
}

.formatted-output tr:hover {
    background: rgba(99, 102, 241, 0.05);
}

.formatted-output tr:nth-child(even) {
    background: rgba(148, 163, 184, 0.02);
}

/* Enhanced Syntax Highlighting */
.formatted-output .language-python .keyword {
    color: #f59e0b;
    font-weight: 500;
}

.formatted-output .language-python .string {
    color: #10b981;
}

.formatted-output .language-python .comment {
    color: var(--text-secondary);
    font-style: italic;
}

.formatted-output .language-javascript .keyword {
    color: #8b5cf6;
    font-weight: 500;
}

.formatted-output .language-javascript .string {
    color: #10b981;
}

.formatted-output .language-javascript .comment {
    color: var(--text-secondary);
    font-style: italic;
}

.formatted-output .language-html .tag {
    color: #ef4444;
}

.formatted-output .language-html .attribute {
    color: #f59e0b;
}

.formatted-output .language-css .property {
    color: #06b6d4;
}

.formatted-output .language-css .value {
    color: #10b981;
}

/* Feature Cards */
.feature-card {
    transition: all 0.3s ease;
    cursor: pointer;
    transition: all 0.3s ease;
    cursor: pointer;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);

}

.feature-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 35px var(--shadow-color);
    background: rgba(99, 102, 241, 0.1); /* Slight color change on hover */
}
.feature-card svg {
    width: 2.5rem; /* Matches w-10 */
    height: 2.5rem; /* Matches h-10 */
    stroke-width: 2;
    transition: stroke 0.3s ease;
}

.feature-card:hover svg {
    stroke: var(--accent-color); /* Optional: Change icon color on hover */
}

/* Toast Notifications */
.toast {
    min-width: 300px;
    max-width: 400px;
    word-wrap: break-word;
    font-weight: 500;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .glass-effect {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .formatted-output {
        font-size: 0.9rem;
    }
    
    .formatted-output h1 { font-size: 1.25rem; }
    .formatted-output h2 { font-size: 1.125rem; }
    .formatted-output h3 { font-size: 1rem; }
    
    .formatted-output pre {
        font-size: 0.8rem;
        padding: 0.75rem;
        margin: 0.75rem 0;
    }
    
    .formatted-output code {
        font-size: 0.8rem;
        padding: 0.2rem 0.4rem;
    }
    
    .code-editor {
        font-size: 0.875rem;
    }
    
    .glass-effect {
        padding: 1rem;
        margin-bottom: 1rem;
    }
}

@media (max-width: 640px) {
    .tab-btn {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
    
    .feature-card {
        padding: 1rem !important;
    }
    
    .theme-toggle-btn {
        padding: 0.5rem;
    }
    
    .gradient-text {
        font-size: 2.5rem;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .animate-float,
    .animate-pulse-glow,
    .animate-spin {
        animation: none;
    }
}

/* Focus indicators for keyboard navigation */
button:focus-visible,
textarea:focus-visible,
input:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .glass-effect {
        background: var(--bg-surface);
        border: 2px solid var(--border-color);
    }
    
    .gradient-text {
        background: var(--text-primary);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
}

/* Print styles */
@media print {
    .background-effects,
    .theme-toggle-btn,
    button {
        display: none !important;
    }
    
    .glass-effect {
        background: white !important;
        color: black !important;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
    }
    
    .formatted-output {
        color: black !important;
    }
    
    .formatted-output code,
    .formatted-output pre {
        background: #f5f5f5 !important;
        color: black !important;
        border: 1px solid #ccc !important;
    }
}

.file-content-preview {
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.75rem;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    max-height: 200px;
    overflow: auto;
    white-space: pre-wrap;
}
/* Hide the default file input */
input[type="file"] {
    display: none;
}

#chatTab {
    width: 100%;
    padding: 1rem;
}

#chatMessages {
    height: 400px;
    min-height: 400px;
    width: 100%;
    overflow-y: auto;
    padding: 1.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    scroll-behavior: smooth;
}

#chatMessages::-webkit-scrollbar {
    width: 8px;
}

#chatMessages::-webkit-scrollbar-track {
    background: var(--bg-surface);
    border-radius: 4px;
}

#chatMessages::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 4px;
}

/* Message Styles */
#chatMessages > div {
    margin-bottom: 1.5rem;
}

/* User Message */
#chatMessages .flex.justify-end > div {
    background: linear-gradient(135deg, var(--accent-color), #4f46e5);
    color: white;
    padding: 1rem 1.2rem;
    border-radius: 1rem 1rem 0.25rem 1rem;
    max-width: 80%;
    position: relative;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.1);
}

/* AI Message */
#chatMessages .flex.justify-start > div {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 1rem 1.2rem;
    border-radius: 1rem 1rem 1rem 0.25rem;
    max-width: 80%;
    position: relative;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* Message Content */
#chatMessages .text-sm {
    line-height: 1.5;
    font-size: 0.95rem;
}

/* Welcome Message */
#chatMessages .text-center {
    background: transparent;
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
    margin: 2rem auto;
    max-width: 90%;
}

/* Chat Input Container */
.chat-input-container {
    margin-top: 1rem;
    position: relative;
}

#chatInput {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    transition: all 0.3s ease;
    padding: 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

#chatInput:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}



