/* ========================================
   SG PHP Encryptor - Main Stylesheet
   Professional dark theme
   ======================================== */

/* --- CSS Variables --- */
:root {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --bg-card: #1c2128;
    --border: #30363d;
    --border-light: #484f58;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;
    --accent: #f78166;
    --accent-blue: #58a6ff;
    --accent-green: #3fb950;
    --accent-orange: #d2991d;
    --accent-red: #f85149;
    --accent-purple: #a371f7;
    --code-bg: #0d1117;
    --font-mono: 'Cascadia Code', 'Fira Code', 'Consolas', 'Source Code Pro', monospace;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --radius: 8px;
    --radius-sm: 4px;
    --transition: 0.2s ease;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--accent-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

code, pre {
    font-family: var(--font-mono);
    font-size: 0.875rem;
}

code {
    background: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--accent-orange);
}

/* --- Navbar --- */
.navbar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(12px);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    height: 56px;
    gap: 32px;
}

.nav-brand {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--accent) !important;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    text-decoration: none !important;
}

.nav-links {
    display: flex;
    gap: 4px;
    flex: 1;
}

.nav-links a {
    padding: 8px 14px;
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.nav-links a:hover,
.nav-links a.active {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.nav-links a.active {
    font-weight: 600;
}

.php-badge {
    background: var(--accent-green);
    color: #000;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

/* --- Main Content --- */
.main-content {
    flex: 1;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 32px 24px;
}

/* --- Footer --- */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 20px 0;
    margin-top: auto;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-sub {
    font-size: 0.8rem;
    margin-top: 4px;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}
.status-dot.active { background: var(--accent-green); }
.status-dot.inactive { background: var(--accent-red); }

/* --- Hero Section --- */
.hero {
    display: flex;
    gap: 48px;
    align-items: center;
    min-height: 420px;
    padding: 32px 0;
}

.hero-content {
    flex: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--accent), var(--accent-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin-bottom: 28px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 36px;
}

.hero-stats {
    display: flex;
    gap: 32px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.hero-visual {
    flex: 1;
    max-width: 500px;
}

/* --- Code Window --- */
.code-window {
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.code-window-header {
    background: var(--bg-tertiary);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border);
}

.dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.code-window-title {
    flex: 1;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.code-window-body {
    padding: 16px;
    overflow-x: auto;
}

.code-window-body pre {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.8;
}

.code-keyword { color: #ff7b72; }
.code-comment { color: #8b949e; font-style: italic; }
.code-string { color: #a5d6ff; }
.code-func { color: #d2a8ff; }

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    border: 1px solid transparent;
    text-decoration: none;
    font-family: var(--font-sans);
}

.btn:hover { text-decoration: none; }

.btn-primary {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}
.btn-primary:hover {
    background: #fb8c6e;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(247, 129, 102, 0.3);
}

.btn-outline {
    background: transparent;
    border-color: var(--border-light);
    color: var(--text-primary);
}
.btn-outline:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-secondary);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

.btn-block {
    width: 100%;
    justify-content: center;
    padding: 14px;
    font-size: 1rem;
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 6px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    font-size: 0.9rem;
}
.btn-icon:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* --- Section Titles --- */
.section-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 28px;
    text-align: center;
}

/* --- Scheme Cards (Home) --- */
.schemes-overview {
    padding: 48px 0;
}

.schemes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.scheme-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: all var(--transition);
}

.scheme-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    border-color: var(--border-light);
}

.scheme-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.scheme-level {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 10px;
    color: #fff;
}

.scheme-card h3 {
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.scheme-short {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.scheme-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    flex: 1;
}

.scheme-loader {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.scheme-loader span { margin-right: 4px; }
.scheme-loader code { font-size: 0.7rem; }

/* --- Features (Home) --- */
.features {
    padding: 48px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.feature-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: all var(--transition);
}

.feature-item:hover {
    border-color: var(--accent-blue);
}

.feature-item i {
    font-size: 1.5rem;
    color: var(--accent-blue);
    margin-bottom: 12px;
}

.feature-item h4 {
    margin-bottom: 8px;
    font-size: 1rem;
}

.feature-item p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* --- Encrypt Page --- */
.encrypt-page {
    padding: 0;
}

.encrypt-header {
    text-align: center;
    margin-bottom: 28px;
}

.encrypt-header h1 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.encrypt-header p {
    color: var(--text-secondary);
}

.encrypt-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    min-height: 620px;
}

.encrypt-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.panel-header h3 {
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-actions {
    display: flex;
    gap: 4px;
}

.code-editor {
    flex: 1;
    background: var(--code-bg);
    border: none;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    padding: 16px;
    resize: none;
    min-height: 400px;
    line-height: 1.7;
    tab-size: 4;
}

.code-editor:focus {
    outline: none;
}

.code-editor::placeholder {
    color: var(--text-muted);
}

/* Scheme Selector */
.scheme-selector {
    padding: 16px 16px 0;
}

.scheme-selector label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.scheme-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.scheme-tab {
    cursor: pointer;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 6px 12px;
    transition: all var(--transition);
    position: relative;
}

.scheme-tab input {
    display: none;
}

.scheme-tab-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.scheme-tab:hover .scheme-tab-label {
    color: var(--text-primary);
}

.scheme-tab.active .scheme-tab-label {
    color: #fff;
}

/* Encrypt Options */
.encrypt-options {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.option-group span {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.option-group select {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    cursor: pointer;
}

.option-group select:focus {
    outline: none;
    border-color: var(--accent);
}

.option-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.option-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
}

/* Output */
.output-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-top: 16px;
    border-top: 1px solid var(--border);
}

.encrypt-stats {
    display: flex;
    gap: 16px;
    padding: 12px 16px;
    font-size: 0.78rem;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.encrypt-stats .stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

.encrypt-stats strong { color: var(--accent); }

.output-code {
    flex: 1;
    padding: 16px;
    background: var(--code-bg);
    overflow: auto;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    line-height: 1.6;
    white-space: pre;
    color: var(--text-primary);
    max-height: 350px;
}

.scheme-info {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 16px;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
}

.info-badge {
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
}

.info-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    gap: 16px;
}

.info-meta code { font-size: 0.7rem; }

/* --- Compare Page --- */
.compare-page {
    padding: 0;
}

.compare-header {
    text-align: center;
    margin-bottom: 32px;
}

.compare-header h1 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.compare-header p {
    color: var(--text-secondary);
}

/* Score Cards */
.score-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 48px;
}

.score-card {
    background: var(--bg-card);
    border: 2px solid;
    border-radius: var(--radius);
    padding: 20px;
}

.score-card h3 {
    margin-bottom: 16px;
    font-size: 1.1rem;
}

.score-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.score-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.score-row span:first-child {
    width: 50px;
}

.score-row strong {
    width: 30px;
    text-align: right;
}

.score-bar {
    flex: 1;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s ease;
}

/* Table */
.compare-table-wrapper {
    margin-bottom: 48px;
}

.table-scroll {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    min-width: 900px;
}

.compare-table thead th {
    background: var(--bg-tertiary);
    padding: 12px 10px;
    text-align: center;
    font-weight: 600;
    font-size: 0.78rem;
    border-bottom: 2px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1;
}

.col-sg16 { color: var(--accent-orange); }
.col-sg15 { color: #e67e22; }
.col-sg14 { color: var(--accent-red); }
.col-ioncube { color: var(--accent-blue); }
.col-goto { color: var(--accent-green); }
.col-beast { color: var(--accent-purple); }
.col-swoole { color: #1abc9c; }

.compare-table tbody td {
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.compare-table tbody tr:hover td {
    background: var(--bg-secondary);
}

.compare-table tbody td:first-child {
    text-align: left;
    font-weight: 500;
    color: var(--text-secondary);
}

.compare-table .yes { color: var(--accent-green); }
.compare-table .no { color: var(--text-muted); }
.compare-table .partial { color: var(--accent-orange); }
.compare-table .highlight { color: var(--accent-green); font-weight: 600; }

/* Recommendations */
.recommendations {
    margin-bottom: 48px;
}

.recommend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.recommend-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: all var(--transition);
}

.recommend-card:hover {
    border-color: var(--border-light);
}

.recommend-card i {
    font-size: 1.6rem;
    margin-bottom: 12px;
}

.recommend-card h4 {
    font-size: 1rem;
    margin-bottom: 8px;
}

.recommend-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.recommend-card strong {
    color: var(--accent-orange);
}

/* --- Docs Page --- */
.docs-page {
    padding: 0;
}

.docs-header {
    text-align: center;
    margin-bottom: 32px;
}

.docs-header h1 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.docs-header p {
    color: var(--text-secondary);
}

.docs-grid {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 32px;
    align-items: start;
}

.docs-nav {
    position: sticky;
    top: 80px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.docs-nav h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.docs-nav ul {
    list-style: none;
}

.docs-nav li {
    margin-bottom: 4px;
}

.docs-nav a {
    display: block;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: all var(--transition);
    text-decoration: none;
}

.docs-nav a:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.doc-section {
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
}

.doc-section:last-child {
    border-bottom: none;
}

.doc-section h2 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.doc-section h4 {
    font-size: 1rem;
    margin: 16px 0 8px;
    color: var(--text-secondary);
}

.doc-section p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 12px;
}

.doc-step {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.step-num {
    width: 28px;
    height: 28px;
    background: var(--accent);
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.doc-step h4 {
    margin: 0 0 4px;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.doc-step p {
    margin: 0;
}

.info-box {
    background: var(--bg-secondary);
    border-left: 3px solid var(--accent-blue);
    padding: 14px 16px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 16px 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.info-box i { color: var(--accent-blue); margin-top: 2px; }

.info-box.warning {
    border-left-color: var(--accent-orange);
}
.info-box.warning i { color: var(--accent-orange); }

.code-block {
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin: 12px 0;
    overflow-x: auto;
}

.code-block pre {
    padding: 16px;
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.7;
    color: var(--text-primary);
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 12px;
}

.faq-item h4 {
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.faq-item p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 0;
}

/* --- Loading Spinner --- */
.loading {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- Toast Notification --- */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--accent-green);
    color: #000;
    padding: 12px 20px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 9999;
    opacity: 0;
    transform: translateX(40px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast.error {
    background: var(--accent-red);
    color: #fff;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .hero {
        flex-direction: column;
        text-align: center;
    }
    
    .hero h1 { font-size: 2rem; }
    .hero-actions { justify-content: center; }
    .hero-stats { justify-content: center; }
    .hero-visual { max-width: 100%; }
    
    .encrypt-container {
        grid-template-columns: 1fr;
    }
    
    .code-editor {
        min-height: 250px;
    }
    
    .docs-grid {
        grid-template-columns: 1fr;
    }
    
    .docs-nav {
        position: static;
    }
    
    .nav-container {
        flex-wrap: wrap;
        height: auto;
        padding: 12px 16px;
        gap: 12px;
    }
    
    .nav-links {
        order: 3;
        width: 100%;
        overflow-x: auto;
    }
    
    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
}

@media (max-width: 640px) {
    .main-content { padding: 16px 12px; }
    .schemes-grid { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: 1fr; }
    .recommend-grid { grid-template-columns: 1fr; }
    .score-cards { grid-template-columns: 1fr; }
    .scheme-tabs { gap: 4px; }
    .scheme-tab-label { font-size: 0.7rem; }
    .scheme-tab { padding: 4px 8px; }
}

/* ========================================
   Workflow Page - Upload / Encrypt / Download
   ======================================== */

.workflow-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 0;
}

.workflow-header {
    text-align: center;
    margin-bottom: 30px;
}

.workflow-header h1 {
    font-size: 2rem;
    color: #f39c12;
    margin-bottom: 10px;
}

.workflow-header h1 i { margin-right: 10px; }

.workflow-header p {
    color: #999;
    font-size: 1.05rem;
}

/* Steps Indicator */
.steps-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    padding: 20px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #555;
    transition: all 0.3s;
}

.step.active { color: #f39c12; }
.step.done { color: #2ecc71; }

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid #444;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    background: #1a1a2e;
    transition: all 0.3s;
}

.step.active .step-circle {
    border-color: #f39c12;
    color: #f39c12;
    box-shadow: 0 0 15px rgba(243, 156, 18, 0.3);
}

.step.done .step-circle {
    border-color: #2ecc71;
    color: #2ecc71;
    background: rgba(46, 204, 113, 0.1);
}

.step span {
    font-size: 0.85rem;
    font-weight: 500;
}

.step-line {
    width: 80px;
    height: 3px;
    background: #333;
    margin: 0 10px;
    margin-bottom: 22px;
    transition: background 0.3s;
}

.step-line.active { background: #2ecc71; }

/* Alert */
.alert {
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.alert-error {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: #e74c3c;
}

.alert-error p { margin: 5px 0; }
.alert-error i { margin-right: 8px; }

/* ========================================
   Upload Zone
   ======================================== */
.upload-section { margin-bottom: 40px; }

.drop-zone {
    border: 3px dashed #444;
    border-radius: 16px;
    padding: 60px 30px;
    text-align: center;
    background: #12121f;
    transition: all 0.3s;
    cursor: pointer;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: #f39c12;
    background: rgba(243, 156, 18, 0.05);
}

.drop-icon {
    font-size: 3.5rem;
    color: #555;
    margin-bottom: 15px;
    display: block;
}

.drop-zone:hover .drop-icon,
.drop-zone.dragover .drop-icon { color: #f39c12; }

.drop-zone h3 {
    font-size: 1.3rem;
    color: #ccc;
    margin-bottom: 8px;
}

.drop-zone p {
    color: #777;
    margin-bottom: 5px;
}

.drop-hint {
    font-size: 0.85rem;
    margin-bottom: 20px !important;
}

.btn-upload {
    display: inline-block;
    margin-top: 10px;
    cursor: pointer;
}

.file-info {
    margin-top: 15px;
    padding: 12px 18px;
    background: #12121f;
    border: 1px solid #333;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-info #file-name { color: #f39c12; font-weight: 500; }
.file-info #file-size { color: #888; }

/* ========================================
   File Analysis (Step 2)
   ======================================== */
.file-analysis {
    background: #12121f;
    border: 1px solid #2a2a3a;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.file-analysis h3 { color: #ccc; margin-bottom: 20px; font-size: 1.15rem; }

.analysis-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 25px;
}

.stat-card {
    background: #1a1a2e;
    border-radius: 10px;
    padding: 18px;
    text-align: center;
    border: 1px solid #2a2a3a;
}

.stat-card .stat-value {
    display: block;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-card .stat-label {
    display: block;
    font-size: 0.8rem;
    color: #888;
}

.stat-card.total .stat-value { color: #3498db; }
.stat-card.php .stat-value { color: #2ecc71; }
.stat-card.other .stat-value { color: #e74c3c; }
.stat-card.size .stat-value { color: #f39c12; }

/* File Lists */
.file-lists { display: flex; flex-direction: column; gap: 15px; }

.file-group {
    border: 1px solid #2a2a3a;
    border-radius: 8px;
    overflow: hidden;
}

.group-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    font-size: 0.9rem;
    margin: 0;
}

.group-title.keep {
    background: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
    border-bottom: 1px solid rgba(46, 204, 113, 0.15);
}

.group-title.filter {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border-bottom: 1px solid rgba(231, 76, 60, 0.15);
}

.btn-toggle {
    margin-left: auto;
    background: none;
    border: 1px solid #555;
    color: #999;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
}

.file-list-scroll {
    max-height: 300px;
    overflow-y: auto;
    padding: 8px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-bottom: 3px;
}

.file-item.keep { color: #ccc; }
.file-item.filter { color: #888; opacity: 0.7; }
.file-item.done { color: #ccc; }

.file-item i { width: 18px; text-align: center; }
.file-item.keep i { color: #2ecc71; }
.file-item.filter i { color: #e74c3c; }

.file-relpath {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: 'Consolas', monospace;
}

.file-size {
    color: #777;
    font-size: 0.8rem;
    white-space: nowrap;
}

/* ========================================
   Encrypt Config (Step 2)
   ======================================== */
.encrypt-config {
    background: #12121f;
    border: 1px solid #2a2a3a;
    border-radius: 12px;
    padding: 25px;
}

.encrypt-config h3 { color: #ccc; margin-bottom: 20px; font-size: 1.15rem; }

.scheme-selector-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 25px;
}

.scheme-radio-card {
    background: #1a1a2e;
    border: 2px solid #333;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.25s;
    position: relative;
}

.scheme-radio-card:hover {
    border-color: #555;
    background: #22223a;
}

.scheme-radio-card.selected {
    border-color: #f39c12;
    background: rgba(243, 156, 18, 0.08);
    box-shadow: 0 0 15px rgba(243, 156, 18, 0.15);
}

.scheme-radio-card input { display: none; }

.scheme-radio-card .scheme-name {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: #ddd;
    margin-bottom: 8px;
}

.scheme-radio-card .scheme-type {
    display: inline-block;
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 3px;
    color: #fff;
    margin-bottom: 6px;
}

/* ========================================
   Home Page - 方案介绍
   ======================================== */
.hero-section {
    text-align: center;
    padding: 60px 20px 50px;
    max-width: 800px;
    margin: 0 auto;
}
.hero-badge {
    display: inline-block;
    background: rgba(243, 156, 18, 0.15);
    color: #f39c12;
    font-size: 0.8rem;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(243, 156, 18, 0.3);
}
.hero-section h1 {
    font-size: 2.8rem;
    font-weight: 700;
    color: #e6edf3;
    margin-bottom: 16px;
    line-height: 1.2;
}
.hero-desc {
    font-size: 1.1rem;
    color: #8b949e;
    line-height: 1.7;
    margin-bottom: 30px;
}
.hero-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Features */
.features-section {
    padding: 40px 20px 50px;
    max-width: 1100px;
    margin: 0 auto;
}
.features-section h2 {
    text-align: center;
    font-size: 1.6rem;
    margin-bottom: 35px;
    color: #e6edf3;
}
.features-section h2 i { color: #f39c12; margin-right: 8px; }
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.feature-card {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 28px 24px;
    transition: border-color 0.2s, transform 0.2s;
}
.feature-card:hover {
    border-color: #f39c12;
    transform: translateY(-2px);
}
.feature-icon {
    font-size: 1.8rem;
    color: #f39c12;
    margin-bottom: 14px;
}
.feature-card h3 {
    font-size: 1.05rem;
    color: #e6edf3;
    margin-bottom: 10px;
}
.feature-card p {
    font-size: 0.9rem;
    color: #8b949e;
    line-height: 1.6;
}

/* Scheme Overview on Home */
.schemes-overview {
    padding: 40px 20px 50px;
    max-width: 1100px;
    margin: 0 auto;
}
.schemes-overview h2 {
    text-align: center;
    font-size: 1.6rem;
    margin-bottom: 35px;
    color: #e6edf3;
}
.schemes-overview h2 i { color: #f39c12; margin-right: 8px; }
.schemes-overview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.scheme-overview-card {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s;
}
.scheme-overview-card:hover { border-color: #484f58; }
.scheme-overview-header {
    padding: 20px 20px 14px;
}
.scheme-ov-icon { font-size: 1.6rem; }
.scheme-overview-header h4 {
    font-size: 1rem;
    color: #e6edf3;
    margin: 8px 0 6px;
}
.scheme-ov-desc {
    font-size: 0.84rem;
    color: #8b949e;
    line-height: 1.6;
    padding: 0 20px;
    margin-bottom: 12px;
}
.scheme-ov-features {
    list-style: none;
    padding: 0 20px 18px;
    margin: 0;
}
.scheme-ov-features li {
    font-size: 0.82rem;
    color: #c9d1d9;
    padding: 3px 0;
}
.scheme-ov-features li i { margin-right: 6px; }

.grade-badge-small {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 3px;
    text-transform: uppercase;
}
.grade-gold { background: rgba(212, 153, 29, 0.2); color: #d2991d; }
.grade-green { background: rgba(63, 185, 80, 0.2); color: #3fb950; }
.grade-gray { background: rgba(139, 148, 158, 0.2); color: #8b949e; }

/* How It Works */
.how-it-works {
    padding: 40px 20px 50px;
    max-width: 1100px;
    margin: 0 auto;
}
.how-it-works h2 {
    text-align: center;
    font-size: 1.6rem;
    margin-bottom: 35px;
    color: #e6edf3;
}
.how-it-works h2 i { color: #f39c12; margin-right: 8px; }
.flow-steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
}
.flow-step {
    text-align: center;
    flex: 0 0 180px;
}
.flow-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(243, 156, 18, 0.15);
    color: #f39c12;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
}
.flow-step h4 {
    font-size: 0.95rem;
    color: #e6edf3;
    margin-bottom: 8px;
}
.flow-step p {
    font-size: 0.82rem;
    color: #8b949e;
    line-height: 1.5;
}
.flow-arrow {
    display: flex;
    align-items: center;
    padding: 0 10px;
    margin-top: 10px;
    color: #484f58;
    font-size: 1.3rem;
}

/* CTA */
.cta-section {
    text-align: center;
    padding: 50px 20px 60px;
    max-width: 600px;
    margin: 0 auto;
}
.cta-section h2 {
    font-size: 1.8rem;
    color: #e6edf3;
    margin-bottom: 12px;
}
.cta-section p {
    font-size: 1rem;
    color: #8b949e;
    margin-bottom: 25px;
}

/* ========================================
   Tool Page - CLI Detection Panel
   ======================================== */
.tools-detection-panel {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 30px;
}
.tools-detection-panel h4 {
    font-size: 0.95rem;
    color: #e6edf3;
    margin-bottom: 15px;
}
.tools-detection-panel h4 i { color: #58a6ff; margin-right: 6px; }
.tools-status-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}
.tool-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 10px;
    background: #0d1117;
    border-radius: 8px;
    border: 1px solid #21262d;
    text-align: center;
}
.tool-status .tool-icon { font-size: 1.2rem; margin-bottom: 6px; }
.tool-status .tool-name { font-size: 0.78rem; color: #c9d1d9; margin-bottom: 4px; font-weight: 600; }
.tool-status .tool-state { font-size: 0.7rem; color: #6e7681; line-height: 1.3; word-break: break-all; }
.tool-status.installed { border-color: rgba(63, 185, 80, 0.3); }
.tool-status.installed .tool-icon { color: #3fb950; }
.tool-status.missing { border-color: rgba(248, 81, 73, 0.25); }
.tool-status.missing .tool-icon { color: #f85149; }

.tool-notice {
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 0.82rem;
    line-height: 1.5;
    margin-top: 8px;
}
.tool-notice.warning {
    background: rgba(212, 153, 29, 0.1);
    border: 1px solid rgba(212, 153, 29, 0.3);
    color: #d2991d;
}
.tool-notice.info {
    background: rgba(88, 166, 255, 0.08);
    border: 1px solid rgba(88, 166, 255, 0.2);
    color: #58a6ff;
}
.tool-notice code { background: rgba(255,255,255,0.08); padding: 1px 5px; border-radius: 3px; font-size: 0.8rem; }

/* Install Guide */
.install-guide {
    margin-bottom: 30px;
}
.install-guide summary {
    cursor: pointer;
    padding: 12px 16px;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    color: #c9d1d9;
    font-size: 0.9rem;
    list-style: none;
}
.install-guide summary::-webkit-details-marker { display: none; }
.install-guide summary i { color: #58a6ff; margin-right: 6px; }
.guide-content {
    padding: 20px;
    background: #0d1117;
    border: 1px solid #30363d;
    border-top: none;
    border-radius: 0 0 8px 8px;
}
.guide-block { margin-bottom: 18px; }
.guide-block:last-child { margin-bottom: 0; }
.guide-block h5 {
    font-size: 0.9rem;
    color: #e6edf3;
    margin-bottom: 6px;
}
.guide-block p {
    font-size: 0.82rem;
    color: #8b949e;
    margin-bottom: 8px;
}
.guide-block ol {
    padding-left: 20px;
    margin: 0;
}
.guide-block ol li {
    font-size: 0.82rem;
    color: #8b949e;
    line-height: 1.7;
}
.guide-block a { color: #58a6ff; }
.guide-block code {
    background: rgba(255,255,255,0.06);
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 0.8rem;
    color: #e6edf3;
}

/* Grade Badge (scheme cards) */
.grade-badge {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 3px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

/* ========================================
   Responsive: Home & Tool
   ======================================== */
@media (max-width: 900px) {
    .features-grid { grid-template-columns: 1fr 1fr; }
    .schemes-overview-grid { grid-template-columns: 1fr 1fr; }
    .tools-status-grid { grid-template-columns: 1fr 1fr; }
    .flow-steps { flex-wrap: wrap; justify-content: center; gap: 15px; }
    .flow-arrow { display: none; }
    .flow-step { flex: 0 0 40%; }
}
@media (max-width: 600px) {
    .hero-section h1 { font-size: 2rem; }
    .hero-actions { flex-direction: column; }
    .features-grid, .schemes-overview-grid { grid-template-columns: 1fr; }
    .tools-status-grid { grid-template-columns: 1fr; }
    .flow-step { flex: 0 0 100%; }
}

.scheme-radio-card .scheme-loader {
    display: block;
    font-size: 0.7rem;
    color: #777;
}

/* 自动推荐卡片 */
.scheme-radio-card.auto-recommend {
    grid-column: 1 / -1;
    border-color: #27ae60 !important;
    background: rgba(39, 174, 96, 0.08);
    padding: 16px 18px;
}

.scheme-radio-card.auto-recommend .scheme-badge {
    display: inline-block;
    background: #27ae60;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 3px;
    margin-right: 8px;
    vertical-align: middle;
}

.scheme-radio-card.auto-recommend .scheme-reason {
    display: block;
    font-size: 0.78rem;
    color: #27ae60;
    margin-top: 8px;
    line-height: 1.4;
}

.scheme-radio-card.auto-matched {
    opacity: 0.6;
    border-style: dashed;
}

/* 扩展选项区域 */
.extended-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
    padding: 18px;
    background: rgba(139, 148, 158, 0.04);
    border: 1px solid #30363d;
    border-radius: 10px;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    background: #1a1a2e;
    border: 1px solid #333;
    border-radius: 6px;
    color: #ddd;
    font-size: 0.9rem;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #58a6ff;
}

.form-input::placeholder {
    color: #555;
}

.option-hint {
    font-size: 0.72rem;
    color: #555;
    margin-top: 6px;
    line-height: 1.3;
}

.encrypt-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.option-group label {
    display: block;
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 8px;
}

.form-select {
    width: 100%;
    padding: 10px 14px;
    background: #1a1a2e;
    border: 1px solid #333;
    border-radius: 6px;
    color: #ddd;
    font-size: 0.9rem;
}

.form-select:focus {
    outline: none;
    border-color: #f39c12;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 5px 0;
    font-size: 0.85rem;
    color: #ccc !important;
}

.checkbox-label input[type="checkbox"] {
    accent-color: #f39c12;
    width: 16px;
    height: 16px;
}

.btn-large {
    padding: 14px 28px;
    font-size: 1.1rem;
}

/* ========================================
   Done Section (Step 3)
   ======================================== */
.done-section {
    text-align: center;
}

.done-header {
    margin-bottom: 30px;
}

.done-check {
    font-size: 4rem;
    color: #2ecc71;
    margin-bottom: 15px;
}

.done-header h2 {
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 8px;
}

.done-header p {
    color: #999;
    font-size: 1.05rem;
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 30px;
}

.result-card {
    background: #12121f;
    border: 1px solid #2a2a3a;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

.result-card .result-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #f39c12;
    margin-bottom: 5px;
}

.result-card.failed .result-value { color: #e74c3c; }

.result-card .result-label {
    display: block;
    font-size: 0.8rem;
    color: #888;
}

.encrypted-files-list {
    text-align: left;
    background: #12121f;
    border: 1px solid #2a2a3a;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
}

.encrypted-files-list h4 {
    color: #ccc;
    font-size: 0.95rem;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #2a2a3a;
}

.encrypted-files-list .file-item i { color: #f39c12; }

.download-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* ========================================
   Process Form
   ======================================== */
.process-form { max-width: 100%; }

@media (max-width: 900px) {
    .analysis-stats,
    .result-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .scheme-selector-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .encrypt-options-grid {
        grid-template-columns: 1fr;
    }
    .extended-options-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .analysis-stats,
    .result-stats {
        grid-template-columns: 1fr;
    }
    .scheme-selector-grid {
        grid-template-columns: 1fr;
    }
    .extended-options-grid {
        grid-template-columns: 1fr;
    }
    .download-actions {
        flex-direction: column;
    }
    .steps-indicator {
        flex-direction: column;
        gap: 10px;
    }
    .step-line {
        width: 3px;
        height: 30px;
        margin: 0;
    }
}
