:root {
    --primary: #1a365d;
    --secondary: #2c5282;
    --accent: #e2b979;
    --light: #f7fafc;
    --dark: #2d3748;
    --success: #48bb78;
    --warning: #ed8936;
    --error: #e53e3e;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background-color: #f5f7fa;
    color: var(--dark);
    line-height: 1.6;
    width: 100%;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

#riskBaseFeeGroup {
    display: none;
}

.header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    width: 100%;
}

.header::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg"  width="100" height="100" viewBox="0 0 100 100"><text x="10" y="50" font-family="Georgia" font-size="20" fill="rgba(255,255,255,0.05)">⚖</text></svg>');
    opacity: 0.1;
}

.header-flex {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.back-button {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    margin-right: 1.5rem;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0.375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    flex-shrink: 0;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.back-button i {
    margin-right: 0.5rem;
}

.header h1 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 700;
    position: relative;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 100%;
    position: relative;
}

.calculator-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    width: 100%;
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
        width: 100%;
        box-sizing: border-box;
    }

    .header {
        padding: 1.5rem 1rem;
        width: 100%;
        box-sizing: border-box;
    }

    .header h1 {
        font-size: 1.8rem;
        width: 100%;
        word-break: break-word;
    }

    .header p {
        font-size: 1rem;
        width: 100%;
    }

    .calculator-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        width: 100%;
    }

    .form-section,
    .result-section {
        padding: 1.5rem;
        width: 100%;
        box-sizing: border-box;
    }

    .section-title {
        font-size: 1.25rem;
    }

    button {
        padding: 0.7rem 1rem;
    }

    .result-value {
        font-size: 1.75rem;
    }

    .fee-breakdown {
        font-size: 0.9rem;
    }

    .formula-item {
        padding: 0.5rem;
    }

    .tooltip-content {
        width: 250px;
        left: auto;
        right: 0;
        transform: none;
    }

    .modal-content {
        width: 95%;
        max-height: 90vh;
    }

    /* 手机端显示律师费说明在法律声明上方 */
    .mobile-fee-explanation-container {
        display: block;
        margin-top: 1.5rem;
        margin-bottom: 1.5rem;
    }

    /* 表单中的律师费说明在手机端隐藏 */
    .form-section .fee-explanation-container {
        display: none;
    }
}

.form-section,
.result-section {
    background: white;
    border-radius: 0.5rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    width: 100%;
    box-sizing: border-box;
}

.section-title {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent);
    display: flex;
    align-items: center;
    width: 100%;
}

.section-title i {
    margin-right: 0.75rem;
    color: var(--accent);
}

.form-group {
    margin-bottom: 1.5rem;
    width: 100%;
}

.location-display {
    position: relative;
    display: none;
    /* Hide by default, will show only on mobile */
}

@media (max-width: 768px) {
    .location-display {
        display: block;
        /* Show on mobile */
    }

    #location {
        display: none !important;
        /* Hide select on mobile */
    }
}

@media (min-width: 769px) {
    .location-display {
        display: none;
        /* Hide on desktop */
    }

    #location {
        display: block !important;
        /* Show select on desktop */
    }
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--secondary);
}

select,
input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    font-size: 1rem;
    transition: all 0.2s;
    box-sizing: border-box;
}

select:focus,
input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(226, 185, 121, 0.3);
}

button {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    width: 100%;
    margin-top: 1rem;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.result-card {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border-left: 4px solid var(--accent);
    width: 100%;
    box-sizing: border-box;
}

.result-title {
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.result-title i {
    margin-right: 0.5rem;
    color: var(--accent);
}

.result-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary);
    margin: 0.5rem 0;
}

.result-details {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #718096;
}

.fee-breakdown {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    box-sizing: border-box;
}

.fee-breakdown th,
.fee-breakdown td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.fee-breakdown th {
    background-color: #f7fafc;
    color: var(--primary);
    font-weight: 600;
}

.fee-breakdown tr:last-child td {
    border-bottom: none;
}

.fee-breakdown tr:hover td {
    background-color: #f7fafc;
}

.legal-note {
    font-size: 0.85rem;
    color: #718096;
    margin-top: 2rem;
    padding: 1rem;
    background-color: #f7fafc;
    border-radius: 0.375rem;
    border-left: 3px solid var(--accent);
    width: 100%;
    box-sizing: border-box;
}

.footer {
    text-align: center;
    margin-top: 3rem;
    padding: 1.5rem;
    color: #718096;
    font-size: 0.9rem;
    border-top: 1px solid #e2e8f0;
    width: 100%;
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.badge-primary {
    background-color: var(--primary);
    color: white;
}

.badge-secondary {
    background-color: var(--secondary);
    color: white;
}

.badge-accent {
    background-color: var(--accent);
    color: var(--dark);
}

.back-link {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.8rem;
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.15);
    margin-bottom: 1.2rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(3px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.back-link:hover {
    background-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    color: white;
}

.back-link:active {
    transform: translateY(0);
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
}

.back-link i {
    margin-right: 0.5rem;
    font-size: 0.9em;
    transition: transform 0.2s ease;
}

.back-link:hover i {
    transform: translateX(-3px);
}

/* 添加过渡动画 */
.back-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: rgba(226, 185, 121, 0.1);
    transition: width 0.3s ease;
    z-index: -1;
}

.back-link:hover::after {
    width: 100%;
}

/* 优化移动端下的返回链接 */
@media (max-width: 768px) {
    .back-link {
        margin-bottom: 0.5rem;
        font-size: 0.85rem;
        padding: 0.35rem 0.6rem;
    }

    .back-link i {
        margin-right: 0.3rem;
        font-size: 0.85rem;
    }
}

/* 头部导航容器样式 */
.header-top-nav {
    position: relative;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

@media (max-width: 768px) {
    .header-top-nav {
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 480px) {
    .header-top-nav {
        margin-bottom: 0.3rem;
    }

    .back-link {
        margin-bottom: 0.4rem;
        font-size: 0.8rem;
        padding: 0.3rem 0.5rem;
    }

    .back-link i {
        margin-right: 0.25rem;
        font-size: 0.8rem;
    }

    .back-to-top {
        bottom: 15px;
        right: 15px;
        width: 35px;
        height: 35px;
    }

    .back-to-top i {
        font-size: 0.9rem;
    }

    .header h1 {
        font-size: 1.5rem;
    }

    .header p {
        font-size: 0.9rem;
    }

    .complex-case-options {
        flex-direction: column;
        gap: 10px;
    }

    #multiplierNote {
        margin-left: 0;
        margin-top: 5px;
    }

    .form-section,
    .result-section {
        padding: 1.25rem;
    }

    .result-value {
        font-size: 1.5rem;
    }

    .fee-breakdown th,
    .fee-breakdown td {
        padding: 0.5rem;
        font-size: 0.85rem;
    }
}

/* Additional styles for special inputs */
.input-group {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-group-text {
    position: absolute;
    right: 0.75rem;
    color: #718096;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    pointer-events: none;
}

/* 重大疑难复杂案件选项样式 */
.complex-case-options {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 8px;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
}

.form-check-custom {
    position: relative;
    padding-left: 0;
    flex: 0 0 auto;
}

.form-check-custom input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.form-check-custom label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 20px;
    font-size: 0.95rem;
    font-weight: normal;
    border-radius: 30px;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    background-color: #fff;
    color: #64748b;
    transition: all 0.2s ease;
    margin: 0;
    min-width: 80px;
}

.smaller-icon {
    font-size: 0.85rem;
    margin-right: 5px;
}

.form-check-custom input:checked+label {
    background-color: #fef9ef;
    border-color: #e2b979;
    color: #333;
}

.form-check-custom input[value="yes"]:checked+label {
    background-color: #fef9ef;
    border-color: #e2b979;
}

.form-check-custom input[value="yes"]:checked+label i {
    color: #e2b979;
}

.form-check-custom input[value="no"]:checked+label {
    background-color: #fef9ef;
    border-color: #e2b979;
    color: #333;
}

.form-check-custom input[value="no"]:checked+label i {
    color: #e2b979;
}

#multiplierNote {
    color: #64748b;
    font-size: 0.9rem;
    margin-left: auto;
    text-align: right;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .complex-case-options {
        gap: 10px;
    }

    .form-check-custom label {
        padding: 5px 15px;
        font-size: 0.9rem;
        min-width: 70px;
    }

    #multiplierNote {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .complex-case-options {
        display: flex;
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        gap: 10px;
        margin-bottom: 6px;
        width: 100%;
    }

    #multiplierNote {
        margin-left: auto;
        font-size: 0.8rem;
        text-align: right;
        flex: 0 0 auto;
    }

    .form-check-custom {
        flex: 0 0 auto;
    }
}

@media (max-width: 360px) {
    .complex-case-options {
        gap: 8px;
    }

    .form-check-custom label {
        padding: 3px 10px;
        font-size: 0.85rem;
        min-width: 60px;
    }
}

.tooltip-container {
    position: relative;
    display: inline-block;
    margin-left: 0.5rem;
    cursor: help;
}

.tooltip-icon {
    color: var(--secondary);
    opacity: 0.7;
}

.tooltip-content {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: white;
    padding: 1rem;
    border-radius: 0.375rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    width: 300px;
    z-index: 10;
    display: none;
}

.tooltip-container:hover .tooltip-content {
    display: block;
}

.formula-container {
    margin-top: 1rem;
}

.formula-item {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 0.375rem;
    background-color: #f7fafc;
    border-left: 3px solid #e2e8f0;
    transition: all 0.3s;
}

.formula-item.active {
    background-color: #ebf8ff;
    border-left: 3px solid var(--accent);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.formula-range {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.formula-calculation {
    color: var(--secondary);
    font-family: monospace;
    margin-top: 0.25rem;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.modal-content {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--primary);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1 1 auto;
    -webkit-overflow-scrolling: touch;
    /* Smooth scrolling on iOS */
    overscroll-behavior: contain;
    /* Prevent scroll chaining */
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background-color: #f1f5f9;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background-color: #94a3b8;
}

.modal-footer {
    padding: 1rem;
    border-top: 1px solid #e2e8f0;
    text-align: right;
    flex-shrink: 0;
    background-color: white;
}

.close-modal {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    font-size: 1rem;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    width: auto;
}

.close-modal:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

@media (max-width: 768px) {
    .modal-footer {
        text-align: center;
        padding: 1rem 1.5rem 1.5rem;
    }

    .close-modal {
        width: 80%;
        padding: 0.7rem 1rem;
        font-size: 1rem;
        margin: 0 auto;
    }
}

/* 错误消息样式 */
.error-message {
    color: var(--error);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    padding: 0.375rem 0.5rem;
    background-color: rgba(229, 62, 62, 0.1);
    border-left: 3px solid var(--error);
    border-radius: 0 0.25rem 0.25rem 0;
    animation: fadeIn 0.3s ease-in-out;
    width: 100%;
    box-sizing: border-box;
}

/* 回到顶部按钮样式 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    transition: all 0.3s ease;
    transform: translateY(100px);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: none;
}

.back-to-top i {
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

.back-to-top:hover {
    background: var(--secondary);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transform: translateY(0) scale(1.05);
}

.back-to-top:active {
    transform: translateY(0) scale(0.95);
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 移动端特殊优化 - 回到顶部按钮 */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }

    .back-to-top i {
        font-size: 1rem;
    }
}

/* 表格折叠样式 */
.toggle-btn {
    display: none;
    /* 默认在PC端隐藏 */
    align-items: center;
    background: linear-gradient(to right, var(--light), #f0f5fa);
    border: 1px solid #e2e8f0;
    color: var(--secondary);
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 0.7rem;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    height: 20px;
    width: auto;
    min-width: auto;
    flex: 0 0 auto;
    cursor: pointer;
}

.toggle-btn:hover {
    background: linear-gradient(to right, #f0f5fa, #e6edf5);
    color: var(--primary);
    border-color: #cbd5e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-btn:active {
    transform: translateY(1px);
}

.toggle-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 12px;
    height: 12px;
    background-color: var(--accent);
    color: var(--primary);
    border-radius: 50%;
    margin-right: 4px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.toggle-icon i {
    font-size: 8px;
}

.toggle-text {
    line-height: 1;
    font-size: 0.7rem;
    white-space: nowrap;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    width: 100%;
}

.table-header .result-title {
    margin: 0;
    margin-bottom: 0;
    flex: 1;
}

/* 确保在PC端表格总是展示 */
.table-content-collapse {
    display: block;
}

/* 切换图标旋转动画 */
.table-header .toggle-btn .toggle-icon i.fa-chevron-up {
    animation: rotate-up 0.3s forwards;
}

.table-header .toggle-btn .toggle-icon i.fa-chevron-down {
    animation: rotate-down 0.3s forwards;
}

@keyframes rotate-up {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(180deg);
    }
}

@keyframes rotate-down {
    from {
        transform: rotate(180deg);
    }

    to {
        transform: rotate(0deg);
    }
}

@media (max-width: 768px) {
    .toggle-btn {
        display: inline-flex;
        /* 在移动端显示 */
        padding: 2px 6px;
        height: 18px;
        font-size: 0.65rem;
    }

    .toggle-icon {
        width: 10px;
        height: 10px;
        margin-right: 3px;
    }

    .toggle-icon i {
        font-size: 7px;
    }

    .toggle-text {
        font-size: 0.65rem;
    }

    /* 移动端默认折叠表格内容 */
    .table-content-collapse {
        display: none;
    }

    .table-content-collapse.show {
        display: block;
        animation: fadeIn 0.3s ease-in-out;
    }
}

@media (max-width: 480px) {
    .toggle-btn {
        padding: 2px 6px;
        height: 18px;
        font-size: 0.65rem;
    }

    .toggle-icon {
        width: 10px;
        height: 10px;
        margin-right: 3px;
    }

    .toggle-icon i {
        font-size: 7px;
    }

    .toggle-text {
        font-size: 0.65rem;
    }
}

/* 城市选择器样式 */
.city-selector-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    overflow: hidden;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.city-selector-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 85vh;
    background-color: white;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slide-up 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slide-up {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.city-selector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0.8rem;
    border-bottom: 1px solid #f0f2f5;
    background: linear-gradient(to right, #f8fafc, #f1f5f9);
}

.city-selector-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    margin-left: 0.5rem;
    position: relative;
    flex: 1;
}

.city-selector-close {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    cursor: pointer;
    background: rgba(241, 245, 249, 0.8);
    border: none;
    border-radius: 50%;
    font-size: 1rem;
    transition: all 0.2s;
}

.city-selector-close:hover,
.city-selector-close:active {
    background: #e2e8f0;
    color: #334155;
}

.city-selector-clear {
    display: none;
}

@media (max-width: 360px) {
    .city-selector-header {
        padding: 0.8rem 0.6rem;
    }

    .city-selector-title {
        font-size: 1rem;
        margin-left: 0.3rem;
    }

    .city-selector-clear {
        padding: 0.25rem 0.6rem;
        font-size: 0.65rem;
        margin-right: 0.3rem;
    }

    .city-selector-close {
        width: 1.8rem;
        height: 1.8rem;
    }
}

.city-selector-search {
    padding: 0.75rem 1rem;
    background-color: #ffffff;
    border-bottom: 1px solid #f0f2f5;
}

.city-selector-search input {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.2rem;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    font-size: 0.95rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 0.7rem center;
    background-size: 0.9rem;
    background-color: #f8fafc;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease;
}

.city-selector-search input:focus {
    outline: none;
    border-color: var(--accent);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(226, 185, 121, 0.1);
}

.city-selector-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    background-color: #fff;
}

.city-selector-alphabet {
    width: 36px;
    background-color: #f8fafc;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 0;
    overflow-y: auto;
    box-shadow: 1px 0 3px rgba(0, 0, 0, 0.03);
}

.city-selector-alphabet a {
    padding: 0.35rem 0;
    font-size: 0.75rem;
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.15s ease;
}

.city-selector-alphabet a:hover {
    color: var(--primary);
    transform: scale(1.1);
}

.city-selector-alphabet a.active {
    color: var(--accent);
    font-weight: 700;
}

.city-selector-cities {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 1rem 2rem;
    -webkit-overflow-scrolling: touch;
}

.city-letter-group {
    margin-bottom: 1.2rem;
}

.city-letter {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 0.5rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background-color: #f1f5f9;
    display: inline-block;
}

.city-list {
    display: flex;
    flex-wrap: wrap;
    padding: 0.3rem 0;
}

.city-item {
    width: 33.33%;
    padding: 0.7rem 0;
    cursor: pointer;
    font-size: 0.95rem;
    color: #334155;
    position: relative;
    transition: all 0.1s ease-out;
    -webkit-tap-highlight-color: transparent;
    /* 移除默认触摸高亮 */
}

.city-item::after {
    content: '';
    position: absolute;
    bottom: 0.3rem;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: width 0.2s ease;
}

.city-item:hover,
.city-item:active {
    color: var(--primary);
    font-weight: 500;
    transform: translateY(-1px);
}

.city-item:hover::after,
.city-item:active::after {
    width: 70%;
}

.location-display {
    position: relative;
}

.location-value {
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    font-size: 1rem;
    width: 100%;
    background: #FFF !important;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    box-shadow: none;
    color: var(--dark);
}

.location-value:hover,
.location-value:active {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(226, 185, 121, 0.3);
}

.location-value::after {
    content: "";
    width: 10px;
    height: 10px;
    border-right: 2px solid #94a3b8;
    border-bottom: 2px solid #94a3b8;
    transform: rotate(45deg);
    display: inline-block;
    transition: transform 0.2s ease;
    margin-right: 5px;
}

/* 位置更新动画 */
.location-updated {
    animation: location-update-pulse 0.5s ease;
}

@keyframes location-update-pulse {
    0% {
        background-color: #fff;
    }

    50% {
        background-color: #f8fafc;
        border-color: var(--accent);
    }

    100% {
        background-color: #fff;
    }
}

/* 滚动条美化 */
.city-selector-cities::-webkit-scrollbar,
.city-selector-alphabet::-webkit-scrollbar {
    width: 4px;
}

.city-selector-cities::-webkit-scrollbar-track,
.city-selector-alphabet::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.city-selector-cities::-webkit-scrollbar-thumb,
.city-selector-alphabet::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 4px;
}

.city-selector-cities::-webkit-scrollbar-thumb:hover,
.city-selector-alphabet::-webkit-scrollbar-thumb:hover {
    background-color: #94a3b8;
}

/* 添加字母组导航高亮效果 */
.letter-highlight {
    animation: letter-pulse 0.8s ease;
}

@keyframes letter-pulse {
    0% {
        transform: scale(1);
        color: #64748b;
    }

    50% {
        transform: scale(1.3);
        color: var(--accent);
    }

    100% {
        transform: scale(1);
        color: #64748b;
    }
}

/* 城市项触摸和选中效果 */
.city-touch {
    color: var(--accent) !important;
    background-color: rgba(241, 245, 249, 0.8);
    transform: scale(0.98) !important;
}

.city-item.selected {
    color: var(--primary);
    font-weight: 500;
}

.city-item.selected::after {
    width: 70%;
    background-color: var(--accent);
}

/* 搜索无结果提示 */
.no-results-message {
    padding: 2rem 1rem;
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
}

.no-results-message i {
    display: block;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #94a3b8;
}

/* 城市选择器中关闭动画 */
@keyframes slide-down {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(100%);
    }
}

.city-selector-container.closing {
    animation: slide-down 0.15s cubic-bezier(0.4, 0, 1, 1) forwards;
}

/* 律师费说明样式优化 */
.fee-explanation {
    background-color: #f9f5eb;
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 10px;
    position: relative;
    border: 1px solid #f0e9d6;
}

.fee-explanation-title {
    display: flex;
    align-items: center;
    color: #846f44;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.fee-explanation-title i {
    margin-right: 8px;
    color: #e2b979;
}

.fee-explanation ul {
    padding-left: 24px;
    margin: 0;
}

.fee-explanation li {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 6px;
    position: relative;
}

.fee-explanation li::before {
    content: "•";
    position: absolute;
    left: -12px;
    color: #e2b979;
}

.fee-explanation li:last-child {
    margin-bottom: 0;
}

.fee-standard-link {
    color: #477bb9;
    cursor: pointer;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .fee-explanation {
        padding: 10px 14px;
        margin-top: 8px;
        border-radius: 6px;
    }

    .fee-explanation-title {
        font-size: 0.9rem;
    }

    .fee-explanation li {
        font-size: 0.8rem;
        margin-bottom: 4px;
    }
}

.is-invalid {
    border-color: var(--error) !important;
    background-color: rgba(229, 62, 62, 0.05) !important;
}

.highlight-field {
    animation: highlight-pulse 1.5s ease;
}

@keyframes highlight-pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(229, 62, 62, 0);
    }

    50% {
        box-shadow: 0 0 0 5px rgba(229, 62, 62, 0.3);
    }
}