/* Base Variables (Dark Theme Default) */
:root {
    --bg-color: #0d1117;
    --text-color: #c9d1d9;
    --heading-color: #ffffff;
    --primary-color: #58a6ff;
    --primary-glow: rgba(88, 166, 255, 0.4);
    --secondary-color: #238636;
    --surface-color: rgba(22, 27, 34, 0.6);
    --border-color: #30363d;
    --glass-bg: rgba(13, 17, 23, 0.7);
    --alt-bg: #161b22;
}

/* Light Theme Variables */
[data-theme="light"] {
    --bg-color: #ffffff;
    --text-color: #57606a;
    --heading-color: #24292f;
    --primary-color: #0969da;
    --primary-glow: rgba(9, 105, 218, 0.3);
    --secondary-color: #2da44e;
    --surface-color: rgba(246, 248, 250, 0.8);
    --border-color: #d0d7de;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --alt-bg: #f6f8fa;
}

/* Reset & Global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    color: var(--heading-color);
    font-weight: 700;
    line-height: 1.2;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

/* Utility Classes */
.text-primary {
    color: var(--primary-color);
}

.text-gradient {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-padding {
    padding: 6rem 2rem;
}

.alternate-bg {
    background-color: var(--alt-bg);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background-color: var(--glass-bg);
    border-bottom: 1px solid var(--border-color);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    height: 32px;
    width: auto;
}

.logo-text {
    height: 24px;
    width: auto;
    /* Optional: filter to invert colors in dark mode if the SVG is black */
}

[data-theme="dark"] .logo-text {
    filter: invert(1) hue-rotate(180deg) brightness(2);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-color);
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.theme-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.2s;
}

.theme-btn:hover {
    background-color: var(--surface-color);
}

[data-theme="dark"] .dark-icon {
    display: none;
}

[data-theme="light"] .light-icon {
    display: none;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-secondary {
    background-color: var(--surface-color);
    color: var(--heading-color);
    border: 1px solid var(--border-color);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 2rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.badge {
    display: inline-block;
    padding: 0.25rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-color);
    background-color: rgba(88, 166, 255, 0.1);
    border: 1px solid var(--primary-color);
    margin-bottom: 2rem;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 3rem;
}

.cta-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 4rem;
}

/* Mockup */
.hero-visual {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    margin-top: 2rem;
    flex-wrap: wrap;
    /* for mobile */
}

.phone-wrapper {
    position: relative;
    padding: 10px 14px;
}

.phone-mockup {
    width: 320px;
    height: 690px;
    background: linear-gradient(135deg, #a0a4a8 0%, #d5d9df 25%, #6a6f73 50%, #b8bcc0 75%, #44494d 100%);
    padding: 12px;
    border-radius: 15px;
    position: relative;
    box-shadow:
        inset 0 0 4px rgba(255, 255, 255, 0.8),
        inset 0 0 10px rgba(0, 0, 0, 0.5),
        0 20px 50px -12px rgba(0, 0, 0, 0.6),
        0 0 0 2px #555;
}

.phone-mockup::before {
    content: '';
    position: absolute;
    top: 130px;
    left: -4px;
    width: 4px;
    height: 35px;
    background: linear-gradient(to right, #999, #ccc);
    border-radius: 4px 0 0 4px;
    box-shadow: 0 50px 0 #999;
}

.phone-mockup::after {
    content: '';
    position: absolute;
    top: 150px;
    right: -4px;
    width: 4px;
    height: 50px;
    background: linear-gradient(to left, #999, #ccc);
    border-radius: 0 4px 4px 0;
}

.phone-screen {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    background: #000;
}

.phone-screen::before {
    content: '';
    position: absolute;
    top: -10%;
    left: -50%;
    width: 200%;
    height: 120%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.05) 50%, rgba(255, 255, 255, 0) 70%);
    transform: rotate(25deg);
    pointer-events: none;
    z-index: 100;
}

.screenshot-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.carousel-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.split-screen {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    padding: 0;
    gap: 4px;
    background-color: #000;
}

.screen-half {
    flex: 1;
    position: relative;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.top-half {
    background-color: #333333;
    color: white;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    z-index: 1;
}

.bottom-half {
    background-color: #015f5e;
    color: white;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    z-index: 1;
}

.lang-flag {
    position: absolute;
    top: 1rem;
    font-size: 1.5rem;
    background: white;
    border-radius: 4px;
    padding: 2px 5px;
    line-height: 1;
}

.bottom-flag {
    top: auto;
    bottom: 1rem;
}

.translated-text {
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.4;
    margin: 1rem 0;
    transition: opacity 0.5s ease;
}

.rotated {
    transform: rotate(180deg);
}

.speaker-icon {
    position: absolute;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.bottom-speaker {
    top: 2rem;
    left: 2rem;
}

.top-speaker {
    bottom: 2rem;
    right: 2rem;
}

.speaker-icon.rotated {
    /* Kept for icon rotation, but positioning handled by .top-speaker */
    transform: rotate(180deg);
}

.middle-toolbar {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #1e1e1e;
    padding: 0.4rem 0.8rem;
    border-radius: 40px;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.middle-toolbar button {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #ccc;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.middle-toolbar button.small-btn {
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
}

.middle-toolbar button.active-btn {
    background: #ffb3b3;
    color: #8b0000;
    width: 44px;
    height: 44px;
    font-size: 1.5rem;
}

.middle-toolbar button:hover:not(.active-btn) {
    color: white;
    background: rgba(255, 255, 255, 0.2);
}

/* Two Modes Section */
.mode-image-wrapper {
    width: 100%;
    max-width: 220px;
    margin: 0 auto 1.5rem auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 4px solid #333;
}

.mode-screenshot {
    width: 100%;
    height: auto;
    display: block;
}

.modes-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .modes-container {
        flex-direction: row;
    }

    .mode-card {
        flex: 1;
    }
}

/* Feature Discussion / Carousel */
.feature-discussion {
    flex: 1;
    max-width: 320px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.feature-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.feature-content.active {
    display: block;
}

.feature-content h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.feature-content p {
    font-size: 1.1rem;
    color: var(--text-color);
    line-height: 1.6;
}

.carousel-indicators {
    display: flex;
    gap: 0.8rem;
    margin-top: 2rem;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--border-color);
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.indicator.active {
    background-color: var(--primary-color);
}

/* Explorer Mockup Placeholder */
.explorer-mockup {
    width: 100%;
    height: 100%;
    background: url('https://images.unsplash.com/photo-1542051841857-5f90071e7989?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80') center/cover;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
}

.explorer-mockup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.explorer-header,
.explorer-content {
    position: relative;
    z-index: 2;
}

.explorer-header {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    margin-bottom: 2rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Features */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.glass-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.glass-card h3 {
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

@media (min-width: 768px) {
    .col-span-2 {
        grid-column: span 2;
    }
}

/* How It Works */
.steps-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .steps-container {
        flex-direction: row;
        justify-content: space-between;
    }
}

.step-item {
    flex: 1;
    text-align: center;
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1.5rem;
}

.step-item h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

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

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
    }
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--heading-color);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-color);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-copyright {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.8rem;
    color: var(--text-color);
}