:root {
    --won-green: #7CBB00;
    --won-green-light: #96e000;
    --won-blue: #005A8C;
    --won-blue-light: #0284c7;
    --bg-primary: #070b14;
    --bg-secondary: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-subtle: rgba(255, 255, 255, 0.09);
}

html.light {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.88);
    --text-main: #0f172a;
    --text-muted: #334155;
    --border-subtle: rgba(15, 23, 42, 0.12);
}

/* Daytime (Light Mode) Video Background Rules: Full 100% brightness & remove dark vignette/overlay */
html.light .bg-section-video {
    opacity: 1 !important;
}

html.light .bg-video-overlay {
    opacity: 0 !important;
    display: none !important;
}

/* Daytime readability adjustments for sections and text */
html.light header {
    background-color: rgba(255, 255, 255, 0.88) !important;
    border-color: rgba(15, 23, 42, 0.1) !important;
}

html.light header .text-white,
html.light .glass-card .text-white {
    color: #0f172a !important;
}

html.light header .text-slate-300,
html.light .text-slate-300,
html.light .text-slate-200 {
    color: #1e293b !important;
}

html.light .text-slate-400 {
    color: #475569 !important;
}

html.light #about,
html.light #estimator,
html.light #contact {
    background-color: #f1f5f9 !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
}

html.light #services h2,
html.light #services p[data-i18n="services_subtitle"],
html.light #portfolio h2 {
    text-shadow: 0 2px 12px rgba(255, 255, 255, 0.95), 0 0 4px rgba(255, 255, 255, 0.9);
}

* {
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', 'IBM Plex Sans Thai', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-main);
    transition: background-color 0.35s ease, color 0.35s ease;
    overflow-x: hidden;
}

/* Glassmorphism Cards & Spotlight Effect */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-4px);
    border-color: rgba(124, 187, 0, 0.45);
    box-shadow: 0 20px 40px -15px rgba(0, 90, 140, 0.25), 0 0 25px -5px rgba(124, 187, 0, 0.15);
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(124, 187, 0, 0.10), transparent 40%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 0;
}

.glass-card:hover::before {
    opacity: 1;
}

.glass-card > * {
    position: relative;
    z-index: 1;
}

/* Gradient Text */
.text-gradient-won {
    background: linear-gradient(135deg, #7CBB00 0%, #38bdf8 55%, #005A8C 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Buttons */
.btn-won-primary {
    background: linear-gradient(135deg, #7CBB00 0%, #005A8C 100%);
    color: #ffffff;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px -5px rgba(124, 187, 0, 0.4);
}

.btn-won-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(124, 187, 0, 0.6);
    filter: brightness(1.08);
}

/* Estimator Option Cards */
.estimator-option {
    cursor: pointer;
    user-select: none;
    transition: all 0.22s ease;
}

.estimator-option.selected {
    border-color: #7CBB00 !important;
    background: rgba(124, 187, 0, 0.14) !important;
    box-shadow: 0 0 0 1px #7CBB00, 0 10px 25px -8px rgba(124, 187, 0, 0.3);
}

.estimator-option.selected .check-badge {
    background-color: #7CBB00;
    border-color: #7CBB00;
    color: #fff;
}

/* Subtle Floating Animation */
@keyframes floatSlow {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.animate-float {
    animation: floatSlow 6s ease-in-out infinite;
}

/* Portfolio Filter transitions */
.portfolio-item {
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-item.hidden-item {
    opacity: 0;
    transform: scale(0.92);
    pointer-events: none;
    display: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: rgba(124, 187, 0, 0.4);
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(124, 187, 0, 0.7);
}
