/* 低额度提醒横幅 */
.low-quota-banner {
    display: none;
    position: fixed;
    top: 82px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--warning);
    color: white;
    padding: 10px 20px;
    border-radius: 980px;
    box-shadow: var(--shadow-md);
    z-index: 1000;
    font-size: 0.9rem;
    font-weight: 500;
    align-items: center;
    gap: 12px;
    animation: slideDown 0.3s ease-out;
}

.low-quota-banner.show {
    display: flex;
}

.low-quota-banner.critical {
    background: var(--error);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.low-quota-banner svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.low-quota-banner .banner-text {
    flex: 1;
    height: 100%;
}

.low-quota-banner .recharge-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.low-quota-banner .recharge-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.02);
}

.low-quota-banner .close-banner {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.low-quota-banner .close-banner:hover {
    color: white;
}

.low-quota-banner .close-banner svg {
    width: 16px;
    height: 16px;
}

/* 加油包/充值弹窗样式 */
.recharge-modal .modal-content {
    max-width: 550px;
}

.recharge-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 20px;
}

@media (max-width: 480px) {
    .recharge-options {
        grid-template-columns: 1fr;
    }
}

.recharge-option {
    position: relative;
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.recharge-option:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.recharge-option.selected {
    border-color: var(--primary);
    background: rgba(0, 113, 227, 0.1);
}

.recharge-option .popular-tag {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
}

.recharge-option .amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
    margin-top: 4px;
}

.recharge-option .bonus {
    font-size: 0.75rem;
    color: var(--success);
    font-weight: 500;
}

.recharge-option .price {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 8px;
    font-weight: 600;
}

.recharge-summary {
    background: var(--bg-gradient-start);
    padding: 16px 20px;
    border-top: 1px solid var(--border);
}

.recharge-summary .summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.recharge-summary .summary-row.total {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    padding-top: 8px;
    border-top: 1px solid var(--border);
    margin-top: 8px;
}

.recharge-btn-confirm {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 12px;
    transition: all 0.2s ease;
}

.recharge-btn-confirm:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.4);
}

.recharge-btn-confirm:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 法律页面模态框样式 */
.legal-modal .modal-content {
    max-width: 800px;
    max-height: 85vh;
}

.legal-modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
}

.legal-modal-content .modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    background: var(--card-bg);
    border-radius: 50%;
    padding: 8px;
    box-shadow: var(--shadow-sm);
}

.legal-modal-body {
    padding: 48px 40px 40px;
    overflow-y: auto;
    max-height: calc(85vh - 20px);
}

.legal-modal-body h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    text-align: center;
}

.legal-modal-body .legal-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 32px;
}

.legal-modal-body h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 32px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.legal-modal-body h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 20px;
    margin-bottom: 12px;
}

.legal-modal-body p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.legal-modal-body ul, .legal-modal-body ol {
    padding-left: 20px;
    margin-bottom: 16px;
}

.legal-modal-body li {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.legal-modal-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 13px;
}

.legal-modal-body table th,
.legal-modal-body table td {
    padding: 10px 12px;
    text-align: left;
    border: 1px solid var(--border);
}

.legal-modal-body table th {
    background: var(--input-bg);
    font-weight: 600;
    color: var(--text-primary);
}

.legal-modal-body table td {
    color: var(--text-secondary);
}

.legal-modal-body .legal-section {
    margin-bottom: 24px;
}

.legal-modal-body .legal-important {
    background: rgba(0, 113, 227, 0.08);
    border-left: 4px solid var(--primary);
    padding: 16px;
    border-radius: 0 8px 8px 0;
    margin: 16px 0;
}

.legal-modal-body .legal-important p {
    margin-bottom: 0;
    color: var(--text-primary);
}

.legal-modal-body .contact-info {
    background: var(--input-bg);
    border-radius: 12px;
    padding: 24px;
    margin-top: 24px;
}

.legal-modal-body .contact-info h3 {
    margin-top: 0;
}

.legal-modal-body .contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.legal-modal-body .contact-item:last-child {
    margin-bottom: 0;
}

.legal-modal-body .contact-label {
    font-weight: 500;
    color: var(--text-primary);
    min-width: 80px;
}

.legal-modal-body .contact-value {
    color: var(--primary);
}

.legal-modal-body a {
    color: var(--primary);
    text-decoration: none;
}

.legal-modal-body a:hover {
    text-decoration: underline;
}

/* 会员定价页面样式 */
.pricing-modal .modal-content {
    max-width: 1100px;
}

.pricing-header {
    text-align: center;
    padding: 32px 28px 24px;
    background: var(--input-bg);
    border-bottom: 1px solid var(--border);
}

.pricing-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.pricing-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    padding: 24px;
}

@media (max-width: 768px) {
    .pricing-grid {
        grid-template-columns: 1fr;
    }
}

.pricing-card {
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 24px 20px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.pricing-card.popular {
    border-color: var(--primary);
    background: rgba(0, 113, 227, 0.05);
}

.pricing-card.popular::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
}

.pricing-card.current {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.05);
}

.pricing-badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 12px;
}

.pricing-badge.popular {
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}

.pricing-badge.current {
    background: var(--success);
    color: white;
}

.pricing-badge.premium {
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.pricing-badge.placeholder {
    visibility: hidden;
}

.pricing-card.premium {
    border-color: #f59e0b;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(217, 119, 6, 0.05) 100%);
}

.pricing-card.premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
}

/* Ultra 会员样式 */
.pricing-badge.ultra {
    background: linear-gradient(90deg, #7c3aed 0%, #a855f7 100%);
    color: white;
}

.pricing-card.ultra {
    border-color: #7c3aed;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.08) 0%, rgba(168, 85, 247, 0.05) 100%);
}

.pricing-card.ultra::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #7c3aed 0%, #a855f7 100%);
}

.pricing-btn.ultra {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    color: white;
}

.pricing-btn.ultra:hover {
    background: linear-gradient(135deg, #6d28d9 0%, #9333ea 100%);
    transform: translateY(-1px);
}

.pricing-tier {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.pricing-price {
    margin-bottom: 20px;
}

.pricing-price .amount {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.pricing-price .currency {
    font-size: 1rem;
    color: var(--text-secondary);
}

.pricing-price .period {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.pricing-features {
    text-align: left;
    margin-bottom: 20px;
}

.pricing-feature {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

.pricing-feature:last-child {
    border-bottom: none;
}

.pricing-feature svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    color: var(--success);
    margin-top: 2px;
}

.pricing-feature.highlight {
    color: var(--text-primary);
    font-weight: 500;
}

.pricing-btn {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pricing-btn.primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.pricing-btn.primary:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.4);
}

.pricing-btn.secondary {
    background: var(--bg-gradient-start);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.pricing-btn.secondary:hover {
    background: var(--border);
}

.pricing-btn.current {
    background: var(--success);
    color: white;
    cursor: default;
}

.pricing-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.pricing-btn.premium {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.pricing-btn.premium:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.membership-info-card {
    background: rgba(0, 113, 227, 0.06);
    border: none;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.membership-info-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.membership-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.membership-icon.free {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
}

.membership-icon.pro {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.membership-icon.max {
    background: linear-gradient(135deg, var(--secondary) 0%, #db2777 100%);
}

.membership-details h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.membership-details span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.membership-upgrade-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.membership-upgrade-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.3);
}

/* 设置弹窗样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 560px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 1px solid var(--border);
    background: var(--card-bg);
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px 28px;
    overflow-y: auto;
    max-height: calc(90vh - 160px);
}

.settings-section {
    margin-bottom: 28px;
}

.settings-section:last-of-type {
    margin-bottom: 16px;
}

.settings-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.settings-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.settings-icon.summary-icon {
    background: var(--primary);
}

.settings-icon.transcribe-icon {
    background: var(--secondary);
}

.settings-field {
    margin-bottom: 16px;
}

.settings-field:last-child {
    margin-bottom: 0;
}

.settings-field label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.settings-field input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    color: var(--text-primary);
    background: rgba(248, 250, 252, 0.8);
    transition: all 0.2s ease;
}

/* Flex 容器内的输入框 */
.email-input-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.email-input-row input {
    width: auto !important;
    min-width: 0 !important;
    flex: 1 !important;
}

.email-input-row .btn {
    width: auto !important;
    white-space: nowrap;
    padding: 8px 16px !important;
    flex-shrink: 0;
}

.settings-field input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

.settings-field input::placeholder {
    color: var(--text-muted);
}

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    padding-right: 48px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.toggle-password:hover {
    color: var(--primary);
    background: rgba(0, 113, 227, 0.1);
}

.settings-hint {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(0, 113, 227, 0.06);
    border-radius: 10px;
    font-size: 14px;
    color: var(--text-secondary);
}

.settings-hint svg {
    flex-shrink: 0;
    color: var(--primary);
    margin-top: 2px;
}

/* 翻译弹窗样式 */
.language-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.language-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 8px;
    border: 2px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    text-align: center;
}

.language-option:hover {
    border-color: var(--primary-light);
    background: rgba(0, 113, 227, 0.05);
}

.language-option input {
    display: none;
}

.language-option:has(input:checked) {
    border-color: var(--primary);
    background: rgba(0, 113, 227, 0.1);
    color: var(--primary);
    font-weight: 600;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 15px;
}

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

.field-hint {
    font-size: 13px;
    color: var(--text-muted);
    margin: 6px 0 0 30px;
}

.translate-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    color: var(--text-secondary);
}

.progress-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 28px;
    border-top: 1px solid var(--border);
    background: rgba(248, 250, 252, 0.5);
}

.modal-btn {
    width: auto;
    padding: 12px 24px;
}
