:root {
    --bg-color: #0f0f11;
    --surface-color: #1a1a1d;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-color: #d4af37;
    /* Gold */
    --accent-hover: #f1c43f;
    --nav-height: 80px;
    --glass-bg: rgba(26, 26, 29, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] {
    --bg-color: #f4f4f4;
    --surface-color: #ffffff;
    --text-primary: #1a1a1d;
    --text-secondary: #555555;
    --accent-color: #c59d24;
    /* Slightly darker gold for contrast */
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: 1px solid rgba(0, 0, 0, 0.1);
    --input-bg: rgba(0, 0, 0, 0.05);
    --input-border: 1px solid rgba(0, 0, 0, 0.1);
    --section-bg-alt: #ffffff;
    /* Lighter background for alternate sections in light mode */
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
    padding: 0 15px;
    display: flex;
    align-items: center;
    transition: color 0.3s;
}

.theme-toggle:hover {
    color: var(--accent-color);
}

.sun-icon {
    display: block;
}

[data-theme="light"] .sun-icon {
    display: none;
}

.moon-icon {
    display: none;
}

[data-theme="light"] .moon-icon {
    display: block;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-padding-top: var(--nav-height);
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
    position: relative;
    /* Ensure body is relative for absolute pos children if needed, though watermark is fixed */
}

/* Background Watermark */
body::before {
    content: "";
    position: fixed;
    /* Determine grid coverage for rotation to avoid edges showing */
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: url('./assets/bg-pattern.svg') repeat center center;
    background-size: 225px auto;
    /* Controls the size of the *tile* (which includes spacing) */
    transform: rotate(-30deg);
    /* Rotates the entire grid 30 degrees */
    opacity: 0.26;
    z-index: -1;
    pointer-events: none;
}

h1,
h2,
h3,
.logo {
    font-family: 'Playfair Display', serif;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

/* Utilities */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: var(--glass-border);
    transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.navbar.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    border-bottom-color: transparent;
}

[data-theme="light"] .navbar.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.btn-primary {
    background: #1a1a1a;
    /* Dark Button on Gold Header */
    color: var(--accent-color);
    /* Gold Text */
    padding: 12px 30px;
    border-radius: 2px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid #1a1a1a;
    /* Added border for hover effect */
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.btn-primary:hover {
    background: transparent;
    color: #1a1a1a;
    border: 1px solid #1a1a1a;
    transform: translateY(-2px);
}

.btn-outline {
    border: 1px solid var(--text-primary);
    padding: 12px 30px;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: var(--text-primary);
    color: var(--bg-color);
    /* Adaptive text color on hover */
}

.accent-text {
    color: var(--accent-color);
    font-style: italic;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--nav-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    z-index: 1000;
    background: linear-gradient(135deg, #7d5f00 0%, #bca03b 50%, #5d4c15 100%);
    /* Gold Gradient Match */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 2px solid var(--accent-color);
    /* Match TH border */
    border-radius: 0 0 20px 20px;
    /* Curved bottom corners */
    transition: background 0.3s;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #1a1a1a;
    /* Dark text on Gold */
    text-transform: uppercase;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links {
    display: flex;
    gap: 40px;
    align-items: center;
}

.nav-links a:not(.btn-primary) {
    color: #1a1a1a;
    /* Dark text on Gold */
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    /* Slightly bolder for readability */
    letter-spacing: 1px;
}

.nav-links a:not(.btn-primary):hover,
.nav-links a.active {
    color: #fff;
    /* White hover for contrast */
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

/* Dropdown Menu Styles */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

/* Invisible bridge between trigger and menu */
.nav-dropdown::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 10px;
    /* Bridge height */
}

.dropdown-toggle {
    color: #1a1a1a;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    position: relative;
}

.dropdown-toggle::after {
    content: ' ▼';
    font-size: 0.7rem;
    margin-left: 5px;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    /* Position below the bridge */
    left: 0;
    background: linear-gradient(135deg, #7d5f00 0%, #bca03b 50%, #5d4c15 100%);
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    overflow: hidden;
    z-index: 1001;
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: #1a1a1a;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.3s, color 0.3s;
}

.dropdown-menu a:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.nav-dropdown:hover .dropdown-menu {
    display: block;
}

/* Mobile dropdown visibility */
.dropdown-menu.show-mobile {
    display: block !important;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 30px;
    height: 2px;
    background: #1a1a1a;
    /* Dark Burger Menu */
    transition: background 0.3s;
}

/* Hero Section */
.hero {
    height: auto;
    /* Fit to video height */
    width: 100%;
    position: relative;
    display: block;
    /* Block layout for stacking video */
    text-align: center;
    color: var(--text-light);
    overflow: hidden;
    padding-top: var(--nav-height);
}

.hero-video {
    position: relative;
    /* Relative to dictate container height */
    width: 100%;
    height: auto;
    /* Maintain aspect ratio */
    display: block;
    object-fit: cover;
    z-index: -1;
}

/* Default to Desktop Video */
.mobile-video {
    display: none;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    /* Darken video for text readability */
    z-index: 1;
}

.hero-content {
    position: absolute;
    /* Absolute overlay on top of video */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    z-index: 2;
    padding: 20px;
    max-width: 800px;
}

/* Response Video Switching */
@media (max-width: 768px) {
    .desktop-video {
        display: none;
    }

    .mobile-video {
        display: block;
    }
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    line-height: 1.1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    color: #ffffff;
    /* Always white on hero image */
}

.hero p {
    font-size: 1.2rem;
    color: #e0e0e0;
    /* Always light on hero image */
    margin-bottom: 40px;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
}

/* Sections */
section {
    padding: 100px 5%;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 60px;
    text-align: center;
}

/* Portfolio */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    /* Slightly larger items */
    gap: 30px;
}

.gallery-item {
    position: relative;
    height: 450px;
    /* Taller items */
    background: var(--surface-color);
    overflow: hidden;
    cursor: pointer;
    border-radius: 4px;
    /* Subtle radius */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    /* Subtle shadow for depth */
}

/* Mobile Menu Active State */
.nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    width: 100%;
    background: var(--surface-color);
    /* Use variable */
    padding: 20px;
    border-bottom: var(--glass-border);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.placeholder-img {
    width: 100%;
    height: 100%;
    background: var(--surface-color);
    /* Use variable */
    transition: transform 0.5s ease;
}

/* Videography Section */
/* Videography & Photography Sections */
.videography-section,
.portfolio-section {
    background: #1a1a1db3;
    /* 70% opacity */
}

/* Alternate background for light mode or specific styling */
[data-theme="light"] .videography-section,
[data-theme="light"] .portfolio-section {
    background: #ffffffb3;
    /* 70% opacity white */
}


.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.video-item iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    /* Allow auto height based on aspect ratio */
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .video-item iframe {
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.video-item h3 {
    margin-top: 15px;
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.social-links-container {
    text-align: center;
    padding: 40px;
    background: var(--surface-color);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.social-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.gallery-item:hover .placeholder-img {
    transform: scale(1.05);
}

.item-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    transform: translateY(100%);
    transition: transform 0.3s ease;
    color: #fff;
    /* Always white text on overlay */
}

/* Ensure item info text is readable against dark overlay */
.item-info h3,
.item-info p {
    color: #fff;
}

.gallery-item:hover .item-info {
    transform: translateY(0);
}

/* About */
.about-section {
    background: #1a1a1dad;
    /* 50% opacity */
    text-align: center;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-content p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    /* Use variable */
    line-height: 1.8;
}

/* Craft Section */
.craft-section {
    background: #1a1a1db3;
    padding: 100px 5%;
    position: relative;
    z-index: 2;
}

[data-theme="light"] .craft-section {
    background: #ffffffb3;
}

.craft-content {
    max-width: 900px;
    margin: 0 auto;
}

.craft-content .section-title {
    margin-bottom: 40px;
}

.intro-text,
.closing-text {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 30px;
    line-height: 1.8;
}

.closing-text {
    margin-top: 50px;
    font-style: italic;
    color: var(--accent-color);
    font-weight: 300;
}

.craft-block {
    margin-bottom: 50px;
    text-align: left;
}

.craft-block h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--accent-color);
    margin-bottom: 20px;
    text-align: center;
}

.craft-block p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.craft-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin: 50px 0;
}

.craft-card {
    background: var(--surface-color);
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s, border-color 0.3s;
    height: 100%;
}

[data-theme="light"] .craft-card {
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.craft-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

.craft-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.craft-card p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
}

.approach-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.approach-item {
    background: rgba(255, 255, 255, 0.02);
    padding: 30px;
    border-radius: 4px;
    border: 1px solid transparent;
    transition: border-color 0.3s;
}

.approach-item:hover {
    border-color: rgba(212, 175, 55, 0.3);
}

[data-theme="light"] .approach-item {
    background: rgba(0, 0, 0, 0.02);
}

.approach-item h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
}

.approach-item p {
    color: var(--text-secondary);
}

/* Style Section */
.style-section {
    padding: 100px 5%;
    background: url('./assets/sample11.png') center/cover fixed no-repeat;
    position: relative;
    color: #fff;
    /* Always white on dark background image */
}

[data-theme="light"] .style-section {
    color: var(--text-primary);
}

.style-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 15, 17, 0.85);
    /* Dark overlay */
    z-index: 1;
}

[data-theme="light"] .style-section::before {
    background: rgba(244, 244, 244, 0.92);
}

.style-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
}

.style-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    text-align: center;
}

.style-card {
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.03);
    transition: transform 0.3s ease;
}

[data-theme="light"] .style-card {
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(0, 0, 0, 0.03);
}

.style-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-color);
}

[data-theme="light"] .style-card:hover {
    background: rgba(0, 0, 0, 0.05);
}

.style-card h3 {
    margin-bottom: 15px;
    font-family: 'Playfair Display', serif;
    color: var(--accent-color);
    font-size: 1.5rem;
}

.style-card p {
    color: #ccc;
    /* Fixed color for this specific dark section */
}

[data-theme="light"] .style-card p {
    color: var(--text-secondary);
}

/* Packages Section */
.packages-section {
    text-align: center;
    background: #1a1a1db3;
    /* 70% opacity dark */
}

[data-theme="light"] .packages-section {
    background: #ffffffb3;
    /* 70% opacity white */
}

.packages-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-top: -40px;
    margin-bottom: 50px;
}

.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto 40px;
}

.package-card {
    background: var(--bg-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 40px 30px;
    transition: transform 0.3s, border-color 0.3s;
    position: relative;
}

[data-theme="light"] .package-card {
    background: #f8f8f8;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.package-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

.package-card.featured {
    border-color: var(--accent-color);
    border-width: 2px;
}

.featured-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-color);
    color: #000;
    padding: 5px 15px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    border-radius: 2px;
}

.package-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.package-price {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 25px;
}

.package-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.package-features li {
    padding: 8px 0;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .package-features li {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.package-features li:last-child {
    border-bottom: none;
}

.packages-btn {
    display: inline-block;
    margin-top: 20px;
}

/* Contact */
.contact-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 60px;
    border: var(--glass-border);
    border-radius: 8px;
    background: var(--glass-bg);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 40px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    background: var(--input-bg, rgba(255, 255, 255, 0.05));
    /* Use variable with fallback */
    border: var(--input-border, 1px solid rgba(255, 255, 255, 0.1));
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
}

[data-theme="light"] .form-group input,
[data-theme="light"] .form-group textarea {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
}


.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

/* Contact Info */
.contact-info {
    text-align: center;
    margin-bottom: 20px;
}

.contact-info p {
    margin: 10px 0;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.contact-info a {
    color: var(--accent-color);
    transition: color 0.3s;
}

.contact-info a:hover {
    color: var(--accent-hover);
}

/* Form Status Messages */
.form-status {
    margin-top: 15px;
    padding: 15px;
    border-radius: 4px;
    text-align: center;
    display: none;
}

.form-status.success {
    display: block;
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid rgba(76, 175, 80, 0.5);
    color: #4CAF50;
}

.form-status.error {
    display: block;
    background: rgba(244, 67, 54, 0.2);
    border: 1px solid rgba(244, 67, 54, 0.5);
    color: #F44336;
}

.form-status.loading {
    display: block;
    background: rgba(212, 175, 55, 0.2);
    border: 1px solid rgba(212, 175, 55, 0.5);
    color: var(--accent-color);
}

/* Footer */
footer {
    padding: 40px 5%;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    background: var(--bg-color);
}

[data-theme="light"] footer {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.footer-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

/* Animations */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero h1 {
        font-size: 2.5rem;
    }
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    width: auto;
    height: 90%;
    position: relative;
    max-width: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    line-height: 1;
    z-index: 2001;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    font-size: 2rem;
    padding: 20px;
    cursor: pointer;
    z-index: 2001;
    transition: background 0.3s;
    user-select: none;
    border-radius: 4px;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(0, 0, 0, 0.8);
    opacity: 1;
}

.lightbox-close:hover {
    background: none;
    /* Keep close button background transparent */
    transform: scale(1.1);
}

/* Light Mode Section Overrides */
[data-theme="light"] .about-section,
/* Chrome Browser Component */
.browser-container {
    /* background: var(--surface-color); */
    background: #ffffffb3;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    margin: 60px auto;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .browser-container {
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    background: #ffffff;
}

.browser-header {
    /* background: #202124; */
    display: flex;
    flex-direction: column;
    /* Stack title above tabs */
    align-items: flex-start;
    gap: 0;
    /* Remove gap to connect title to content below */
    border-bottom: 1px solid #35363a;
}

[data-theme="light"] .browser-header {
    border-bottom: 1px solid #d0d3d9;
}

.browser-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 700;
    /* Bold */
    color: var(--accent-color);
    /* Gold */
    margin-bottom: 0;
    /* Remove bottom margin as gap handles it */
    font-style: normal;
    /* Remove italic */
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.05);
    /* Same as tabs */
    padding: 10px 25px;
    border-radius: 8px 8px 0 0;
    /* Mimic tab shape */
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: none;
    /* mimic tab border */
    width: 150px;
    /* Reduced width as requested to align left */
    text-align: center;
    /* Center text within this smaller tab */
}

[data-theme="light"] .browser-title {
    color: var(--accent-color);
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Tab Scroll Wrapper containing scroll buttons and tab bar */
.tab-scroll-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 2px;
    position: relative;
}

/* Tab bar aligned with image edge */
.tab-bar {
    margin-left: 0;
}

/* Scroll buttons for navigating tabs */
.tab-scroll-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px 12px;
    font-size: 1.2rem;
    line-height: 1;
    transition: all 0.2s ease;
    flex-shrink: 0;
    border-radius: 4px;
    user-select: none;
}

.tab-scroll-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
}

.tab-scroll-btn:active {
    transform: scale(0.95);
}

[data-theme="light"] .tab-scroll-btn {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #5f6368;
}

[data-theme="light"] .tab-scroll-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #202124;
}

.tab-bar {
    display: flex;
    gap: 4px;
    align-items: flex-end;
    flex-grow: 1;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-behavior: smooth;
}

/* Hide scrollbar for Chrome/Safari/Edge */
.tab-bar::-webkit-scrollbar {
    display: none;
}

.tab {
    padding: 7px 20px 7px 10px;
    /* Larger, click friendly */
    cursor: pointer;
    background: #393838;
    /* linear-gradient(to bottom, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)); */
    /* 3D effect */
    border-radius: 12px 24px 0 0;
    /* Asymmetric "Folder" shape */
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    white-space: nowrap;
    position: relative;
    margin-left: -25px;
    /* Significant overlap */
    z-index: 1;
    /* Shadow on the LEFT since Right > Left overlap */
    box-shadow: -4px 0 10px rgba(0, 0, 0, 0.3);
}

.tab:first-child {
    margin-left: 0;
}

.tab:hover {
    background: rgba(255, 255, 255, 0.721);
    color: var(--text-primary);
    z-index: 5;
    /* Pop on hover */
    margin-top: -2px;
    /* Slight lift */
}

[data-theme="light"] .tab {
    background: linear-gradient(to bottom, #f0f0f0, #e0e0e0);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #5f6368;
    box-shadow: -4px 0 10px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .tab:hover {
    color: #202124;
    background: #fff;
}

.tab.active {
    background: #202124;
    /* Match container */
    color: var(--text-primary);
    border-top: 3px solid var(--accent-color);
    border-right: 3px solid var(--accent-color);
    border-left: 3px solid var(--accent-color);
    /* Thicker accent */
    /* Taller to connect */
    /* Pop up */
    z-index: 10;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5);
    /* Halo effect */
    border-radius: 12px 24px 0 0;
}

/* Tab immediately after active tab gets extra spacing */
.tab.after-active {
    padding-left: 20px;
}

[data-theme="light"] .tab.active {
    background: #ffffff;
    color: #202124;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
}

.browser-content {
    position: relative;
    background: #000;
    font-size: 0;
}

.tab-image {
    width: 100%;
    height: auto;
    display: none;
}

.tab-image.active {
    display: block;
}

/* Looks Page & Editor */
.looks-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 0;
}

.looks-browser {
    width: fit-content;
    max-width: 95vw;
    transition: all 0.3s ease;
    border: none;
    box-shadow: none;
    background: transparent;
    margin: 0 auto;
}

[data-theme="light"] .looks-browser {
    background: transparent;
    border: none;
    box-shadow: none;
}

.looks-browser.settings-mode {
    max-width: 98vw;
}

@media (max-width: 768px) {
    .looks-browser {
        width: 100%;
        max-width: 100%;
        margin: 0;
    }

    .looks-container {
        margin: 0;
        height: auto;
        /* Allow scrolling on mobile if needed */
        min-height: 80vh;
    }

    .browser-header {
        position: sticky;
        top: 0;
        z-index: 20;
        /* Ensure header stays on top */
    }
}

.browser-content {
    display: flex;
    /* Change to flex to support sidebar */
    align-items: stretch;
    /* Stretch to fill height */
    background: #1a1a1d;
    flex-grow: 1;
    /* Fill remaining vertical space */
    overflow: hidden;
    position: relative;
    /* CRITICAL: Contain absolute sidebar */
}

.image-area {
    flex-grow: 1;
    position: relative;
    font-size: 0;
    overflow: hidden;
    /* Ensure image doesn't overflow */
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.image-area img,
.image-area canvas {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    height: auto;
    width: auto;
}

/* Sidebar Styles */
/* Sidebar Styles */
.editor-sidebar {
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    /* Hidden by default */
    background: rgba(32, 33, 36, 0.6);
    /* Slight transparency */
    border-left: 1px solid #35363a;
    overflow-y: auto;
    transition: width 0.3s ease, opacity 0.3s ease;
    height: 100%;
    /* Fill height of browser content */
    opacity: 0;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.editor-sidebar.active {
    width: 320px;
    padding: 20px;
    opacity: 1;
}

@media (max-width: 768px) {
    .editor-sidebar {
        width: 50% !important;
        /* User requested 50% width on mobile */
        border-left: 1px solid #35363a;
        /* Restore border for side view */
        border-top: none;
        top: 0;
        bottom: auto;
        height: 100%;
        transition: width 0.3s ease, opacity 0.3s ease;
    }

    .editor-sidebar.active {
        width: 50%;
        height: 100%;
        max-width: 100%;
        background: rgba(32, 33, 36, 0.7);
        /* Keep mobile opacity at 70% per previous refined request, or user implied 50? "width of slider 50% on mobile". Let's stick to 70% opacity for mobile unless specified otherwise, or use 60%? User said "opacity %60 on desktop". Implies mobile stays at 70? I will keep 70 for mobile. */
    }
}

[data-theme="light"] .editor-sidebar {
    background: rgba(248, 248, 248, 0.4);
    border-left: 1px solid #d0d3d9;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.editor-sidebar h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--accent-color);
}

.minimize-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.minimize-btn:hover {
    color: var(--accent-color);
}


.show-sidebar-btn {
    position: absolute;
    top: 15px;
    /* Aligns with padding 20px - 5px offset for larger button */
    right: 15px;
    background: rgba(32, 33, 36, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--accent-color);
    padding: 8px;
    /* Slightly reduced padding to match size better */
    border-radius: 50%;
    cursor: pointer;
    z-index: 5;
    display: flex;
    /* Hidden by default or toggled via JS */
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(5px);
    transition: opacity 0.3s, transform 0.2s;
}

.show-sidebar-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

.show-sidebar-btn:hover {
    background: var(--accent-color);
    color: #000;
    transform: scale(1.1);
}

.control-group {
    margin-bottom: 20px;
}

.control-group label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: #9aa0a6;
    font-size: 0.9rem;
}

[data-theme="light"] .control-group label {
    color: #1b1b1b;
}

.control-group input[type="range"] {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    touch-action: none;
    /* Prevent scroll while dragging */
}

/* Custom Range Slider */
.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
    margin-top: -6px;
}

.control-group input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

[data-theme="light"] .control-group input[type="range"]::-webkit-slider-runnable-track {
    background: rgba(0, 0, 0, 0.2);
}

.loading-indicator {
    color: var(--accent-color);
    margin-top: 10px;
    font-size: 0.9rem;
    display: none;
}

.loading-indicator.active {
    display: block;
}

/* Button Styles */
.btn-outline {
    background: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    margin-top: 10px;
    width: 100%;
}

.btn-outline:hover {
    background: var(--accent-color);
    color: #000;
}