:root {
    /* Dark Theme (Default) variables */
    --bg-body: #1E1E1E;
    --bg-panel: #2C2C2C;
    --bg-input: #383838;
    --text-main: #FFFFFF;
    --text-muted: #B3B3B3;
    --border: #444444;

    --accent-primary: #00AF5C;
    /* Modrinth-ish Green */
    --accent-primary-hover: #00C468;
    --accent-secondary: #5865F2;
    /* Blurple link color */

    /* Font Stack */
    --font-stack: 'Inter', 'BIZ UDGothic', sans-serif;

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    --shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-header: 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Light Theme overrides */
body.light-mode {
    --bg-body: #FFFFFF;
    /* Brighter background */
    --bg-panel: #F7F7F8;
    --bg-input: #E5E5EA;
    --text-main: #1D1D1F;
    --text-muted: #86868B;
    --border: #D2D2D7;

    --accent-primary: #008F4C;
    --accent-primary-hover: #00A658;
    --accent-secondary: #007AFF;
    /* Apple Blue-ish */

    --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-header: 0 1px 0 rgba(0, 0, 0, 0.05);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: var(--font-stack);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s, color 0.3s;
}

/* Container */
.container {
    max-width: 1280px;
    /* Increased from 1080px to give more space */
    margin: 0 auto;
    padding: 0 24px;
}

/* ... header ... */

/* Hero Image Split Layout */
.hero {
    padding: 100px 0 100px;
    overflow: visible;
    /* Allow overlap/blur to spill if needed */
}

.hero-split {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    /* Reduced gap to bring image closer if needed, or allow text to spill */
    position: relative;
}

.hero-text {
    flex: 1 0 auto;
    /* Allow text to take necessary space */
    width: 50%;
    /* Force width to ensure overlap potential */
    max-width: none;
    /* Don't restrict width */
    z-index: 2;
    /* Ensure text sits on top of image */
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    /* Shadow to ensure readability if overlapping */
    padding-right: 20px;
}

/* Light mode text shadow adjustment */
body.light-mode .hero-text {
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.8);
}

.hero-image {
    flex: 1 0 auto;
    width: 60%;
    /* Image takes significant width */
    display: flex;
    justify-content: flex-end;
    /* Align right */
    align-items: center;
    position: relative;
    /* 3D Perspective for Tilt */
    perspective: 1000px;
    margin-right: -50px;
    /* Pull further right */
    margin-left: -100px;
    /* Overlap with text area */
}

/* Header */
header {
    height: 72px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(var(--bg-panel), 0.85);
    /* Need RGB var for rgba, simplifying for now */
    background: inherit;
    /* Fallback/Simple */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Proper backdrop support needs careful color handling, overriding for simplicity in proto */
body:not(.light-mode) header {
    background: rgba(30, 30, 30, 0.85);
}

body.light-mode header {
    background: rgba(255, 255, 255, 0.85);
}

.logo {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: -0.03em;
}

.header-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.lang-select {
    background-color: var(--bg-panel);
    color: var(--text-main);
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
}

.lang-select:hover {
    border-color: var(--text-muted);
}

/* Theme Toggle Button */
.theme-toggle {
    background: transparent;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.theme-toggle:hover {
    background-color: var(--bg-input);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Show/Hide icons based on mode */
.icon-sun {
    display: none;
}

.icon-moon {
    display: block;
}

body.light-mode .icon-sun {
    display: block;
}

body.light-mode .icon-moon {
    display: none;
}




.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 24px;
    /* Gradient Text */
    background: linear-gradient(135deg, #fff 0%, #aaa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Light mode gradient adjustment */
body.light-mode .hero h1 {
    background: linear-gradient(135deg, #111 0%, #666 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}


.hero p {
    font-size: 1.35rem;
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 0 48px;
    font-weight: 400;
}

/* Buttons */
.cta-group {
    display: flex;
    justify-content: flex-start;
    gap: 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    height: 52px;
    font-weight: 600;
    font-size: 1.05rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    cursor: pointer;
    border: none;
    gap: 10px;
}

.btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.btn-primary {
    background-color: var(--accent-primary);
    color: #fff;
}

.btn-primary:not(:disabled):hover {
    background-color: var(--accent-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 175, 92, 0.25);
}

.btn-primary.disabled {
    background-color: var(--bg-input);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.8;
}

.btn-tooltip-wrapper {
    position: relative;
}

.btn-tooltip-wrapper:hover .tooltip {
    opacity: 1;
    transform: translate(-50%, -10px);
}

.tooltip {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translate(-50%, 0);
    background: #1a1a1a;
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    /* Rounded */
    border: 1px solid #555;
    /* Gray border */
    font-size: 0.85rem;
    pointer-events: none;
    opacity: 0;
    transition: all 0.2s;
    white-space: nowrap;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #555;
    /* Border color for arrow */
}

.tooltip::before {
    /* Inner arrow to cover border */
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #1a1a1a;
    z-index: 1;
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background-color: var(--bg-panel);
    border-color: var(--text-muted);
}

/* Sections General */
section {
    padding: 100px 0;
    border-top: 1px solid var(--border);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
    letter-spacing: -0.02em;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.feature-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    padding: 32px;
    border-radius: var(--radius-lg);
    transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
    box-shadow: var(--shadow);
}

.feature-card:hover {
    transform: translateY(-4px);
    /* Slightly stronger shadow on hover */
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 20px;
    display: inline-block;
    background: var(--bg-input);
    padding: 12px;
    border-radius: 12px;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.feature-text {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
}

.badge-planned {
    display: inline-block;
    background: rgba(88, 101, 242, 0.1);
    color: var(--accent-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
    border: 1px solid rgba(88, 101, 242, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-beta {
    display: inline-block;
    background: rgba(88, 101, 242, 0.1);
    color: var(--accent-secondary);
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    border: 1px solid rgba(88, 101, 242, 0.2);
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Tech/Code Section */
.section-dark {
    background-color: #111;
}

body.light-mode .section-dark {
    background-color: #F0F0F2;
}

.code-preview {
    background: #1e1e1e;
    /* Example code always dark? Or adapt? */
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    overflow-x: auto;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #d4d4d4;
    margin-top: 40px;
    box-shadow: var(--shadow);
}

/* In light mode, keep code preview dark for contract, or make it light code theme? 
   Usually code blocks look good dark even on light sites. Sticking to dark for now. */

/* Using <pre> for proper indentation */
pre {
    margin: 0;
}

.keyword {
    color: #569cd6;
}

/* VS Code Dark Blue */
.string {
    color: #ce9178;
}

/* VS Code Dark Orange */
.comment {
    color: #6a9955;
}

/* VS Code Dark Green */
.method {
    color: #dcdcaa;
}

/* VS Code Dark Yellow */
.number {
    color: #b5cea8;
}

/* VS Code Dark Light Green */

.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

@media (max-width: 900px) {
    .split-layout {
        grid-template-columns: 1fr;
    }
}

/* Footer */
footer {
    border-top: 1px solid var(--border);
    padding: 80px 0;
    text-align: center;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 32px;
}

.footer-link {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
}

.footer-link:hover {
    color: var(--accent-secondary);
}

/* FAQ */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.faq-item.faq-nested {
    margin-top: 16px;
    margin-bottom: 0;
    background: var(--bg-body);
    border: 1px solid var(--border);
}

.faq-item:hover {
    border-color: var(--text-muted);
}

.faq-question {
    list-style: none;
    /* Remove default triangle */
    padding: 20px 24px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.2s;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question:hover {
    color: var(--accent-primary);
}

.faq-icon {
    font-size: 1.5rem;
    font-weight: 300;
    transition: transform 0.3s;
}

details[open] .faq-icon {
    transform: rotate(45deg);
    /* Turn + into x */
}

.faq-answer {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
    padding: 0 24px 24px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Utilities */
body.lang-en [data-lang="ja"] {
    display: none !important;
}

body.lang-ja [data-lang="en"] {
    display: none !important;
}

/* Hero Image Split Layout */
.hero {
    padding: 100px 0 100px;
    overflow: hidden;
}

.hero-split {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    position: relative;
}

.hero-text {
    flex: 1 0 auto;
    width: 55%;
    /* More width for text */
    max-width: none;
    z-index: 2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    padding-right: 40px;
}

.hero-image {
    flex: 1 0 auto;
    width: 55%;
    /* Reduced from 60% slightly */
    display: flex;
    justify-content: flex-end;
    align-items: center;
    position: relative;
    /* 3D Perspective for Tilt */
    perspective: 1000px;
    margin-right: -40px;
    margin-left: -120px;
    /* Overlap slightly more to keep tight */
}

/* Blur Background */
.hero-image::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 130%;
    /* Slightly larger blur to match larger image */
    height: 130%;
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.4), rgba(170, 0, 255, 0.4));
    filter: blur(80px);
    /* Large blur */
    z-index: -1;
    border-radius: 50%;
    opacity: 0.6;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    /* Removed border as requested */
    box-shadow: none;
    /* Removing shadow as image has it built-in */

    /* Prepare for 3D transform */
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out;
    /* Smooth follow with slight delay */
    will-change: transform;
}

body.light-mode .hero-image img {
    box-shadow: none;
}

@media (max-width: 960px) {
    .hero-split {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }

    .hero-text {
        max-width: 100%;
        width: 100%;
        margin: 0 auto;
        padding-right: 0;
    }

    .hero-image {
        width: 100%;
        justify-content: center;
        margin-left: 0;
        margin-right: 0;
    }

    .hero-image img {
        max-width: 90%;
    }

    .cta-group {
        justify-content: center;
    }
}