:root {
    --bg-color: #E3F5EB; /* Premium soft green background */
    --text-color: #1f1f1f;
    --accent-color: #4285f4;
    --card-bg: rgba(255, 255, 255, 0.8);
    --card-border: rgba(0, 0, 0, 0.1);
    --header-bg: rgba(255, 255, 255, 0.9);
    --glow-opacity: 0.1;
    --card-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Glassmorphism Header */
.section-slider-container {
    background: var(--card-border);
    border-radius: 12px;
    padding: 3px;
    display: flex;
    align-items: center;
    border: 1px solid var(--card-border);
}

.section-slider {
    position: relative;
    display: flex;
    gap: 0;
}

.section-btn {
    background: none;
    border: none;
    padding: 0.5rem 1.2rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    z-index: 2;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    border-radius: 8px;
}

.section-btn.active {
    color: #fff;
}

/* Ensure text colors inside slider buttons work with background */
.section-btn.active .ai-text {
    -webkit-text-fill-color: #fff;
}

.section-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 120px; /* Adjusting dynamically via JS or setting a fixed base */
    height: 100%;
    background: var(--accent-color);
    border-radius: 8px;
    z-index: 1;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 10px rgba(66, 133, 244, 0.3);
}

.brand {
    display: flex;
    align-items: center;
}

.g-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.brand-name {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    margin-left: 10px;
    background: linear-gradient(90deg, #C10F68, #8D1ED3, #603DFA, #2788FF, #00DEFF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
}

header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
    z-index: 1000;
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.google-text {
    color: var(--text-color);
}

.ai-text {
    background: linear-gradient(90deg, #C10F68 0%, #8D1ED3 25%, #603DFA 50%, #2788FF 75%, #00DEFF 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

#language-select { display: none; } /* Hide old selector if still present */

.lang-slider-container {
    background: var(--card-border);
    border-radius: 12px;
    padding: 3px;
    display: flex;
    align-items: center;
    border: 1px solid var(--card-border);
}

.lang-slider {
    position: relative;
    display: flex;
    gap: 0;
}

.lang-btn {
    background: none;
    border: none;
    padding: 0.5rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    z-index: 2;
    transition: color 0.3s ease;
    width: 50px;
    text-align: center;
}

.lang-btn.active {
    color: #fff;
}

.lang-indicator {
    position: absolute;
    top: 0;
    left: 50px; /* Middle by default (ES) */
    width: 50px;
    height: 100%;
    background: var(--accent-color);
    border-radius: 8px;
    z-index: 1;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 10px rgba(66, 133, 244, 0.3);
}

#theme-toggle {
    background: none;
    border: 1px solid var(--card-border);
    padding: 0.6rem;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

#theme-toggle:hover {
    transform: rotate(15deg) scale(1.1);
    background: var(--card-border);
}

.sun-icon, .moon-icon {
    width: 20px;
    height: 20px;
}


/* Main Content */
main {
    flex: 1;
    margin-top: 100px;
    padding: 2rem 5% 5rem;
    max-width: 1400px;
    align-self: center;
    width: 100%;
}

.hero {
    text-align: center;
    margin-bottom: 4rem;
}

#ai-section .hero h1 {
    background: linear-gradient(90deg, #C10F68 0%, #8D1ED3 25%, #603DFA 50%, #2788FF 75%, #00DEFF 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

#startups-section .hero h1 {
    background: linear-gradient(90deg, #C10F68 0%, #8D1ED3 25%, #603DFA 50%, #2788FF 75%, #00DEFF 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: inline-block; /* Crucial: Maps the gradient EXACTLY to the text width */
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.7;
    max-width: 600px;
    margin: 0 auto;
}

/* Grid System */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

/* Card Styling */
.card {
    text-decoration: none;
    color: inherit;
    position: relative;
    border-radius: 24px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 2.5rem;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    display: flex;
    flex-direction: column;
    box-shadow: var(--card-shadow);
}

.icon-wrapper {
    width: 100px; /* Increased for more presence across all tools */
    height: 100px; /* Uniform height for all icons to align text baseline */
    margin-bottom: 1.5rem; /* Uniform margin */
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.icon-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    /* Removed drop-shadow to prevent showing image borders */
    transition: all 0.3s ease;
}

body:not(.dark-mode) .icon-wrapper img {
    mix-blend-mode: multiply; /* Helps blend white logo backgrounds into the card */
}

/* Specific sizing for logos that appeared too small */
.elevenlabs .icon-wrapper {
    width: 200px; /* Increased proportionally */
}

.gemini img, .notebooklm img, .labs img {
    transform: scale(1.6); /* Standard large scale for well-cropped square icons */
}

.elevenlabs img {
    transform: scale(2.8); /* Maximum scaling for legibility */
}

/* Dropdown Card Specifics */
.dropdown-card {
    position: relative;
    cursor: default;
}

.labs-header-link {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
}

.dropdown-trigger-wrapper {
    display: flex;
    justify-content: flex-end; /* Moved to the bottom right */
    margin-top: 1.5rem;
    width: 100%;
}

.labs-dropdown-trigger {
    background: var(--card-border);
    border: 1px solid var(--card-border);
    color: var(--text-color);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.labs-dropdown-trigger:hover {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
    transform: scale(1.1);
}

.labs-dropdown-trigger.active {
    background: #ff4d4d;
    border-color: #ff4d4d;
}

.labs-dropdown-trigger.active svg {
    transform: rotate(45deg); /* Plus to X */
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent; /* No darkening */
    z-index: 1001;
    display: none;
    opacity: 0;
}

.modal-backdrop.show {
    display: block;
    opacity: 1;
}

.card-dropdown {
    position: fixed;
    width: 90%;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.23, 1, 0.32, 1), max-height 0.1s;
    opacity: 0;
    background: rgba(255, 255, 255, 0.9); /* Default light mode */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 32px;
    z-index: 1002;
    padding: 0;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
    visibility: hidden;
    pointer-events: none;
}

body.dark-mode .card-dropdown {
    background: rgba(20, 20, 20, 0.95);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7);
}

.card-dropdown.show {
    max-height: 500px;
    opacity: 1;
    padding: 2rem 1.5rem;
    visibility: visible;
    pointer-events: auto;
}

.dropdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.4rem;
    width: 220px;
    background: rgba(0, 0, 0, 0.05); /* Light mode item bg */
    border: 1px solid var(--card-border);
    border-radius: 100px;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

body.dark-mode .dropdown-item {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.dropdown-item:hover {
    background: rgba(66, 133, 244, 0.15);
    border-color: var(--accent-color);
    transform: scale(1.05);
}

.dropdown-item svg {
    width: 16px;
    height: 16px;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background: rgba(66, 133, 244, 0.1);
    border-color: var(--accent-color);
    transform: scale(1.02); /* Subtle scale instead of move to avoid clipping */
}

.dropdown-item:hover svg {
    opacity: 1;
    transform: translateX(0);
}

.card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-color);
}

/* Specific Glows for Dark Mode */
.content-section {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.content-section.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Specific Glows for Dark Mode */

.icon-wrapper {
    width: 64px;
    height: 64px;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.card:hover .icon-wrapper {
    transform: scale(1.1) rotate(-5deg);
}

.card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.card p {
    font-size: 1rem;
    opacity: 0.7;
    line-height: 1.6;
}

footer {
    padding: 3rem;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.5;
    border-top: 1px solid var(--card-border);
}

/* Dynamic Animation for the background */

/* Hero & Grid Styles omitted for brevity... */

/* Icon Animations */
.sparkle-animated {
    animation: sparkle-spin 6s linear infinite;
    transform-origin: center;
}

@keyframes sparkle-spin {
    0% { transform: scale(1) rotate(0deg); opacity: 0.9; }
    50% { transform: scale(1.1) rotate(180deg); opacity: 1; }
    100% { transform: scale(1) rotate(360deg); opacity: 0.9; }
}

.float-animated {
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.pulse-animated {
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
}

.swing-animated {
    animation: swing 5s ease-in-out infinite;
    transform-origin: top center;
}

@keyframes swing {
    0%, 100% { transform: rotate(-3deg); }
    50% { transform: rotate(3deg); }
}

@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .grid { grid-template-columns: 1fr; }
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    z-index: 2000;
}

.mobile-menu-btn svg {
    width: 32px;
    height: 32px;
}

.mobile-menu-btn .close-icon { display: none; }
.mobile-menu-btn.open .hamburger-icon { display: none; }
.mobile-menu-btn.open .close-icon { display: block; }

@media (max-width: 1024px) {
    .mobile-menu-btn {
        display: block;
    }

    .header-actions {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100dvh;
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding-top: 2rem;
        transition: right 0.4s cubic-bezier(0.23, 1, 0.32, 1);
        z-index: 1000;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        gap: 3rem; /* Spacing between sliders */
    }

    .header-actions.open {
        right: 0;
    }
}
