:root {
    --primary: #2c3e50;
    --primary-light: #34495e;
    --secondary: #3498db;
    --accent: #9b59b6;
    --success: #27ae60;
    --warning: #f39c12;
    --danger: #e74c3c;
    --light: #ecf0f1;
    --gray: #95a5a6;
    --dark: #2c3e50;
    --border-radius: 10px;
    --shadow: 0 4px 12px rgba(0,0,0,0.08);
    --transition: all 0.3s ease;
    --primary-dark: #0A1A3D;
    --primary-blue: #1A3A8F;
    --primary-accent: #3A5FCD;
    --light-blue: #E8F1FF;
    --gray-dark: #2C3E50;
    --gray-medium: #6c757d;
    --white: #FFFFFF;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #f8fafc;
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 16px;
}

/* Responsive grid for sidebar */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
        display: grid;
        grid-template-columns: 2fr 1fr;
        gap: 24px;
    }
    
    header {
        grid-column: 1 / -1;
    }
    
    .progress-container {
        grid-column: 1 / -1;
    }
    
    .results-container {
        grid-column: 1 / -1;
    }
    
    footer {
        grid-column: 1 / -1;
    }
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: var(--shadow);
    padding-top: 0px;
    padding-right: 16px;
    padding-bottom: 0px;
    padding-left: 16px;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 32px;
    color: white;
}

h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 4px;
}

/* Progress Bar */
.progress-container {
    margin-top: 24px;
    margin-right: 0;
    margin-bottom: 0px;
    margin-left: 0;
}

.progress-bar {
    height: 6px;
    background-color: var(--light);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background-color: var(--secondary);
    width: 25%;
    transition: var(--transition);
}

.progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--gray);
}

/* Main content area */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Question Screens */
.question-screen {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 28px 24px;
    margin-bottom: 20px;
    display: none;
    animation: fadeIn 0.5s ease;
}

.question-screen.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.question-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--primary);
}

.question-subtitle {
    color: var(--gray);
    margin-bottom: 24px;
    font-size: 0.95rem;
}

/* Option Groups */
.option-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option {
    width: 100%;
}

.option input {
    display: none;
}

.option label {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    background-color: var(--light);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.option input:checked + label {
    background-color: rgba(52, 152, 219, 0.1);
    border-color: var(--secondary);
    color: var(--secondary);
}

.option label i {
    font-size: 1.2rem;
    margin-right: 12px;
    width: 24px;
    text-align: center;
}

.option-text {
    flex: 1;
}

.option-title {
    font-weight: 600;
    display: block;
}

.option-desc {
    font-size: 0.85rem;
    color: var(--gray);
    margin-top: 4px;
}

/* Counter Controls */
.counter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.counter-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--secondary);
    color: white;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.counter-btn:hover {
    background-color: #2980b9;
}

.counter-value {
    font-size: 1.5rem;
    font-weight: 600;
    min-width: 40px;
    text-align: center;
}

/* Checkbox & Radio */
.checkbox-group, .radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-item, .radio-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
}

.checkbox-item input, .radio-item input {
    margin-top: 4px;
}

.checkbox-text, .radio-text {
    flex: 1;
}

/* Form Controls */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
}

select, input[type="text"] {
    width: 100%;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: var(--transition);
}

select:focus, input[type="text"]:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Tip Box */
.tip-box {
    background-color: #e8f4fc;
    border-left: 4px solid var(--secondary);
    padding: 16px;
    border-radius: 6px;
    margin-top: 20px;
    display: flex;
    gap: 12px;
}

.tip-box i {
    color: var(--secondary);
    font-size: 1.2rem;
}

/* Navigation Buttons */
.navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.btn {
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background-color: var(--secondary);
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.btn-secondary {
    background-color: var(--light);
    color: var(--dark);
}

.btn-secondary:hover {
    background-color: #d5dbdb;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Results Screen */
.results-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 28px 24px;
    margin-bottom: 20px;
    display: none;
}

.results-container.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.results-header {
    text-align: center;
    margin-bottom: 30px;
}

.results-header h2 {
    color: var(--primary);
    margin-bottom: 8px;
}

/* Complexity Rating */
.complexity-rating {
    background: linear-gradient(135deg, #f8fafc 0%, #e8f4fc 100%);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 24px;
}

.rating-label {
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--primary);
}

.rating-bar {
    height: 12px;
    background-color: #e0e6ed;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 12px;
}

.rating-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db 0%, #9b59b6 100%);
    border-radius: 6px;
    transition: width 1s ease;
}

.rating-text {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
}

.score {
    color: var(--secondary);
}

.level {
    color: var(--accent);
}

/* Recommendation Card */
.recommendation-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 24px;
}

.recommendation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.recommendation-header h3 {
    font-size: 1.2rem;
}

.badge {
    background-color: white;
    color: #764ba2;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Cost Estimate */
.cost-estimate {
    background-color: white;
    border: 2px solid var(--light);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 24px;
}

.cost-summary {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--light);
}

.cost-range {
    margin-bottom: 12px;
}

.range-label {
    display: block;
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.range-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    display: block;
}

.cost-note {
    color: var(--gray);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Cost Breakdown */
.cost-breakdown {
    margin-top: 24px;
}

.cost-breakdown h4 {
    margin-bottom: 16px;
    color: var(--primary);
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.breakdown-item.total {
    border-top: 2px solid var(--light);
    border-bottom: none;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary);
    margin-top: 12px;
    padding-top: 16px;
}

/* Timeline */
.time-estimate {
    background-color: #f9f9f9;
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 24px;
}

.time-estimate h4 {
    margin-bottom: 20px;
    color: var(--primary);
}

.timeline {
    position: relative;
    padding-left: 24px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--secondary);
}

.timeline-item {
    position: relative;
    margin-bottom: 24px;
}

.timeline-dot {
    position: absolute;
    left: -29px;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: white;
    border: 3px solid var(--secondary);
}

.timeline-content {
    padding-left: 16px;
}

.timeline-content strong {
    display: block;
    margin-bottom: 4px;
}

/* Action Recommendations */
.action-recommendations {
    background-color: #f0f7ff;
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 24px;
}

.action-recommendations h4 {
    margin-bottom: 16px;
    color: var(--primary);
}

.recommendation-list {
    margin-bottom: 24px;
}

.rec-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.rec-item i {
    color: var(--success);
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Sidebar Styles (参考律师计算器.html) */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.explanation-box {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
}

.explanation-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.explanation-title::before {
    content: "ℹ️";
    font-size: 1.2rem;
}

.explanation-content {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--dark);
}

.explanation-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--light);
}

.explanation-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.explanation-item h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 8px;
}

.explanation-item p {
    color: var(--gray);
}

.faq-box {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--success);
}

.faq-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.faq-title::before {
    content: "❓";
    font-size: 1.2rem;
}

.faq-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--light);
}

.faq-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.faq-question {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question:hover {
    color: var(--primary);
}

.faq-question::after {
    content: "▼";
    transition: transform 0.3s ease;
    font-size: 0.8rem;
}

.faq-question.active::after {
    transform: rotate(180deg);
}

.faq-answer {
    font-size: 0.9rem;
    color: var(--gray);
    line-height: 1.6;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-answer.active {
    max-height: 200px;
    margin-top: 10px;
}

/* Disclaimer */
.disclaimer {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 20px;
    border-radius: 8px;
    margin-top: 24px;
}

.disclaimer h5 {
    color: #856404;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Responsive */
@media (min-width: 768px) {
    .option-group {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .option {
        flex: 1;
        min-width: 200px;
    }
    
    .action-buttons {
        flex-direction: row;
    }
    
    .action-buttons .btn {
        flex: 1;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }
}

@media (max-width: 1199px) {
    .sidebar {
        margin-top: 30px;
    }
}

/* Header text styling for calculator */
.header-text {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-dark) 100%);
    color: white;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
    padding-top: 10px;
    padding-bottom: 10px;
    margin-bottom: 20px;
    max-width: 1168px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0px;
    padding-right: 0px;
    box-sizing: border-box;
    border-radius: 10px; 
}

@media (min-width: 375px) and (max-width: 468px) {
    .header-text h1 {
        font-size:16px;
    }
    .header-text p {
        font-size: 14px;
    }
    .header-text {
        margin-bottom: 10px;
    }
    header {
        margin-bottom: 10px;
    }
    .progress-container {
        margin-top: 5px;
    }
}

/* ===== 主要内容区域 ===== */
.main-content {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin-top: 0;
    margin-right: auto;
    margin-bottom: 0;
    margin-left: auto;
    padding-top: 0px;
    padding-right: 0px;
    padding-bottom: 20px;
    padding-left: 0px;
}

.content-placeholder {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    text-align: center;
}

.content-placeholder h1 {
    color: var(--primary-dark);
    margin-bottom: 20px;
    font-size: 2.2rem;
}

.content-placeholder p {
    color: var(--gray-dark);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.feature-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 40px;
}

.feature-item {
    background: var(--light-blue);
    padding: 25px;
    border-radius: 10px;
    width: 300px;
    border: 1px solid rgba(58, 95, 205, 0.1);
}

.feature-item h3 {
    color: var(--primary-blue);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

/* ===== 页脚内容布局 ===== */
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-disclaimer {
    background: rgba(255,255,255,0.05);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.8);
}

.text-center {
    text-align: center;
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    .feature-list {
        flex-direction: column;
        align-items: center;
    }
    
    .feature-item {
        width: 100%;
        max-width: 400px;
    }
    
    .content-placeholder {
        padding: 30px 20px;
    }
    
    .content-placeholder h1 {
        font-size: 1.8rem;
    }
}