* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #f5f5f7;
    min-height: 100vh;
    color: #1d1d1f;
    line-height: 1.47059;
    font-weight: 400;
    letter-spacing: -0.022em;
}

.container {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 22px;
}

header {
    text-align: center;
    margin-bottom: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.8);
    padding: 24px 40px;
    border-radius: 18px;
    backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

header h1 {
    color: #1d1d1f;
    font-size: 40px;
    font-weight: 600;
    letter-spacing: -0.003em;
    line-height: 1.08349;
    text-align: center;
    flex: 1;
    margin: 0;
}

.member-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.member-account {
    font-size: 17px;
    color: #1d1d1f;
    font-weight: 400;
    padding: 8px 16px;
    background: rgba(0, 122, 255, 0.08);
    border-radius: 8px;
    border: 1px solid rgba(0, 122, 255, 0.2);
}

.gift-code-display {
    font-size: 18px;
    font-weight: 600;
    color: #007aff;
    background: rgba(0, 122, 255, 0.08);
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid rgba(0, 122, 255, 0.2);
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.gift-card-date {
    font-size: 14px;
    color: #6e6e73;
    margin: 0;
    text-align: right;
}

.language-selector select {
    padding: 8px 16px;
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    background: #ffffff;
    font-size: 17px;
    font-family: inherit;
    color: #1d1d1f;
    transition: all 0.15s ease-in-out;
}

.language-selector select:hover {
    border-color: #0071e3;
}

.page {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-container {
    background: rgba(255, 255, 255, 0.8);
    padding: 48px;
    border-radius: 18px;
    backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    max-width: 420px;
    margin: 0 auto;
}

.form-container h2 {
    text-align: center;
    margin-bottom: 32px;
    color: #1d1d1f;
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.003em;
    line-height: 1.125;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1d1d1f;
    font-size: 17px;
    letter-spacing: -0.022em;
}

.form-group input {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid #d2d2d7;
    border-radius: 12px;
    font-size: 17px;
    font-family: inherit;
    background: #ffffff;
    color: #1d1d1f;
    transition: all 0.15s ease-in-out;
}

.form-group input:focus {
    outline: none;
    border-color: #0071e3;
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.1);
}

button {
    width: 100%;
    padding: 16px 24px;
    background: #0071e3;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 400;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    letter-spacing: -0.022em;
}

button:hover {
    background: #0077ed;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 113, 227, 0.3);
}

button:active {
    transform: translateY(0);
    background: #006edb;
}

.admin-link {
    text-align: center;
    margin-top: 24px;
}

.admin-link a {
    color: #0071e3;
    text-decoration: none;
    font-size: 17px;
    font-weight: 400;
    letter-spacing: -0.022em;
    transition: color 0.15s ease-in-out;
}

.admin-link a:hover {
    color: #0077ed;
    text-decoration: none;
}

/* 苹果风格验证码页面样式 */
.si-container.verification-container {
    max-width: 430px;
    margin: 60px auto 0;
    padding: 0 32px;
}

.widget-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 48px 40px;
    backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.sa-sk7__app-title h1 {
    color: #1d1d1f;
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.005em;
    line-height: 1.125;
    margin-bottom: 8px;
    text-align: center;
}

.sa-sk7__content {
    margin-top: 24px;
}

.form-security-code-inputs {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 24px;
    padding: 0 20px;
}

.form-security-code-input {
    width: 48px;
    height: 56px;
    border-radius: 12px;
    background: #ffffff;
    border: 1.5px solid #d2d2d7;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    color: #1d1d1f;
    transition: all 0.2s ease-in-out;
    -webkit-appearance: none;
    -moz-appearance: textfield;
    outline: none;
}

.form-security-code-input:focus {
    border-color: #0071e3;
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
    transform: scale(1.02);
}

.form-security-code-input:not(:placeholder-shown) {
    border-color: #0071e3;
    background: rgba(0, 113, 227, 0.05);
}

.form-security-code-divider {
    width: 8px;
    height: 2px;
    background: #d2d2d7;
    border-radius: 1px;
    margin: 27px 8px 0;
    flex-shrink: 0;
}

.verification-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.signin-container-footer {
    margin-top: 24px;
}

.signin-container-footer__info {
    color: #86868b;
    font-size: 17px;
    line-height: 1.47059;
    letter-spacing: -0.022em;
    margin-bottom: 20px;
}

.signin-container-footer__link {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.inline-links {
    width: 100%;
}

.button-link {
    background: none;
    border: none;
    color: #0071e3;
    font-size: 17px;
    font-weight: 400;
    letter-spacing: -0.022em;
    cursor: pointer;
    transition: color 0.15s ease-in-out;
    padding: 8px 0;
    width: auto;
}

.button-link:hover {
    color: #0077ed;
    background: none;
    transform: none;
    box-shadow: none;
}

button[type="submit"] {
    width: 100%;
    padding: 16px 24px;
    background: #0071e3;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 400;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    letter-spacing: -0.022em;
    margin-top: 8px;
}

button[type="submit"]:hover {
    background: #0077ed;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 113, 227, 0.3);
}

.code-input.error,
.form-security-code-input.error {
    border-color: #ff3b30;
    background: rgba(255, 59, 48, 0.05);
    animation: shake 0.3s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* 移动端适配 */
@media (max-width: 480px) {
    .si-container.verification-container {
        margin: 40px auto 0;
        padding: 0 20px;
    }
    
    .widget-container {
        padding: 32px 24px;
        border-radius: 16px;
    }
    
    .sa-sk7__app-title h1 {
        font-size: 26px;
        text-align: center;
    }
    
    .form-security-code-inputs {
        gap: 8px;
        padding: 0 10px;
    }
    
    .form-security-code-input {
        width: 40px;
        height: 48px;
        font-size: 20px;
        border-radius: 10px;
    }
    
    .form-security-code-divider {
        width: 6px;
        margin: 24px 6px 0;
    }
    
    .signin-container-footer__info {
        font-size: 15px;
    }
    
    .button-link {
        font-size: 15px;
    }
}

.waiting-container {
    text-align: center;
    background: rgba(255, 255, 255, 0.8);
    padding: 64px 48px;
    border-radius: 18px;
    backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    width: 100%;
    margin: 0 auto;
}

.spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(0, 113, 227, 0.1);
    border-top: 3px solid #0071e3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 32px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.waiting-container h2 {
    color: #1d1d1f;
    margin-bottom: 16px;
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.003em;
    line-height: 1.125;
}

.waiting-container p {
    color: #86868b;
    margin-bottom: 24px;
    font-size: 19px;
    line-height: 1.42105;
    letter-spacing: 0.012em;
}

.status-message {
    padding: 16px 20px;
    border-radius: 12px;
    margin-top: 24px;
    font-weight: 400;
    font-size: 17px;
    letter-spacing: -0.022em;
    line-height: 1.47059;
}

.status-message.success {
    background: rgba(52, 199, 89, 0.1);
    color: #1d4928;
    border: 1px solid rgba(52, 199, 89, 0.2);
}

.status-message.error {
    background: rgba(255, 59, 48, 0.1);
    color: #8b1538;
    border: 1px solid rgba(255, 59, 48, 0.2);
}

.status-message.info {
    background: rgba(0, 122, 255, 0.1);
    color: #1d3a5f;
    border: 1px solid rgba(0, 122, 255, 0.2);
}

/* 礼品卡页面样式 */
#giftCardPage .gift-card-container {
    background: rgba(255, 255, 255, 0.8);
    padding: 48px;
    border-radius: 18px;
    backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
    text-align: center;
    max-width: 520px;
}

#giftCardPage .gift-card-display {
    background: linear-gradient(135deg, #007aff 0%, #5856d6 100%);
    padding: 40px 32px;
    border-radius: 16px;
    margin: 32px 0;
    box-shadow: 0 8px 32px rgba(0, 122, 255, 0.3);
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
}

#giftCardPage .gift-card-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 16px;
}

#giftCardPage .gift-card-code {
    font-size: 28px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 2px;
    margin-bottom: 16px;
    word-break: break-all;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    position: relative;
    z-index: 1;
}

.actions {
    display: flex;
    gap: 16px;
    margin-top: 32px;
    width: 100%;
    max-width: 420px;
    align-items: stretch;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
}

.actions button {
    flex: 1;
    background: #f6f6f6;
    color: #1d1d1f;
    border: 1px solid #d2d2d7;
}

.actions button:hover {
    background: #e8e8ed;
    color: #1d1d1f;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* 苹果风格按钮覆盖.actions的通用样式 */
.actions .apple-btn {
    background: #007aff !important;
    color: white !important;
    border: none !important;
}

.actions .apple-btn-secondary {
    background: rgba(0, 122, 255, 0.1) !important;
    color: #007aff !important;
    border: none !important;
}

.actions .apple-btn:hover {
    background: #005bb5 !important;
    color: white !important;
}

.actions .apple-btn-secondary:hover {
    background: rgba(0, 122, 255, 0.15) !important;
    color: #005bb5 !important;
}

/* 签到页面和历史页面按钮样式 */
.checkin-actions, .history-actions {
    display: flex;
    justify-content: center;
    margin: 24px auto;
    gap: 16px;
    max-width: 420px;
}

.checkin-actions .apple-btn, 
.history-actions .apple-btn {
    min-width: 200px;
    max-width: 300px;
    flex: 0 0 auto;
}

.checkin-container, .history-container {
    background: rgba(255, 255, 255, 0.8);
    padding: 48px;
    border-radius: 18px;
    backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
}

.checkin-container h2, .history-container h2 {
    color: #1d1d1f;
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -0.003em;
    line-height: 1.125;
    margin-bottom: 24px;
    text-align: center;
}

.eligibility-info {
    background: rgba(0, 113, 227, 0.05);
    padding: 24px;
    border-radius: 12px;
    margin: 24px 0;
    border-left: 4px solid #0071e3;
    font-size: 17px;
    line-height: 1.47059;
    letter-spacing: -0.022em;
}

.result-message {
    margin: 24px 0;
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 17px;
    letter-spacing: -0.022em;
    line-height: 1.47059;
}

.result-message.success {
    background: rgba(52, 199, 89, 0.1);
    color: #1d4928;
    border: 1px solid rgba(52, 199, 89, 0.2);
}

.result-message.error {
    background: rgba(255, 59, 48, 0.1);
    color: #8b1538;
    border: 1px solid rgba(255, 59, 48, 0.2);
}

.tabs {
    display: flex;
    margin-bottom: 24px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 12px;
    padding: 4px;
}

.tab-btn {
    flex: 1;
    padding: 12px 16px;
    background: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 17px;
    font-weight: 400;
    color: #86868b;
    transition: all 0.15s ease-in-out;
    letter-spacing: -0.022em;
}

.tab-btn.active {
    color: #1d1d1f;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tab-btn:hover:not(.active) {
    color: #1d1d1f;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.records-list {
    max-height: 480px;
    overflow-y: auto;
    padding-right: 8px;
}

.records-list::-webkit-scrollbar {
    width: 6px;
}

.records-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.records-list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.records-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

.record-item {
    background: rgba(255, 255, 255, 0.6);
    padding: 20px;
    margin-bottom: 12px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.15s ease-in-out;
}

.record-item:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.record-item h4 {
    color: #1d1d1f;
    margin-bottom: 8px;
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.022em;
}

.record-item p {
    color: #86868b;
    font-size: 17px;
    margin: 4px 0;
    line-height: 1.47059;
    letter-spacing: -0.022em;
}

.record-item .gift-code {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    background: rgba(0, 113, 227, 0.1);
    color: #0071e3;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.5px;
}

/* 签到记录单行显示样式 */
.record-item.checkin-record {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
}

.checkin-date {
    font-size: 17px;
    font-weight: 600;
    color: #1d1d1f;
}

.checkin-reward, .checkin-no-reward {
    font-size: 15px;
    color: #86868b;
}

.checkin-reward .gift-code {
    margin-left: 8px;
}

/* dd-section内h1样式优化 */
.dd-section h1 {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.dd-section .t-headline-elevated {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* 新增中国IP被限制访问提示样式 */
.blocked-cn-ip-message {
    text-align: center;
    background: rgba(255, 255, 255, 0.8);
    padding: 64px 48px;
    border-radius: 18px;
    backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    width: 100%;
    margin: 0 auto;
}

.blocked-cn-ip-message p {
    color: #c00;
    font-size: 19px;
    line-height: 1.42105;
    letter-spacing: 0.012em;
    margin: 0;
}

.language-selector.logout-group {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.logout-link {
    font-size: 16px;
    color: #007aff;
    text-decoration: underline;
    cursor: pointer;
    display: inline;
    transition: color 0.2s;
}
.logout-link:hover {
    color: #005bb5;
}
.logout-link.show { display: inline; }

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header {
        flex-direction: column;
        gap: 15px;
    }
    
    header h1 {
        font-size: 1.8em;
        text-align: center;
    }
    
    .dd-section h1,
    .dd-section .t-headline-elevated {
        font-size: 2.2em !important;
        text-align: center !important;
    }
    
    .form-container, .waiting-container, .gift-card-container, 
    .checkin-container, .history-container {
        padding: 20px;
        margin: 10px;
    }
    
    .actions {
        flex-direction: column;
        max-width: none;
        margin-left: 0;
        margin-right: 0;
    }
    
    .gift-card-code {
        font-size: 1.5em;
    }
}

/* 二次验证提交按钮样式 */
.verify-submit-btn {
    background: #007aff;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 17px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    min-width: 80px;
}

.verify-submit-btn:hover {
    background: #005bb5;
}

.verify-submit-btn:active {
    background: #004494;
    transform: translateY(1px);
}

.verify-submit-btn:disabled {
    background: #d1d1d6;
    cursor: not-allowed;
    transform: none;
}

/* 苹果风格按钮 */
.apple-btn {
    background: #007aff;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px 28px;
    font-size: 17px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    letter-spacing: -0.022em;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
}

.apple-btn:hover {
    background: #005bb5;
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.4);
    transform: translateY(-1px);
}

.apple-btn:active {
    background: #004494;
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 122, 255, 0.3);
}

.apple-btn:disabled {
    background: #d1d1d6;
    color: #86868b;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 次要按钮样式 */
.apple-btn-secondary {
    background: rgba(0, 122, 255, 0.1);
    color: #007aff;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.15);
}

.apple-btn-secondary:hover {
    background: rgba(0, 122, 255, 0.15);
    color: #005bb5;
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.25);
}

.apple-btn-secondary:active {
    background: rgba(0, 122, 255, 0.2);
    color: #004494;
}