:root {
    --bg-color: #ffffff;
    --text-color: #111111;
    --accent-color: #000000;
    --secondary-text: #666666;
    --border-color: #e5e5e5;
    --card-hover-bg: #f5f5f5;
    --code-bg: #f4f4f4;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s;
    background-image: radial-gradient(#e5e5e5 1px, transparent 1px);
    background-size: 20px 20px;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    pointer-events: none;
    z-index: -1;
    animation: breathe 4s ease-in-out infinite;
}

@keyframes breathe {

    0%,
    100% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }
}

/* Language Visibility Logic */
.mode-en .lang-zh {
    display: none !important;
}

.mode-zh .lang-en {
    display: none !important;
}

/* Navigation */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid transparent;
}

.nav-btn {
    background: none;
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
}

.nav-btn:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.hidden {
    display: none !important;
}

/* Container */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: 80vh;
}

/* Landing Page Styles */
.hero-section {
    text-align: center;
    margin-bottom: 60px;
    animation: fadeIn 0.8s ease-out;
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--secondary-text);
}

.selection-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 40px;
}

.selection-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 40px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 300px;
}

.selection-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

.selection-card h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.card-desc {
    color: var(--secondary-text);
    font-size: 1.1rem;
}

.card-arrow {
    font-size: 2rem;
    align-self: flex-end;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s;
}

.selection-card:hover .card-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Content View Styles */
.view-section {
    animation: slideUp 0.5s ease-out;
}

.page-header {
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.content-block {
    margin-bottom: 40px;
}

.content-block h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.content-block h3::before {
    content: '';
    display: block;
    width: 6px;
    height: 24px;
    background: var(--accent-color);
    margin-right: 12px;
    border-radius: 2px;
}

/* Lists & Steps */
.steps-list,
.guide-list {
    list-style: none;
    padding: 0;
}

.steps-list li,
.guide-list li {
    margin-bottom: 15px;
    padding-left: 20px;
    position: relative;
}

.steps-list li::before,
.guide-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}

.step-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    background: var(--card-hover-bg);
    padding: 15px;
    border-radius: 8px;
}

.step-num {
    background: var(--accent-color);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    margin-right: 15px;
    flex-shrink: 0;
}

/* API & Code */
.api-box,
.code-display {
    background: var(--code-bg);
    padding: 20px;
    border-radius: 8px;
    border: 1px dashed var(--border-color);
    font-family: monospace;
    margin-top: 10px;
}

code {
    background: #e0e0e0;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

a {
    color: var(--accent-color);
    text-decoration: underline;
    font-weight: 600;
}

/* Images */
.guide-image {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: block;
    cursor: zoom-in;
    transition: transform 0.2s;
}

.guide-image:hover {
    transform: scale(1.02);
}

/* Image Modal */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 40px;
}

.image-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.image-modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

/* FAQ Grid */
.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.faq-item {
    background: var(--card-hover-bg);
    padding: 20px;
    border-radius: 8px;
}

.divider {
    border: 0;
    height: 1px;
    background: var(--border-color);
    margin: 40px 0;
}

/* Table Styles */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 1rem;
}

.comparison-table th,
.comparison-table td {
    border: 1px solid var(--border-color);
    padding: 12px;
    text-align: left;
}

.comparison-table th {
    background-color: var(--card-hover-bg);
    font-weight: 600;
}

.comparison-table tr:hover {
    background-color: var(--card-hover-bg);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .selection-grid {
        grid-template-columns: 1fr;
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }
}