﻿/* ==========================================================================
   RYSTUDIO YoYo Translate - Global Styles
   ========================================================================== */

:root {
    /* Color Palette */
    --primary-color: #2563eb; /* Modern SaaS Blue */
    --primary-hover: #1d4ed8;
    --secondary-color: #0f172a; /* Deep Tech Black */
    --text-main: #334155;
    --text-muted: #64748b;
    --bg-main: #ffffff;
    --bg-light: #f8fafc;
    --border-color: #e2e8f0;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    /* Gradients */
    --hero-gradient: linear-gradient(135deg, #f0fdf4 0%, #eff6ff 50%, #ffffff 100%);
    --card-gradient: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    padding-top: 80px; /* Space for fixed nav */
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

img, video {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* Typography */
h1, h2, h3, h4 {
    color: var(--secondary-color);
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: 3.5rem;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: 1rem;
}

.text-gradient {
    background: linear-gradient(to right, var(--primary-color), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 800px;
    margin: 0 auto 2rem;
}

/* Layout Containers */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
}

.section-light {
    background-color: var(--bg-light);
}

.text-center {
    text-align: center;
}

/* Global Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: background var(--transition-fast);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/*.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}*/
.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--secondary-color);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    flex-wrap: nowrap;
    margin-right: 1.5rem;
}

    .logo span {
        color: var(--primary-color);
    }
/* 新增：右侧操作区容器（包含语言切换和按钮） */
.nav-right {
    display: flex;
    align-items: center;
    white-space: nowrap;
    flex-wrap: nowrap;
    flex-shrink: 0;
    margin-left: 1.5rem;
}
/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-md);
}

    .btn-primary:hover {
        background-color: var(--primary-hover);
        transform: translateY(-1px);
        box-shadow: var(--shadow-lg);
    }

.btn-outline {
    background-color: transparent;
    color: var(--secondary-color);
    border: 1px solid var(--border-color);
}

    .btn-outline:hover {
        border-color: var(--secondary-color);
        background-color: var(--bg-light);
    }


/* 修改：减小间距并确保垂直居中 */
.nav-links {
    display: flex;
    gap: 1.5rem; /* 从 2rem 减小到 1.5rem 以节省空间 */
    list-style: none;
    align-items: center;
}

    /* 修改：增加 white-space: nowrap 防止文字折行 */
    .nav-links a {
        font-size: 0.95rem;
        font-weight: 500;
        color: var(--text-muted);
        padding: 0.5rem 0;
        position: relative;
        white-space: nowrap; /* 强制不换行，确保最大化时在一行显示 */
    }

        .nav-links a:hover {
            color: var(--primary-color);
        }

        .nav-links a.active {
            color: var(--primary-color);
            font-weight: 600;
        }

            .nav-links a.active::after {
                content: '';
                position: absolute;
                bottom: -2px;
                left: 0;
                width: 100%;
                height: 2px;
                background-color: var(--primary-color);
                border-radius: 2px;
            }


/* 新增：语言切换器样式 */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

    .lang-switcher a {
        color: var(--text-muted);
        transition: color var(--transition-fast);
        text-decoration: none;
    }

        .lang-switcher a:hover,
        .lang-switcher a.active-lang {
            color: var(--primary-color);
        }

    .lang-switcher .divider {
        color: var(--border-color);
        font-weight: 300;
    }

/* Hero Section */
.hero {
    background: var(--hero-gradient);
    padding: 8rem 0 6rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2.5rem;
}

/* Feature Cards */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.feature-card {
    background: var(--card-gradient);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

    .feature-card:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-hover);
        border-color: var(--primary-color);
    }

.feature-icon {
    width: 48px;
    height: 48px;
    background-color: #eff6ff;
    color: var(--primary-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.feature-image-wrapper {
    margin-top: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

/* Video Player Placeholder */
.video-section {
    max-width: 900px;
    margin: 4rem auto 0;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    background-color: #000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    cursor: pointer;
}

    .video-wrapper video, .video-wrapper img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        opacity: 0.8;
        transition: opacity var(--transition-normal);
    }

    .video-wrapper:hover img {
        opacity: 0.6;
    }

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.2);
    transition: all var(--transition-fast);
    z-index: 10;
}

    .play-button::after {
        content: '';
        width: 0;
        height: 0;
        border-style: solid;
        border-width: 12px 0 12px 20px;
        border-color: transparent transparent transparent var(--primary-color);
        margin-left: 6px;
    }

.video-wrapper:hover .play-button {
    transform: translate(-50%, -50%) scale(1.1);
    background: #ffffff;
}

/* SaaS Tables (For Translation/Review Pages) */
.saas-table-container {
    width: 100%;
    overflow-x: auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    margin: 3rem 0;
}

.saas-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

    .saas-table th, .saas-table td {
        padding: 1.25rem 1.5rem;
        border-bottom: 1px solid var(--border-color);
    }

    .saas-table th {
        background-color: var(--bg-light);
        font-weight: 600;
        color: var(--secondary-color);
        white-space: nowrap;
    }

    .saas-table tr:last-child td {
        border-bottom: none;
    }

    .saas-table tr:hover td {
        background-color: #f8fafc;
    }

.highlight-cell {
    background-color: #f0fdf4 !important;
    border-left: 3px solid var(--success-color);
}

.bad-cell {
    background-color: #fef2f2 !important;
    border-left: 3px solid #ef4444;
}

.diff-add {
    color: var(--success-color);
    font-weight: 600;
    background: #dcfce7;
    padding: 0 4px;
    border-radius: 2px;
}

.diff-remove {
    color: #ef4444;
    text-decoration: line-through;
    background: #fee2e2;
    padding: 0 4px;
    border-radius: 2px;
}

/* Model Logos */
.model-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
}

.model-badge {
    padding: 0.5rem 1rem;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-weight: 600;
    color: var(--secondary-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Pricing Tables */
.pricing-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

    .pricing-card.popular {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 2px var(--primary-color), var(--shadow-lg);
    }

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: #fff;
    padding: 0.25rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Footer */
footer {
    background-color: var(--secondary-color);
    color: #fff;
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 2rem;
    margin-bottom: 2rem;
}

.footer-copyright {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none; /* In a real app, add a hamburger menu */
    }

    .hero {
        padding: 4rem 0;
    }

    .section {
        padding: 4rem 0;
    }
}
