/* ===== SO Shield - Design System ===== */

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a2e;
    --bg-card-hover: #222240;
    --border: #2a2a4a;
    --border-light: #3a3a5a;
    --text-primary: #e8e8f0;
    --text-secondary: #9898b0;
    --text-muted: #6868888;
    --accent: #6c5ce7;
    --accent-light: #a29bfe;
    --accent-glow: rgba(108, 92, 231, 0.3);
    --success: #00b894;
    --success-glow: rgba(0, 184, 148, 0.3);
    --danger: #e17055;
    --warning: #fdcb6e;
    --gradient: linear-gradient(135deg, #6c5ce7, #a29bfe);
    --gradient-success: linear-gradient(135deg, #00b894, #55efc4);
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0,0,0,0.3);
    --shadow-glow: 0 0 30px var(--accent-glow);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 48px;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-icon { font-size: 28px; }

.brand-text {
    font-size: 22px;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover { color: var(--accent-light); }

/* ===== Hero ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 80px;
    padding: 120px 80px 80px;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-content { max-width: 600px; }

.hero-title {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 24px;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.8;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* Shield animation */
.hero-visual {
    position: relative;
    width: 300px;
    height: 300px;
    flex-shrink: 0;
}

.shield-anim {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shield-core {
    font-size: 80px;
    position: relative;
    z-index: 2;
    animation: float 3s ease-in-out infinite;
}

.shield-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid var(--accent);
    opacity: 0.3;
}

.ring-1 { width: 160px; height: 160px; animation: pulse-ring 2s ease-out infinite; }
.ring-2 { width: 220px; height: 220px; animation: pulse-ring 2s ease-out 0.5s infinite; }
.ring-3 { width: 280px; height: 280px; animation: pulse-ring 2s ease-out 1s infinite; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse-ring {
    0% { transform: scale(0.8); opacity: 0.5; }
    100% { transform: scale(1.3); opacity: 0; }
}

/* ===== Sections ===== */
.features, .workflow, .protect {
    max-width: 1100px;
    margin: 0 auto;
    padding: 100px 48px;
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 12px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 18px;
    margin-bottom: 60px;
}

/* ===== Feature Cards ===== */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 24px;
    transition: all 0.3s;
    cursor: default;
}

.feature-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
    transform: translateY(-4px);
}

.feature-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.8;
}

/* ===== Workflow ===== */
.workflow-steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
}

.step {
    text-align: center;
    max-width: 200px;
    flex-shrink: 0;
}

.step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient);
    color: white;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { color: var(--text-secondary); font-size: 14px; line-height: 1.6; }
.step code { background: var(--bg-card); padding: 2px 6px; border-radius: 4px; font-size: 13px; }

.step-connector {
    width: 60px;
    height: 2px;
    background: var(--border);
    margin-top: 24px;
    flex-shrink: 0;
}

/* ===== Protect (Workbench) ===== */
.protect-container {
    max-width: 800px;
    margin: 0 auto;
}

.upload-zone {
    border: 2px dashed var(--border-light);
    border-radius: var(--radius);
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: var(--bg-secondary);
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--accent);
    background: rgba(108, 92, 231, 0.05);
}

.upload-icon { font-size: 48px; margin-bottom: 16px; }
.upload-text { font-size: 16px; color: var(--text-secondary); margin-bottom: 8px; }
.upload-browse { color: var(--accent-light); font-weight: 600; cursor: pointer; }
.upload-hint { font-size: 13px; color: var(--text-muted); }

/* File Info */
.file-info {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-top: 20px;
}

.file-info-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-icon { font-size: 24px; }
.file-name { font-weight: 600; flex: 1; }
.file-size { color: var(--text-secondary); font-size: 14px; }

.btn-remove {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 18px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-remove:hover { background: var(--danger); color: white; }

.file-analysis {
    display: flex;
    gap: 24px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.analysis-item { display: flex; flex-direction: column; gap: 4px; }
.analysis-label { font-size: 12px; color: var(--text-muted); }
.analysis-value { font-size: 15px; font-weight: 600; color: var(--accent-light); }

/* Config Panel */
.config-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    margin-top: 20px;
}

.config-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.config-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.config-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

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

.config-item input[type="checkbox"] { display: none; }

.config-check {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 2px solid var(--border-light);
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.config-item input:checked ~ .config-check {
    background: var(--accent);
    border-color: var(--accent);
}

.config-item input:checked ~ .config-check::after {
    content: '✓';
    color: white;
    font-size: 13px;
    font-weight: 700;
}

.config-icon { font-size: 20px; margin-top: 1px; flex-shrink: 0; }

.config-name {
    font-size: 14px;
    font-weight: 600;
    display: block;
}

.config-desc {
    font-size: 12px;
    color: var(--text-secondary);
    display: block;
    margin-top: 2px;
}

.config-optional {
    font-size: 12px;
    color: var(--warning);
    font-weight: 400;
}

/* Advanced config */
.config-advanced {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.slider-group {
    grid-column: span 2;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

.slider-label {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 8px;
}

.slider-label span:last-child {
    color: var(--accent-light);
    font-weight: 600;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    background: var(--border);
    border-radius: 3px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
}

/* Target mode */
.target-mode {
    display: flex;
    gap: 24px;
    margin-bottom: 16px;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.radio-item input[type="radio"] { display: none; }

.radio-check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border-light);
    transition: all 0.2s;
    position: relative;
}

.radio-item input:checked ~ .radio-check {
    border-color: var(--accent);
}

.radio-item input:checked ~ .radio-check::after {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.target-custom {
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    padding: 16px;
    max-height: 300px;
    overflow-y: auto;
}

.target-custom h4 {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.target-custom label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    font-size: 13px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
}

.target-custom label:hover { background: var(--bg-card); }

.target-custom input[type="checkbox"] {
    accent-color: var(--accent);
}

/* Action Bar */
.action-bar {
    margin-top: 24px;
    text-align: center;
}

.btn-protect {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 48px;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-protect:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-protect:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-icon { font-size: 22px; }

/* Progress */
.progress-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    margin-top: 20px;
}

.progress-bar-container {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 16px;
}

.progress-bar {
    height: 100%;
    background: var(--gradient);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-text {
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.progress-logs {
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    padding: 16px;
    max-height: 200px;
    overflow-y: auto;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    line-height: 1.8;
}

.progress-logs .log-entry {
    color: var(--text-secondary);
}

.progress-logs .log-entry.success { color: var(--success); }
.progress-logs .log-entry.error { color: var(--danger); }

/* Result */
.result-panel {
    margin-top: 20px;
}

.result-success {
    background: var(--bg-card);
    border: 1px solid var(--success);
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    box-shadow: 0 0 30px var(--success-glow);
}

.result-icon { font-size: 56px; margin-bottom: 16px; }

.result-success h3 {
    font-size: 28px;
    margin-bottom: 24px;
    color: var(--success);
}

.result-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 32px;
}

.stat { display: flex; flex-direction: column; align-items: center; }

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent-light);
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 36px;
    background: var(--gradient-success);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s;
}

.btn-download:hover { transform: translateY(-2px); }

/* Footer */
.footer {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 14px;
    border-top: 1px solid var(--border);
    margin-top: 80px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero { flex-direction: column; gap: 40px; padding: 100px 24px 60px; }
    .hero-title { font-size: 36px; }
    .hero-visual { width: 200px; height: 200px; }
    .feature-grid { grid-template-columns: 1fr; }
    .workflow-steps { flex-direction: column; align-items: center; }
    .step-connector { width: 2px; height: 30px; }
    .config-grid, .config-advanced { grid-template-columns: 1fr; }
    .slider-group { grid-column: span 1; }
    .navbar { padding: 12px 20px; }
    .nav-links { gap: 16px; }
}
