/* ========================================
   Theme Variables
   ======================================== */

:root {
    /* Dark Theme Colors (Default) */
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-tertiary: #1a1a1a;
    --bg-card: #1a1a1a;
    --bg-hover: #2a2a2a;

    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --text-tertiary: #a0a0a0;

    --accent-primary: #0066ff;
    --accent-secondary: #00ccff;
    --accent-hover: #0052cc;
    --accent-success: #00ff88;

    --border-color: #333333;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.7);

    --gradient-primary: linear-gradient(135deg, #0066ff 0%, #00ccff 100%);
    --gradient-dark: linear-gradient(180deg, #000000 0%, #1a1a1a 100%);

    /* Transition */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Light Theme */
[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-tertiary: #e8e8e8;
    --bg-card: #ffffff;
    --bg-hover: #e0e0e0;

    --text-primary: #1a1a1a;
    --text-secondary: #333333;
    --text-tertiary: #666666;

    --accent-primary: #0066ff;
    --accent-secondary: #0088ff;
    --accent-hover: #0052cc;
    --accent-success: #00cc66;

    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);

    --gradient-primary: linear-gradient(135deg, #0066ff 0%, #0088ff 100%);
    --gradient-dark: linear-gradient(180deg, #ffffff 0%, #f5f5f5 100%);
}

/* Theme Transition */
* {
    transition: background-color var(--transition-normal),
                color var(--transition-normal),
                border-color var(--transition-normal);
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

/* Body Theme Styles */
body {
    background-color: transparent;
    color: var(--text-primary);
}

/* HTML background for fallback */
html {
    background-color: var(--bg-primary);
}

/* Theme-aware Components */
.card,
.service-card,
.industry-card,
.testimonial-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

/* Buttons */
.btn-primary {
    background: var(--gradient-primary);
    color: #ffffff;
    border: none;
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--accent-primary);
}

.btn-secondary:hover {
    background: var(--accent-primary);
    color: #ffffff;
    transform: translateY(-2px);
}

/* Links */
a {
    color: var(--accent-secondary);
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-primary);
}

/* Form Elements */
input,
textarea,
select {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--accent-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

/* Navigation */
.navbar {
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

[data-theme="light"] .navbar {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

/* Sections - Transparent to show smoke background */
section {
    background-color: transparent;
}

.services-section,
.features-section {
    background-color: rgba(10, 10, 10, 0.3);
}

[data-theme="light"] .services-section,
[data-theme="light"] .features-section {
    background-color: rgba(245, 245, 245, 0.3);
}

/* Featured Elements */
.featured {
    border: 2px solid var(--accent-primary);
    box-shadow: 0 0 30px rgba(0, 102, 255, 0.2);
}

.highlighted {
    border: 2px solid var(--accent-success);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.2);
}

/* Footer */
.footer {
    background-color: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
}

/* Smoke Canvas Theme Adjustment */
[data-theme="light"] #smoke-canvas {
    opacity: 0.3;
    mix-blend-mode: multiply;
}

[data-theme="dark"] #smoke-canvas {
    opacity: 0.6;
    mix-blend-mode: screen;
}

/* Theme Toggle Button Styles */
.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
}

.theme-toggle:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.15);
}

.theme-icon {
    position: absolute;
    transition: all var(--transition-normal);
    color: #1a1a1a;
}

/* Dark theme toggle */
[data-theme="dark"] .theme-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .theme-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .theme-icon {
    color: white;
}

[data-theme="dark"] .sun-icon {
    opacity: 0;
    transform: rotate(-180deg) scale(0);
}

[data-theme="dark"] .moon-icon {
    opacity: 1;
    transform: rotate(0) scale(1);
}

[data-theme="light"] .sun-icon {
    opacity: 1;
    transform: rotate(0) scale(1);
}

[data-theme="light"] .moon-icon {
    opacity: 0;
    transform: rotate(180deg) scale(0);
}

/* Scrollbar Theme */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}

/* Selection Theme */
::selection {
    background: var(--accent-primary);
    color: #ffffff;
}

::-moz-selection {
    background: var(--accent-primary);
    color: #ffffff;
}
