/* Support Page - Apple Style Design */

/* CSS Variables for future Dark Mode support */
:root {
    --support-bg-color: #f5f5f7;
    --support-container-bg: #ffffff;
    --support-text-color: #1d1d1f;
    --support-text-secondary: #86868b;
    --support-border-color: #d2d2d7;
    --support-border-hover: #86868b;
    --support-primary: #0071e3;
    --support-primary-hover: #0077ed;
    --support-primary-active: #0066cc;
    --support-success: #34c759;
    --support-danger: #ff3b30;
    --support-shadow: rgba(0, 0, 0, 0.08);
    --support-shadow-hover: rgba(0, 113, 227, 0.3);
}

.support-page-wrapper {
    min-height: 100vh;
    background: var(--support-bg-color);
    padding: 80px 20px 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.support-container {
    max-width: 680px;
    width: 100%;
    background: var(--support-container-bg);
    border-radius: 18px;
    padding: 56px 48px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Header */
.support-header {
    text-align: center;
    margin-bottom: 48px;
}

.support-title {
    font-size: 2.25rem;
    font-weight: 600;
    color: var(--support-text-color);
    margin: 0 0 12px 0;
    letter-spacing: -0.02em;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.support-subtitle {
    font-size: 1.0625rem;
    color: var(--support-text-secondary);
    margin: 0;
    font-weight: 400;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Form */
.support-form {
    width: 100%;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 28px;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--support-text-color);
    margin-bottom: 8px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    color: var(--support-text-color);
    background: #ffffff;
    border: 1px solid var(--support-border-color);
    border-radius: 12px;
    transition: border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.form-control:hover {
    border-color: var(--support-border-hover);
}

.form-control:focus {
    outline: none;
    border-color: var(--support-primary);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
}

.form-control:disabled {
    background-color: var(--support-bg-color);
    cursor: not-allowed;
    opacity: 0.6;
    border-color: #e5e5e7;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* 联系方式组合输入 */
.contact-input-group {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.contact-channel-select {
    flex: 0 0 140px;
    min-width: 0;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%231d1d1f' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 36px;
}

.contact-value-input {
    flex: 1;
    min-width: 0;
}

.form-text {
    display: block;
    font-size: 0.75rem;
    color: var(--support-text-secondary);
    margin-top: 6px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 同意条款 */
.consent-group {
    margin-bottom: 36px;
}

.consent-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.consent-toggle input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
    pointer-events: none;
    z-index: -1;
}

.toggle-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--support-border-color);
    border-radius: 12px;
    margin-right: 12px;
    flex-shrink: 0;
    transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--support-container-bg);
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.consent-toggle input[type="checkbox"]:checked + .toggle-slider {
    background: var(--support-primary);
}

.consent-toggle input[type="checkbox"]:checked + .toggle-slider::before {
    transform: translateX(20px);
}

.consent-text {
    font-size: 0.875rem;
    color: var(--support-text-color);
    line-height: 1.5;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.consent-text strong {
    font-weight: 500;
}

.consent-text a {
    color: var(--support-primary);
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
}

.consent-text a:hover {
    color: var(--support-primary-hover);
    text-decoration: underline;
}

/* 提交按钮 */
.btn-submit {
    width: 100%;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 500;
    color: #ffffff;
    background: var(--support-primary);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.btn-submit:hover:not(:disabled) {
    background: var(--support-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--support-shadow-hover);
}

.btn-submit:active:not(:disabled) {
    transform: translateY(0);
    background: var(--support-primary-active);
}

.btn-submit:disabled {
    background: var(--support-border-color);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Toast 通知样式 */
.support-toast {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10000;
    min-width: 320px;
    max-width: 420px;
    background: var(--support-container-bg);
    border-radius: 18px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12), 0 1px 0 rgba(0, 0, 0, 0.05);
    padding: 20px 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    opacity: 0;
    transform: translateX(400px);
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.support-toast.show {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.support-toast-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 20px;
}

.support-toast.success .support-toast-icon {
    background: rgba(52, 199, 89, 0.1);
    color: var(--support-success);
}

.support-toast.danger .support-toast-icon {
    background: rgba(255, 59, 48, 0.1);
    color: var(--support-danger);
}

.support-toast-content {
    flex: 1;
    min-width: 0;
}

.support-toast-title {
    font-weight: 600;
    font-size: 15px;
    color: var(--support-text-color);
    margin-bottom: 4px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.support-toast-message {
    font-size: 14px;
    color: var(--support-text-secondary);
    line-height: 1.5;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.support-toast-close {
    background: none;
    border: none;
    color: var(--support-text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.2s;
}

.support-toast-close:hover {
    color: var(--support-text-color);
}

/* 响应式设计 */

/* 平板端 (768px - 991.98px) */
@media (max-width: 991.98px) and (min-width: 768px) {
    .support-page-wrapper {
        padding: 60px 24px 0 24px;
    }

    .support-container {
        max-width: 100%;
        padding: 48px 40px;
    }

    .support-title {
        font-size: 2rem;
    }

    .form-row {
        gap: 16px;
    }
}

/* 移动端 (≤767.98px) */
@media (max-width: 767.98px) {
    .support-page-wrapper {
        padding: 40px 16px;
    }

    .support-container {
        padding: 40px 28px;
        border-radius: 16px;
    }

    .support-header {
        margin-bottom: 36px;
    }

    .support-title {
        font-size: 1.875rem;
    }

    .support-subtitle {
        font-size: 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
        margin-bottom: 20px;
    }

    .form-group {
        margin-bottom: 24px;
    }

    .contact-input-group {
        flex-direction: column;
        gap: 12px;
    }

    .contact-channel-select {
        flex: 1;
        width: 100%;
    }

    .contact-value-input {
        flex: 1;
        width: 100%;
    }

    .consent-group {
        margin-bottom: 32px;
    }

    .support-toast {
        top: max(16px, env(safe-area-inset-top));
        right: 16px;
        left: 16px;
        min-width: auto;
        max-width: none;
        transform: translateY(-100px);
        transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .support-toast.show {
        transform: translateY(0);
    }
}

/* 小屏移动端 (≤575.98px) */
@media (max-width: 575.98px) {
    .support-page-wrapper {
        padding: 24px 12px;
    }

    .support-container {
        padding: 28px 16px;
        border-radius: 12px;
    }

    .support-header {
        margin-bottom: 28px;
    }

    .support-title {
        font-size: 1.5rem;
        line-height: 1.3;
    }

    .support-subtitle {
        font-size: 0.875rem;
    }

    .form-group {
        margin-bottom: 20px;
    }

    .form-label {
        font-size: 0.8125rem;
        margin-bottom: 6px;
    }

    .form-control {
        padding: 10px 14px;
        font-size: 0.9375rem;
        border-radius: 10px;
    }

    textarea.form-control {
        min-height: 100px;
    }

    .consent-group {
        margin-bottom: 24px;
    }

    .consent-text {
        font-size: 0.8125rem;
        line-height: 1.4;
    }

    .toggle-slider {
        width: 40px;
        height: 22px;
        margin-right: 10px;
    }

    .toggle-slider::before {
        width: 18px;
        height: 18px;
    }

    .consent-toggle input[type="checkbox"]:checked + .toggle-slider::before {
        transform: translateX(18px);
    }

    .btn-submit {
        padding: 12px 20px;
        font-size: 0.9375rem;
        border-radius: 10px;
    }

    .support-toast {
        top: max(12px, env(safe-area-inset-top));
        right: 12px;
        left: 12px;
        padding: 16px 20px;
        border-radius: 12px;
    }

    .support-toast-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .support-toast-title {
        font-size: 14px;
    }

    .support-toast-message {
        font-size: 13px;
    }
}

/* 超小屏设备 (≤375px) */
@media (max-width: 375px) {
    .support-page-wrapper {
        padding: 20px 8px;
    }

    .support-container {
        padding: 24px 14px;
    }

    .support-title {
        font-size: 1.375rem;
    }

    .form-control {
        padding: 10px 12px;
        font-size: 16px; /* 防止iOS自动缩放 */
    }
}
