.tool-fullwidth {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* Tool shell */
.academic-tool {
    max-width: 100%;
    margin: 0 auto;
}

.academic-tool.editor-section,
.editor-section.academic-tool {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.academic-tool .card:not(.result-card) {
    border: 1px solid var(--color-border, #e5e7eb);
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.06));
    border-radius: var(--radius, 12px);
    background: var(--color-surface, #fff);
}

.academic-tool .card-body {
    padding: 1.25rem 1.35rem;
}

.academic-tool .card-title {
    color: var(--color-text, #1f2937);
    font-weight: 700;
    font-size: 1.05rem;
}

.academic-tool .form-control,
.academic-tool .form-select,
.academic-tool .select-input,
.academic-tool textarea {
    border-radius: 8px;
    border: 1px solid var(--color-border, #e5e7eb);
}

.academic-tool .form-control:focus,
.academic-tool .form-select:focus,
.academic-tool textarea:focus {
    border-color: var(--color-primary, #0d9488);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.academic-tool .btn-primary {
    background: var(--color-primary, #0d9488);
    border-color: var(--color-primary, #0d9488);
}

.academic-tool .btn-primary:hover {
    background: var(--color-primary-hover, #0f766e);
    border-color: var(--color-primary-hover, #0f766e);
}

.academic-tool .alert {
    border-radius: 10px;
}

[data-theme="dark"] .academic-tool .card:not(.result-card) {
    background: var(--color-surface, #1f2937);
    border-color: var(--color-border, #374151);
}

[data-theme="dark"] .academic-tool .card-title,
[data-theme="dark"] .academic-tool .form-label,
[data-theme="dark"] .academic-tool {
    color: var(--color-text, #f9fafb);
}

[data-theme="dark"] .academic-tool .text-muted,
[data-theme="dark"] .academic-tool .form-text {
    color: var(--color-text-secondary, #9ca3af) !important;
}

[data-theme="dark"] .academic-tool .form-control,
[data-theme="dark"] .academic-tool .form-select,
[data-theme="dark"] .academic-tool textarea {
    background: #111827;
    color: var(--color-text, #f9fafb);
    border-color: var(--color-border, #374151);
}

/* --- tool: weighted-average-score-calculator --- */
/* 加权平均分数计算器样式 */
.weighted-average-calculator {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: auto;
    padding: 2rem 0;
}

.calculator-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem;
    margin: 2rem 0;
}

.calculator-title {
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    margin-bottom: 1rem;
}

.course-input-group {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.course-input-group:hover {
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.1);
}

.course-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.course-number {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
}

.remove-course-btn {
    background: #dc3545;
    border: none;
    color: white;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.remove-course-btn:hover {
    background: #c82333;
    transform: scale(1.1);
}

.form-control, .form-select {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.btn-primary {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border: none;
    border-radius: 10px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-success {
    background: linear-gradient(45deg, #28a745, #20c997);
    border: none;
    border-radius: 10px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(40, 167, 69, 0.3);
}

.btn-outline-danger {
    border-radius: 10px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-danger:hover {
    transform: translateY(-2px);
}

.result-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    margin-top: 2rem;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.result-score {
    font-size: 3rem;
    font-weight: 700;
    margin: 1rem 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.result-details {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 1rem;
    margin-top: 1rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    margin: 0.5rem 0;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.detail-item:last-child {
    border-bottom: none;
}

.calculation-steps {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1rem;
    margin-top: 1rem;
    border-left: 4px solid #667eea;
}

.step-item {
    margin: 0.5rem 0;
    padding: 0.5rem;
    background: white;
    border-radius: 5px;
    border: 1px solid #e9ecef;
}

.alert {
    border-radius: 10px;
    border: none;
    padding: 1rem;
    margin: 1rem 0;
}

.alert-danger {
    background: linear-gradient(45deg, #dc3545, #fd7e14);
    color: white;
}

.alert-success {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
}

@media (max-width: 768px) {
    .calculator-container {
        margin: 1rem;
        padding: 1rem;
    }
    
    .course-header {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .result-score {
        font-size: 2rem;
    }
}
