:root {
    --z-red: #c4311e;
    --z-dark-green: #2f3b1e;
    --z-green: #4a5b2c;
    --z-black: #111111;
    --z-gray: #2b2b2b;
    --z-light: #e2e8f0;
    --z-white: #ffffff;
    --z-glass: rgba(255, 255, 255, 0.1);
    --theme-bg: linear-gradient(135deg, var(--z-dark-green) 0%, var(--z-black) 100%);
    --theme-card: rgba(47, 59, 30, 0.7);
    --theme-text: #e2e8f0;
    --theme-accent: #c4311e;
}
/* Default Theme (defined on the html tag) */
html {
    --theme-bg: linear-gradient(135deg, #f0f0f0 0%, #ffffff 100%);
    --theme-card: rgba(255, 255, 255, 0.8);
    --theme-text: #333333;
    --theme-accent: #c4311e;
}



h1 {
    margin-top: 0;
    color: var(--theme-accent);
}

p {
    line-height: 1.6;
}

.theme-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
    flex-wrap: wrap;
}

/* CORRECTED: Renamed to .theme-button to match the JS selector */
.theme-button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 50px;
    background: var(--theme-accent);
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s, box-shadow 0.2s;
}

.theme-button:hover {
    transform: translateY(-2px);
}

.theme-button.active {
    transform: scale(1.05);
    box-shadow: 0 0 0 3px rgba(196, 49, 30, 0.3);
}

/* This targets the #statusMessage div from your HTML */
.status-message {
    position: fixed;
    bottom: 20px;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    background: var(--theme-card);
    color: var(--theme-text);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none; /* Prevents interaction */
}

.status-message.show {
    opacity: 1;
    transform: translateY(0);
}

/* --- Theme Classes --- */
/* CORRECTED: Selectors now target the <html> tag to match the JS logic */
html.theme-dark {
    --theme-bg: linear-gradient(135deg, #111111 0%, #2b2b2b 100%);
    --theme-card: rgba(43, 43, 43, 0.8);
    --theme-text: #e2e8f0;
}

html.theme-light {
    --theme-bg: linear-gradient(135deg, #f0f0f0 0%, #ffffff 100%);
    --theme-card: rgba(255, 255, 255, 0.8);
    --theme-text: #333333;
}

html.theme-glass {
    --theme-bg: linear-gradient(135deg, rgba(47, 59, 30, 0.8) 0%, rgba(17, 17, 17, 0.9) 100%);
    --theme-card: rgba(255, 255, 255, 0.1);
    --theme-text: #e2e8f0;
}

body.theme-glass {
    backdrop-filter: blur(10px);
}

html.theme-futuristic {
    --theme-bg: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
    --theme-card: rgba(196, 49, 30, 0.1);
    --theme-text: #00ffff;
    --theme-accent: #ff073a;
}/* Default Theme (defined on the html tag) */
html {
    --theme-bg: linear-gradient(135deg, #f0f0f0 0%, #ffffff 100%);
    --theme-card: rgba(255, 255, 255, 0.8);
    --theme-text: #343232;
    --theme-accent: #c4311e;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--theme-bg);
    color: var(--theme-text);
    transition: background 0.3s ease, color 0.3s ease;
}

.container {
    background: var(--theme-card);
    border-radius: 5px;
     color: var(--theme-text);
}

h1 {
    margin-top: 0;
    color: var(--theme-accent);
}

p {
    line-height: 1.6;
}

.theme-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
    flex-wrap: wrap;
}

/* CORRECTED: Renamed to .theme-button to match the JS selector */
.theme-button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 50px;
    background: var(--theme-accent);
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s, box-shadow 0.2s;
}

.theme-button:hover {
    transform: translateY(-2px);
}

.theme-button.active {
    transform: scale(1.05);
    box-shadow: 0 0 0 3px rgba(196, 49, 30, 0.3);
}

/* This targets the #statusMessage div from your HTML */
.status-message {
    position: fixed;
    bottom: 20px;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    background: var(--theme-card);
    color: var(--theme-text);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none; /* Prevents interaction */
}

.status-message.show {
    opacity: 1;
    transform: translateY(0);
}

/* --- Theme Classes --- */
/* CORRECTED: Selectors now target the <html> tag to match the JS logic */
html.theme-dark {
    --theme-bg: linear-gradient(135deg, #111111 0%, #2b2b2b 100%);
    --theme-card: rgba(43, 43, 43, 0.8);
    --theme-text: #e2e8f0;
}

html.theme-light {
    --theme-bg: linear-gradient(135deg, #f0f0f0 0%, #ffffff 100%);
    --theme-card: rgba(255, 255, 255, 0.8);
    --theme-text: #333333;
}

html.theme-glass {
    --theme-bg: linear-gradient(135deg, rgba(47, 59, 30, 0.8) 0%, rgba(17, 17, 17, 0.9) 100%);
    --theme-card: rgba(255, 255, 255, 0.1);
    --theme-text: #e2e8f0;
}

body.theme-glass {
    backdrop-filter: blur(10px);
}

html.theme-futuristic {
    --theme-bg: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
    --theme-card: rgba(196, 49, 30, 0.1);
    --theme-text: #00ffff;
    --theme-accent: #ff073a;
}
/* Apply variables to the widget */
.control-panel {
    background: var(--theme-widget-bg);
    border: 1px solid var(--theme-widget-border);
}

.theme-button {
    border: 1px solid var(--theme-accent);
}

/* Base styles that might be in your main CSS already - you can remove these if they are duplicates */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
}

/* Enhanced AI Widget Styles */
.ai-widget {
    position: fixed; /* Changed from absolute to fixed */
    right: 25px;
    bottom: 25px;
    z-index: 10000;
}

.ai-head {
    width: 70px;
    height: 70px;
    background: var(--z-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 35px rgba(196, 49, 30, 0.4);
    transition: all 0.3s ease;
    animation: float 4s ease-in-out infinite; /* This should work now */
    position: relative;
    z-index: 2;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.ai-head::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: var(--z-red);
    border-radius: 50%;
    z-index: -1;
    filter: blur(15px);
    opacity: 0.6;
}

.ai-head:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 40px rgba(196, 49, 30, 0.6);
}

.ai-head i {
    color: white;
    font-size: 32px;
    transition: transform 0.3s ease;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.ai-head:hover i {
    transform: scale(1.2);
}

.pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(196, 49, 30, 0.4);
    animation: pulse 2s ease-out infinite;
    z-index: -1;
}

.control-panel {
    position: absolute;
    bottom: 85px;
    right: 0;
    width: 350px;
    background: rgba(47, 59, 30, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
    border: 1px solid var(--z-red);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1;
    max-height: 80vh;
    overflow-y: auto;
}

.control-panel.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.control-panel h3 {
    margin: 0 0 20px 0;
    color: white;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    font-weight: 600;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--z-red);
}

.control-panel h3 i {
    margin-right: 12px;
    color: var(--z-red);
}

.control-section {
    margin: 20px 0;
}

.control-section-title {
    font-size: 1.1rem;
    color: var(--z-red);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.control-section-title i {
    margin-right: 10px;
}

.control-option {
    display: flex;
    align-items: center;
    padding: 15px;
    margin: 12px 0;
    background: rgba(196, 49, 30, 0.15);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.control-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(196, 49, 30, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.control-option:hover {
    background: rgba(196, 49, 30, 0.25);
    transform: translateX(5px);
}

.control-option:hover::before {
    opacity: 1;
}

.control-option i {
    margin-right: 15px;
    font-size: 22px;
    color: var(--z-red);
    min-width: 24px;
    text-align: center;
}

.control-option span {
    flex-grow: 1;
    font-weight: 500;
    font-size: 1rem;
}

.toggle-switch {
    width: 50px;
    height: 26px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 13px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s ease;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s ease;
}

.toggle-switch.active {
    background: var(--z-red);
}

.toggle-switch.active::after {
    transform: translateX(24px);
}

.slider-control {
    margin: 15px 0;
}

.slider-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.slider {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--z-red);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 0 10px rgba(196, 49, 30, 0.5);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--z-red);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 0 10px rgba(196, 49, 30, 0.5);
}

.theme-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.theme-button {
    padding: 12px;
    background: rgba(47, 59, 30, 0.3);
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
    text-align: center;
    border: 1px solid var(--z-red);
    color: var(--z-light);
}

.theme-button:hover {
    background: rgba(196, 49, 30, 0.3);
    transform: translateY(-2px);
}

.theme-button.active {
    background: rgba(196, 49, 30, 0.3);
    border-color: var(--z-red);
    color: var(--z-light);
    font-weight: 500;
}

.font-option {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.font-button {
    padding: 10px;
    background: rgba(47, 59, 30, 0.3);
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
    text-align: center;
    border: 1px solid var(--z-red);
    color: var(--z-light);
}

.font-button:hover {
    background: rgba(196, 49, 30, 0.3);
    transform: translateY(-2px);
}

.font-button.active {
    background: rgba(196, 49, 30, 0.3);
    border-color: var(--z-red);
    color: var(--z-light);
    font-weight: 500;
}

.status-indicator {
    font-size: 12px;
    padding: 4px 10px;
    background: rgba(47, 59, 30, 0.5);
    border-radius: 10px;
    margin-left: 10px;
    color: var(--z-light);
}

.voice-command {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 15px;
    padding: 12px;
    background: rgba(196, 49, 30, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.voice-command:hover {
    background: rgba(196, 49, 30, 0.3);
}

.voice-command.active {
    background: rgba(196, 49, 30, 0.4);
    animation: pulse 1s infinite;
}

/* Animations */
@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-12px);
    }
    100% {
        transform: translateY(0px);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(196, 49, 30, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(196, 49, 30, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(196, 49, 30, 0);
    }
}

@keyframes hologram {
    0% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 100% 100%;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .ai-widget {
        right: 15px;
        bottom: 15px;
    }
    
    .ai-head {
        width: 60px;
        height: 60px;
    }
    
    .ai-head i {
        font-size: 28px;
    }
    
    .control-panel {
        width: 300px;
        right: -10px;
    }
    
    .theme-options, .font-option {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .control-panel {
        width: 280px;
        padding: 20px;
    }
    
    .control-option {
        padding: 12px;
    }
}



/* Font classes */
.font-inter {
    font-family: 'Inter', sans-serif !important;
}

.font-arial {
    font-family: Arial, sans-serif !important;
}

.font-georgia {
    font-family: Georgia, serif !important;
}

.font-monospace {
    font-family: 'Courier New', monospace !important;
}

.font-tahoma {
    font-family: Tahoma, sans-serif !important;
}

.font-bahnschrift {
    font-family: 'Bahnschrift', 'Arial Narrow', sans-serif !important;
}

.font-titillium {
    font-family: 'Titillium Web', sans-serif !important;
}

.font-times {
    font-family: 'Times New Roman', serif !important;
}

/* Full screen mode 
body.full-screen {
    padding: 0 !important;
    overflow: hidden;
}

body.full-screen .container {
    max-width: 100% !important;
    padding: 20px;
}

body.full-screen .content-card {
    border-radius: 0 !important;
    margin: 0 !important;
}
*/
/* Status message styling */
.status-message {
    position: fixed;
    bottom: 100px;
    right: 20px;
    background: rgba(47, 59, 30, 0.9);
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--z-red);
    pointer-events: none;
}

/* Parallax effects */
.parallax-layer {
    transition: transform 0.1s ease;
}

/* 3D transition */
.page-3d {
    perspective: 1000px;
}

.page-3d .content-card {
    transform-style: preserve-3d;
    transition: transform 0.5s;
}

.page-3d .content-card:hover {
    transform: rotateY(10deg) rotateX(5deg);
}

/* Holographic effect */
.holographic {
    background: linear-gradient(125deg, 
        rgba(196, 49, 30, 0.1), 
        rgba(47, 59, 30, 0.2), 
        rgba(196, 49, 30, 0.1));
    background-size: 200% 200%;
    animation: hologram 3s linear infinite;
    border: 1px solid rgba(196, 49, 30, 0.3);
}

/* Voice command indicator */
.voice-status {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(47, 59, 30, 0.9);
    color: white;
    padding: 10px 15px;
    border-radius: 50px;
    font-size: 14px;
    z-index: 1000;
    display: flex;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--z-red);
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

.voice-status.active {
    opacity: 1;
    transform: translateY(0);
}

.voice-status i {
    margin-right: 8px;
    color: var(--z-red);
}

/* Note: additional styling for content-card, h1, etc., was removed as it's likely part of your main app styles. */
/* You may need to copy some of those from the original <style> tag if elements look different. */