:root {
    --primary-color: #4a90e2;
    --secondary-color: #2c3e50;
    --background-color: #f5f6fa;
    --text-color: #333;
}

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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

header {
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

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

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 2rem;
}

nav a {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 500;
}

main {
    margin-top: 80px;
    padding: 2rem;
}

.hero {
    text-align: center;
    padding: 4rem 0;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.solver-container {
    max-width: 1000px;
    margin: 2rem auto;
    background: white;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.instructions {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 2rem;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.step {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.faq {
    max-width: 800px;
    margin: 4rem auto;
}

.faq-container details {
    background: white;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.faq-container summary {
    cursor: pointer;
    font-weight: 500;
    color: var(--primary-color);
}

footer {
    text-align: center;
    padding: 2rem;
    background: var(--secondary-color);
    color: white;
    margin-top: 4rem;
}

@media (max-width: 768px) {
    nav {
        flex-direction: column;
        text-align: center;
    }

    nav ul {
        margin-top: 1rem;
    }

    nav ul li {
        margin: 0 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }
}

/* 修改结果图片容器的样式 */
.result-images {
    display: flex;
    flex-direction: column;
    gap: 40px;
    width: 100%;           /* ���保容器占满宽度 */
    max-width: 900px;      /* 限制最大宽度 */
    margin: 40px auto;     /* 水平居中 */
}

/* 修改单个图片容器的样式 */
.result-image {
    width: 100%;          /* 占满容器宽度 */
    display: flex;        /* 使用flex布局 */
    flex-direction: column; /* 垂直排列 */
    align-items: center;   /* 水平居中所有子元素 */
}

/* 图片本身的样式 */
.result-image img {
    width: 100%;          /* 占满容器宽度 */
    max-width: 800px;     /* 限制最大宽度 */
    height: auto;         /* 保持宽高比 */
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* 图片标题样式 */
.result-image h3 {
    width: 100%;         /* 占满容器宽度 */
    text-align: center;
    margin: 20px 0;
    color: #2c3e50;
    font-size: 1.4em;
    font-weight: bold;
}

/* 加载动画样式 */
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    margin: 0 auto;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 进度步骤样式 */
.progress-steps {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.step {
    opacity: 0.5;
    transition: opacity 0.3s;
}

.step.active {
    opacity: 1;
    color: #3498db;
}

/* Shared theme for secondary pages, aligned with the homepage tool UI. */
.linear-theme {
    background:
        radial-gradient(circle at 50% -10%, rgba(94, 106, 210, 0.18), transparent 30rem),
        linear-gradient(180deg, #08090a 0%, #0f1011 48%, #08090a 100%) !important;
    color: #f7f8f8 !important;
    font-feature-settings: "cv01", "ss03";
}

.linear-theme header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: rgba(8, 9, 10, 0.82) !important;
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.04) !important;
    backdrop-filter: blur(18px);
}

.linear-theme nav {
    max-width: 1280px;
    width: 100%;
    display: block;
}

.linear-theme nav ul {
    list-style: none;
}

.linear-theme nav ul li {
    margin-left: 0;
}

.linear-theme main {
    margin-top: 0;
    padding: 0;
}

.linear-theme .practice-page {
    padding-top: 7rem;
}

.linear-theme a {
    color: inherit;
}

.linear-theme .text-blue-600,
.linear-theme .hover\:text-blue-600:hover,
.linear-theme .hover\:text-blue-700:hover,
.linear-theme .text-sky-600,
.linear-theme .text-sky-700,
.linear-theme .text-emerald-600,
.linear-theme .text-emerald-700 {
    color: #8b8cff !important;
}

.linear-theme .text-gray-800,
.linear-theme .text-slate-950,
.linear-theme .text-slate-900 {
    color: #f7f8f8 !important;
}

.linear-theme .text-gray-700,
.linear-theme .text-gray-600,
.linear-theme .text-gray-500,
.linear-theme .text-gray-400,
.linear-theme .text-slate-700,
.linear-theme .text-slate-600,
.linear-theme .text-slate-500 {
    color: #d0d6e0 !important;
}

.linear-theme .bg-white,
.linear-theme .bg-gray-50,
.linear-theme .bg-slate-50 {
    background-color: rgba(255, 255, 255, 0.035) !important;
}

.linear-theme .bg-gray-100,
.linear-theme .bg-gray-200,
.linear-theme .bg-blue-50,
.linear-theme .bg-sky-50,
.linear-theme .bg-green-50,
.linear-theme .bg-yellow-50,
.linear-theme .bg-red-50,
.linear-theme .bg-purple-50,
.linear-theme .bg-orange-50 {
    background-color: rgba(255, 255, 255, 0.055) !important;
}

.linear-theme .bg-blue-600,
.linear-theme .hover\:bg-blue-700:hover,
.linear-theme .bg-sky-600,
.linear-theme .hover\:bg-sky-700:hover {
    background-color: #5e6ad2 !important;
}

.linear-theme .bg-gray-800,
.linear-theme .bg-slate-950 {
    background-color: #08090a !important;
}

.linear-theme .border-gray-200,
.linear-theme .border-gray-300,
.linear-theme .border-blue-200,
.linear-theme .border-blue-600,
.linear-theme .border-slate-200,
.linear-theme .border-slate-300,
.linear-theme .border-yellow-200,
.linear-theme .border-red-200 {
    border-color: rgba(255, 255, 255, 0.08) !important;
}

.linear-theme .shadow-sm,
.linear-theme .shadow,
.linear-theme .shadow-md,
.linear-theme .shadow-lg,
.linear-theme .shadow-xl {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 24px 80px rgba(0, 0, 0, 0.34) !important;
}

.linear-theme .rounded-lg,
.linear-theme .rounded-xl,
.linear-theme .rounded-2xl,
.linear-theme .rounded-3xl {
    border-radius: 8px !important;
}

.linear-theme .rounded-full {
    border-radius: 9999px !important;
}

.linear-theme section.bg-blue-600,
.linear-theme section.bg-gradient-to-r,
.linear-theme section.bg-gradient-to-br {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
        #0f1011 !important;
}

.linear-theme iframe,
.linear-theme img {
    border-color: rgba(255, 255, 255, 0.08) !important;
}

.linear-theme iframe {
    background: #08090a;
}

.linear-theme footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: #08090a !important;
}

.linear-theme select,
.linear-theme input,
.linear-theme textarea {
    border-color: rgba(255, 255, 255, 0.08) !important;
    background-color: rgba(255, 255, 255, 0.055) !important;
    color: #f7f8f8 !important;
}

.linear-theme .upload-section {
    background:
        linear-gradient(rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.025)),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 28px),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 28px) !important;
    border-color: rgba(255, 255, 255, 0.10) !important;
}

.linear-theme .retention-strip {
    max-width: 896px;
    margin: 24px auto 0;
    padding: 20px;
    border: 1px solid rgba(139, 140, 255, 0.28);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(94, 106, 210, 0.20), rgba(255, 255, 255, 0.035)),
        #0f1011;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 24px 70px rgba(0, 0, 0, 0.30);
}

.linear-theme .retention-strip h2,
.linear-theme .retention-strip h3 {
    margin-bottom: 8px;
    color: #f7f8f8 !important;
}

.linear-theme .retention-strip p {
    color: #d0d6e0 !important;
}

.linear-theme .retention-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.linear-theme .retention-primary,
.linear-theme .retention-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.linear-theme .retention-primary {
    border: 1px solid rgba(139, 140, 255, 0.68);
    background: #5e6ad2;
    color: #ffffff !important;
}

.linear-theme .retention-primary:hover {
    background: #7170ff;
}

.linear-theme .retention-secondary {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.045);
    color: #f7f8f8 !important;
}

.linear-theme .retention-secondary:hover {
    border-color: rgba(139, 140, 255, 0.55);
    background: rgba(139, 140, 255, 0.12);
}

.linear-theme .tool-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
}

.linear-theme .tool-card {
    display: block;
    min-height: 118px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    text-decoration: none;
    transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.linear-theme .tool-card:hover {
    border-color: rgba(139, 140, 255, 0.55);
    background: rgba(139, 140, 255, 0.10);
    transform: translateY(-1px);
}

.linear-theme .tool-card strong {
    display: block;
    margin-bottom: 8px;
    color: #f7f8f8;
}

.linear-theme .tool-card span {
    display: block;
    color: #d0d6e0;
    font-size: 14px;
    line-height: 1.55;
}

.linear-theme .solver-checklist {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.linear-theme .solver-checklist li {
    list-style: none;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    color: #d0d6e0;
}

.linear-theme .practice-mode-button,
.linear-theme .practice-check-item {
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    color: #f7f8f8;
    font-weight: 700;
    text-align: left;
    transition: border-color 160ms ease, background-color 160ms ease;
}

.linear-theme .practice-mode-button:hover,
.linear-theme .practice-mode-button.is-active {
    border-color: rgba(139, 140, 255, 0.68);
    background: rgba(139, 140, 255, 0.16);
}

.linear-theme .practice-check-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    color: #d0d6e0;
    font-weight: 600;
}

.linear-theme .practice-check {
    margin-top: 4px;
    accent-color: #5e6ad2;
}

.linear-theme .sticky-solver-cta {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 60;
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border: 1px solid rgba(139, 140, 255, 0.65);
    border-radius: 9999px;
    background: #5e6ad2;
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
}

@media (max-width: 768px) {
    .linear-theme .sticky-solver-cta {
        display: inline-flex;
    }

    .linear-theme .retention-strip {
        margin-top: 18px;
        padding: 16px;
    }

    .linear-theme .retention-actions {
        flex-direction: column;
    }

    .linear-theme .retention-primary,
    .linear-theme .retention-secondary {
        width: 100%;
    }
}

@media (min-width: 769px) {
    .linear-theme .practice-page {
        padding-top: 5rem;
    }
}
