/* iOS风格清新样式 */
:root {
    --primary-color: #007AFF;
    --primary-hover: #0056CC;
    --primary-light: #5AC8FA;
    --success-color: #34C759;
    --warning-color: #FF9500;
    --error-color: #FF3B30;
    --background-color: #F2F2F7;
    --background-secondary: #FFFFFF;
    --card-background: #FFFFFF;
    --card-background-hover: #F9F9F9;
    --text-primary: #000000;
    --text-secondary: #6D6D70;
    --text-muted: #8E8E93;
    --border-color: rgba(60, 60, 67, 0.12);
    --border-color-hover: rgba(60, 60, 67, 0.18);
    --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 8px 25px rgba(0, 0, 0, 0.15);
    --shadow-card: 0 2px 10px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
    --border-radius-small: 8px;
    --border-radius-large: 16px;
    --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --gradient-primary: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
    --gradient-secondary: linear-gradient(135deg, #00C7BE 0%, #007AFF 100%);
    --gradient-success: linear-gradient(135deg, #34C759 0%, #30D158 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    background: var(--background-color);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    overflow-x: hidden;
}

/* 背景装饰 */
.background-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.6;
    animation: float 6s ease-in-out infinite;
}

.orb-1 {
    width: 300px;
    height: 300px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.orb-2 {
    width: 200px;
    height: 200px;
    background: linear-gradient(45deg, #f093fb, #f5576c);
    top: 60%;
    right: 10%;
    animation-delay: 2s;
}

.orb-3 {
    width: 250px;
    height: 250px;
    background: linear-gradient(45deg, #4facfe, #00f2fe);
    bottom: 20%;
    left: 50%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(120deg); }
    66% { transform: translateY(10px) rotate(240deg); }
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* 头部样式 */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.app-logo {
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    border-radius: var(--border-radius-small);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: var(--shadow-card);
}

.app-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.switch-code-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-small);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.switch-code-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--border-color-hover);
    color: var(--text-primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

/* 头部激活状态样式 */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.activation-status {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--border-radius-small);
    backdrop-filter: blur(10px);
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--success-color);
    font-size: 0.9rem;
    font-weight: 600;
}

.activation-code {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.code-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.code-value {
    color: var(--text-primary);
    font-weight: 600;
    font-family: 'Monaco', 'Menlo', monospace;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    transition: var(--transition);
    font-size: 0.75rem;
}

.code-value:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--primary-color);
}

/* 头部配额状态样式 */
.header-quota-status {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: var(--border-radius-small);
    backdrop-filter: blur(10px);
}

.quota-summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
}

.quota-item-compact {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.quota-item-compact .label {
    color: var(--text-secondary);
    font-weight: 500;
}

.quota-item-compact .value {
    color: var(--text-primary);
    font-weight: 600;
}

.quota-refresh-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
}

.quota-refresh-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--border-color-hover);
    color: var(--text-primary);
    transform: rotate(180deg);
}

/* 切换激活码模态窗口样式 */
.switch-code-modal {
    max-width: 600px;
    width: 90vw;
}

/* 一键登录模态窗口样式 */
.one-click-login-modal {
    max-width: 500px;
    width: 90vw;
}

.one-click-login-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.error-warning {
    background: rgba(255, 59, 48, 0.1) !important;
    border-color: rgba(255, 59, 48, 0.3) !important;
}

.error-warning .warning-icon {
    color: var(--error-color) !important;
}

.error-warning .warning-text strong {
    color: var(--error-color) !important;
}

.login-methods h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
}

.login-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.login-method-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.login-method-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-small);
    cursor: pointer;
    transition: var(--transition);
    flex: 1;
}

.login-method-card:hover {
    background: var(--card-background-hover);
    border-color: var(--border-color-hover);
    transform: translateY(-1px);
}

.method-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.method-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    border-radius: var(--border-radius-small);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

/* ATM方法的特殊样式 */
.login-method-group:nth-child(3) .method-icon {
    background: var(--warning-color);
}

.method-info h5 {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
}

.method-info p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0;
}

/* 编辑器选择模态窗口样式 */
.editor-selection-modal {
    max-width: 600px;
    width: 90vw;
}

.editor-selection-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.editor-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.editor-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--card-background);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.editor-option:hover {
    background: var(--card-background-hover);
    border-color: var(--border-color-hover);
    transform: translateY(-2px);
}

.editor-option.selected {
    border-color: var(--primary-color);
    background: rgba(0, 122, 255, 0.05);
}

.editor-icon {
    width: 64px;
    height: 64px;
    background: var(--primary-color);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.editor-option.selected .editor-icon {
    background: var(--primary-hover);
}

.editor-info h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
}

.editor-info p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0 0 0.25rem 0;
}

.editor-info small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.login-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.login-actions .btn {
    flex: 1;
    max-width: 200px;
}

/* 验证码模态窗口样式 - 缩小尺寸 */
.verification-code-modal {
    max-width: 500px;
    width: 85vw;
}

.verification-code-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.code-section {
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
}

.code-section h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
}

.code-display {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(74, 222, 128, 0.1);
    border: 2px solid rgba(74, 222, 128, 0.3);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
}

.code-display:hover {
    background: rgba(74, 222, 128, 0.15);
    border-color: rgba(74, 222, 128, 0.5);
    transform: translateY(-2px);
}

.code-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--success-color);
    letter-spacing: 0.1em;
}

.time-warning {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: var(--border-radius);
    color: var(--warning-color);
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.time-warning svg {
    flex-shrink: 0;
    color: var(--warning-color);
}

/* 进度条模态框样式 */
.progress-modal {
    z-index: 6000; /* 高于所有其他模态框 */
}

.progress-modal-content {
    max-width: 400px;
    width: 90vw;
    text-align: center;
}

.progress-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.progress-spinner {
    position: relative;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.progress-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.progress-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

.progress-timer {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    margin: 1rem 0;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-small);
    border: 1px solid var(--border-color);
}

.progress-timer span:nth-child(2) {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--background-color);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 1rem;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 2px;
    animation: progressFill 30s linear infinite;
}

@keyframes progressFill {
    0% { width: 0%; }
    100% { width: 100%; }
}

.switch-code-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.current-status h4,
.new-code-section h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.status-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-small);
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-item label {
    font-weight: 500;
    color: var(--text-secondary);
}

.status-item span {
    font-weight: 600;
    color: var(--text-primary);
}

.status-active {
    color: var(--success-color) !important;
}

.switch-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.switch-actions .btn {
    flex: 1;
}

.warning-notice {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 149, 0, 0.1);
    border: 1px solid rgba(255, 149, 0, 0.3);
    border-radius: var(--border-radius-small);
}

.warning-icon {
    color: var(--warning-color);
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.warning-text {
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.warning-text strong {
    color: var(--warning-color);
}

/* 主要内容区域 */
.main-content {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

/* 卡片样式 */
.card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-card);
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    background: var(--card-background-hover);
    border-color: var(--border-color-hover);
    box-shadow: var(--shadow-medium);
    transform: translateY(-1px);
}

/* 激活卡片头部样式调整 */
.activation-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.activation-card .card-header .refresh-btn {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
}

.activation-card .card-header .refresh-btn:hover {
    background: var(--card-background-hover);
    border-color: var(--border-color-hover);
    color: var(--text-primary);
}

/* 配额信息样式 */
.quota-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.card-header {
    padding: 2rem 2rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.card-content {
    padding: 2rem;
}

/* 激活卡片特殊样式 */
.activation-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.3);
    position: relative;
}

.activation-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(99, 102, 241, 0.05) 50%, transparent 70%);
    transform: translateX(-100%);
    animation: shimmer 4s infinite;
}

.activation-card .card-header {
    align-items: flex-start;
    gap: 1rem;
}

.activation-icon {
    width: 56px;
    height: 56px;
    background: var(--gradient-primary);
    border-radius: var(--border-radius-small);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: var(--shadow-glow);
    flex-shrink: 0;
}

.activation-header-text h2 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.activation-header-text p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 500;
}

.activation-btn {
    background: var(--gradient-primary) !important;
    font-size: 1.2rem;
    padding: 1.25rem 2.5rem;
    box-shadow: var(--shadow-glow), var(--shadow-medium);
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.activation-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-heavy), 0 0 30px rgba(99, 102, 241, 0.5);
    filter: brightness(1.1);
}

.btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: inherit;
}

/* 状态卡片 */
.status-card {
    background: var(--gradient-primary);
    color: white;
    margin-bottom: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.status-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.status-content {
    display: flex;
    align-items: center;
    padding: 2.5rem;
    position: relative;
    z-index: 1;
}

.status-icon {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.status-text h3 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.status-text p {
    opacity: 0.9;
    font-size: 1.1rem;
    font-weight: 500;
}

/* 表单样式 */
.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-small);
    font-size: 1.1rem;
    font-weight: 500;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2), var(--shadow-glow);
    transform: translateY(-1px);
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--border-radius-small);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-glow);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy), var(--shadow-glow);
    filter: brightness(1.1);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--border-color-hover);
    transform: translateY(-1px);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    width: 100%;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* 超小按钮样式 */
.btn-small {
    padding: 0.5rem;
    font-size: 0.875rem;
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-small svg {
    width: 16px;
    height: 16px;
}

.refresh-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: var(--border-radius-small);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.refresh-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
}

/* 加载动画 */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 配额样式 */
.quota-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.quota-item {
    text-align: center;
    padding: 1rem;
    background: var(--background-color);
    border-radius: var(--border-radius-small);
}

.quota-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.quota-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.quota-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--background-color);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success-color), var(--primary-color));
    transition: var(--transition);
}

.progress-text {
    font-weight: 500;
    color: var(--text-secondary);
    min-width: 40px;
}

/* Token列表样式 */
.tokens-header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.tokens-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    border-radius: var(--border-radius-small);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: var(--shadow-card);
}

.tokens-header-text h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.tokens-header-text p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.tokens-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--border-radius-small);
    border: 1px solid var(--border-color);
}

.tokens-stats {
    display: flex;
    gap: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.tokens-list {
    max-height: 600px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.tokens-list::-webkit-scrollbar {
    width: 6px;
}

.tokens-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.tokens-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.tokens-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.token-item {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-small);
    margin-bottom: 1rem;
    transition: var(--transition);
    overflow: hidden;
}

.token-item:hover {
    background: var(--card-background-hover);
    border-color: var(--border-color-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-card);
}

.token-main {
    display: flex;
    align-items: center;
    padding: 1.25rem;
    gap: 1rem;
}

.token-info {
    flex: 1;
}

.token-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.token-email {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.token-email:hover {
    color: var(--primary-color);
}

.copy-icon {
    opacity: 0;
    transition: var(--transition);
}

.token-email:hover .copy-icon,
.detail-value:hover .copy-icon {
    opacity: 1;
}

.token-status {
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.token-status.active {
    background: rgba(52, 199, 89, 0.15);
    color: var(--success-color);
    border: 1px solid rgba(52, 199, 89, 0.3);
}

.token-status.inactive {
    background: rgba(255, 59, 48, 0.15);
    color: var(--error-color);
    border: 1px solid rgba(255, 59, 48, 0.3);
}

.token-summary {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.token-summary span {
    display: flex;
    align-items: center;
}

.token-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 文字按钮样式 */
.btn-text {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-small);
    background: var(--card-background);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-text:hover {
    background: var(--card-background-hover);
    border-color: var(--border-color-hover);
    transform: translateY(-1px);
}

.btn-text.btn-primary {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-text.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-text.btn-warning {
    background: var(--warning-color);
    color: white;
    border-color: var(--warning-color);
}

.btn-text.btn-warning:hover {
    background: #e6850e;
    border-color: #e6850e;
}

.btn-text.btn-secondary {
    background: var(--card-background);
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.btn-text.btn-secondary:hover {
    background: var(--card-background-hover);
    color: var(--text-primary);
    border-color: var(--border-color-hover);
}

.token-details {
    border-top: 1px solid var(--border-color);
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.detail-section {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-small);
    padding: 1.5rem;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.detail-item:last-child {
    margin-bottom: 0;
}

.detail-item label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-small);
    transition: var(--transition);
    word-break: break-all;
    min-height: 38px;
}

.detail-value:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-color-hover);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.ssl-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.ssl-enabled {
    color: var(--success-color);
}

.ssl-disabled {
    color: var(--error-color);
}

/* 模态窗口样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-heavy);
    max-width: 90vw;
    max-height: 90vh;
    width: 1000px;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: var(--transition);
}

.modal-overlay.show .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--background-tertiary);
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
}

.modal-close:hover {
    background: var(--card-background-hover);
    border-color: var(--border-color-hover);
    color: var(--text-primary);
    transform: rotate(90deg);
}

.modal-body {
    padding: 2rem;
    max-height: calc(90vh - 120px);
    overflow-y: auto;
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-icon {
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.empty-state p {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.empty-state small {
    font-size: 1rem;
    opacity: 0.8;
}

/* 通知样式 */
.notifications {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 10000; /* 确保在所有模态框之上 */
    max-width: 420px;
    pointer-events: none; /* 允许点击穿透到下层元素 */
}

.notification {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transform: translateX(120%);
    transition: var(--transition);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    pointer-events: auto; /* 恢复通知框本身的点击事件 */
}

.notification::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
}

.notification.show {
    transform: translateX(0);
}

.notification.success::before {
    background: var(--success-color);
}

.notification.error::before {
    background: var(--error-color);
}

.notification.warning::before {
    background: var(--warning-color);
}

.notification-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.notification.success .notification-icon {
    background: var(--success-color);
}

.notification.error .notification-icon {
    background: var(--error-color);
}

.notification.warning .notification-icon {
    background: var(--warning-color);
}

.notification.info .notification-icon {
    background: var(--primary-color);
}

.notification-content {
    flex: 1;
}

.notification-message {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 1rem;
    line-height: 1.5;
}

.notification-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: var(--transition);
    flex-shrink: 0;
}

.notification-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }

    .logo-section {
        justify-content: center;
    }

    .switch-code-btn span {
        display: none;
    }

    .header-actions {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }

    .activation-status {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.5rem;
        text-align: center;
    }

    .activation-code {
        font-size: 0.8rem;
    }

    .main-content {
        padding: 1rem;
    }

    .settings-panel {
        width: 100%;
        right: -100%;
    }

    .quota-stats {
        grid-template-columns: 1fr;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .tokens-header-content {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .header-actions {
        display: flex;
        gap: 0.5rem;
        width: 100%;
        justify-content: center;
    }

    .tokens-controls {
        padding: 1rem;
    }

    .tokens-stats {
        justify-content: space-around;
        gap: 1rem;
    }

    .token-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1rem;
    }

    .token-actions {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }

    .btn-text {
        width: 100%;
        text-align: center;
    }

    .token-info {
        width: 100%;
    }

    .token-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .token-summary {
        flex-direction: column;
        gap: 0.5rem;
    }

    .details-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .detail-section {
        padding: 1rem;
    }

    .section-title {
        font-size: 1rem;
    }

    .detail-value {
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    /* 头部响应式样式 */
    .header-actions {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }

    .activation-status,
    .header-quota-status {
        justify-content: center;
    }

    .quota-summary {
        gap: 1rem;
    }

    .quota-item-compact {
        font-size: 0.8rem;
    }

    .activation-card .card-header {
        flex-direction: column;
        text-align: center;
    }

    .activation-header-text {
        text-align: center;
    }

    .btn-large {
        font-size: 1rem;
        padding: 1rem 1.5rem;
    }

    .status-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .status-icon {
        margin-right: 0;
    }

    /* 模态窗口响应式 */
    .modal-content {
        width: 95vw;
        max-height: 95vh;
    }

    .modal-header {
        padding: 1rem;
    }

    .modal-header h3 {
        font-size: 1.25rem;
    }

    .modal-body {
        padding: 1rem;
    }

    /* 一键登录响应式样式 */
    .editor-options {
        grid-template-columns: 1fr;
    }

    .editor-option {
        flex-direction: row;
        text-align: left;
        padding: 1rem;
    }

    .editor-icon {
        width: 48px;
        height: 48px;
    }

    .login-actions {
        flex-direction: column;
    }

    .login-actions .btn {
        max-width: none;
    }

    /* 切换激活码模态窗口响应式 */
    .switch-actions {
        flex-direction: column;
    }

    .status-info {
        padding: 1rem;
    }

    .status-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* 隐藏类 */
.hidden {
    display: none !important;
}
