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

/* 主题变量 - 明亮主题 */
:root {
    --bg-gradient-start: #f0f2f5;
    --bg-gradient-end: #e4e8ed;
    --bg-primary: #f0f2f5;
    --bg-secondary: #fafafa;
    --bg-tertiary: #f0f0f0;
    --bg-hover: #e8eaed;
    --text-primary: #374151;
    --text-secondary: #6b7280;
    --text-muted: #718096;
    --text-placeholder: #a0aec0;
    --border-color: #e2e8f0;
    --input-border: #e0e0e0;
    --shadow-color: rgba(0,0,0,0.08);
    --shadow-hover: rgba(0,0,0,0.12);
    --modal-bg: rgba(0,0,0,0.6);
    --toast-bg: #fafafa;
    --toast-shadow: rgba(0,0,0,0.15);
    --switch-bg: #cbd5e0;
    --spinner-bg: #f3f3f3;
}

/* 暗色主题 - 柔和护眼配色 */
[data-theme="dark"] {
    --bg-gradient-start: #1a1a1a;
    --bg-gradient-end: #242424;
    --bg-primary: #1a1a1a;
    --bg-secondary: #242424;
    --bg-tertiary: #303030;
    --bg-hover: #383838;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --text-muted: #808080;
    --text-placeholder: #6b6b6b;
    --border-color: #3d3d3d;
    --input-border: #4a4a4a;
    --shadow-color: rgba(0,0,0,0.5);
    --shadow-hover: rgba(0,0,0,0.7);
    --modal-bg: rgba(0,0,0,0.8);
    --toast-bg: #303030;
    --toast-shadow: rgba(0,0,0,0.6);
    --switch-bg: #4a4a4a;
    --spinner-bg: #3d3d3d;
    /* 语义色 - 降低饱和度 */
    --badge-success-bg: rgba(74,222,128,0.16);
    --badge-success-color: #4ade80;
    --badge-danger-bg: rgba(248,113,113,0.16);
    --badge-danger-color: #f87171;
    --badge-info-bg: rgba(125,211,252,0.16);
    --badge-info-color: #7dd3fc;
    --link-color: #60a5fa;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    min-height: 100vh;
    transition: background 0.3s ease;
}
        
        /* Login Styles */
        .login-container { 
            display: flex; 
            justify-content: center; 
            align-items: center; 
            min-height: 100vh; 
            padding: 20px;
        }
        .login-box {
            background: var(--bg-secondary);
            padding: 40px;
            border-radius: 15px;
            box-shadow: 0 20px 60px var(--shadow-color);
            width: 100%;
            max-width: 400px;
            transition: background 0.3s ease, box-shadow 0.3s ease;
        }
        .login-box h2 {
            margin-bottom: 30px;
            color: var(--text-primary);
            text-align: center;
            font-size: 24px;
        }
        
        /* Form Styles */
        .form-group {
            margin-bottom: 20px;
        }
        .form-group label {
            display: block;
            margin-bottom: 8px;
            color: var(--text-secondary);
            font-weight: 500;
        }
        .form-group input, .form-group textarea, .form-group select {
            width: 100%;
            padding: 12px;
            border: 2px solid var(--input-border);
            border-radius: 8px;
            font-size: 14px;
            transition: all 0.3s;
            background: var(--bg-secondary);
            color: var(--text-primary);
        }
        .form-group input:focus, .form-group textarea:focus, .form-group select:focus {
            border-color: #667eea;
            outline: none;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
        }
        [data-theme="dark"] .form-group input:focus,
        [data-theme="dark"] .form-group textarea:focus,
        [data-theme="dark"] .form-group select:focus {
            border-color: #0a84ff;
            box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.25);
        }
        .form-group input::placeholder, .form-group textarea::placeholder {
            color: var(--text-placeholder);
        }
        
        .form-group-inline {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .form-group-inline input[type="checkbox"] {
            width: auto;
            margin: 0;
        }
        
        /* Notification Settings Styles */
        .notification-channel {
            background: var(--bg-tertiary);
            padding: 20px;
            border-radius: 10px;
            margin-bottom: 20px;
            transition: background 0.3s ease;
        }

        .notification-channel h4 {
            color: var(--text-primary);
            margin-bottom: 15px;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .channel-toggle {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 15px;
        }
        .channel-toggle label {
            color: var(--text-secondary);
        }
        
        /* Button Styles */
        .btn {
            padding: 12px 24px;
            background: linear-gradient(135deg, #6366f1, #8b5cf6);
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 600;
            transition: all 0.3s;
            display: inline-block;
            text-align: center;
        }
        .btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4);
        }
        .btn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }
        .btn-full { width: 100%; }
        .btn-sm { 
            padding: 8px 16px; 
            font-size: 13px; 
        }
        .btn-danger { 
            background: linear-gradient(135deg, #f56565, #e53e3e); 
        }
        .btn-danger:hover { 
            box-shadow: 0 5px 15px rgba(245, 101, 101, 0.4);
        }
        .btn-success {
            background: linear-gradient(135deg, #48bb78, #38a169);
        }
        .btn-success:hover {
            box-shadow: 0 5px 15px rgba(72, 187, 120, 0.4);
        }
        .btn-info {
            background: linear-gradient(135deg, #4299e1, #3182ce);
        }
        .btn-info:hover {
            box-shadow: 0 5px 15px rgba(66, 153, 225, 0.4);
        }
        .btn-warning {
            background: linear-gradient(135deg, #ed8936, #dd6b20);
        }
        .btn-warning:hover {
            box-shadow: 0 5px 15px rgba(237, 137, 54, 0.4);
        }
        .btn-secondary {
            background: var(--bg-tertiary);
            color: var(--text-primary);
            border: 1px solid var(--border-color);
        }
        .btn-secondary:hover {
            background: var(--bg-hover);
            box-shadow: 0 2px 8px var(--shadow-color);
        }
        /* 暗黑模式按钮优化 - 柔和配色 */
        [data-theme="dark"] .btn {
            background: #3b82f6;
            color: #f0f0f0;
        }
        [data-theme="dark"] .btn:hover {
            box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4);
        }
        [data-theme="dark"] .btn-danger {
            background: #ef4444;
        }
        [data-theme="dark"] .btn-danger:hover {
            box-shadow: 0 5px 15px rgba(239, 68, 68, 0.4);
        }
        [data-theme="dark"] .btn-success {
            background: #22c55e;
        }
        [data-theme="dark"] .btn-success:hover {
            box-shadow: 0 5px 15px rgba(34, 197, 94, 0.4);
        }
        [data-theme="dark"] .btn-info {
            background: #38bdf8;
        }
        [data-theme="dark"] .btn-info:hover {
            box-shadow: 0 5px 15px rgba(56, 189, 248, 0.4);
        }
        [data-theme="dark"] .btn-warning {
            background: #f59e0b;
        }
        [data-theme="dark"] .btn-warning:hover {
            box-shadow: 0 5px 15px rgba(245, 158, 11, 0.4);
        }
        [data-theme="dark"] .btn-secondary {
            background: transparent;
            color: var(--text-primary);
            border: 1px solid var(--border-color);
        }
        [data-theme="dark"] .btn-secondary:hover {
            background: var(--bg-hover);
            box-shadow: 0 2px 8px var(--shadow-color);
        }

        /* Dashboard Styles */
        .dashboard {
            display: none;
            padding: 20px;
            background: var(--bg-primary);
            min-height: 100vh;
            transition: background 0.3s ease;
        }
        .container {
            max-width: 1200px;
            margin: 0 auto;
        }
        .header {
            background: var(--bg-secondary);
            padding: 20px 30px;
            border-radius: 15px;
            margin-bottom: 30px;
            box-shadow: 0 2px 10px var(--shadow-color);
            transition: background 0.3s ease, box-shadow 0.3s ease;
        }
        .header-content {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 15px;
        }
        .header h1 {
            color: var(--text-primary);
            font-size: 24px;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .header-actions {
            display: flex;
            gap: 10px;
            align-items: center;
        }
        
        /* Stats Grid */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }
        .stat-card {
            background: var(--bg-secondary);
            padding: 25px;
            border-radius: 15px;
            box-shadow: 0 2px 10px var(--shadow-color);
            transition: all 0.3s;
        }
        .stat-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 5px 20px var(--shadow-hover);
        }
        .stat-card h3 {
            color: var(--text-muted);
            font-size: 14px;
            margin-bottom: 12px;
            font-weight: 500;
        }
        .stat-card .value {
            font-size: 32px;
            font-weight: bold;
            color: var(--text-primary);
        }
        /* 统计卡片不同颜色 */
        .stat-card .value-default {
            background: linear-gradient(135deg, #667eea, #764ba2);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        .stat-card .value-info {
            background: linear-gradient(135deg, #4299e1, #3182ce);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        .stat-card .value-success {
            background: linear-gradient(135deg, #48bb78, #38a169);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        .stat-card .value-warning {
            background: linear-gradient(135deg, #ed8936, #dd6b20);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        [data-theme="dark"] .stat-card .value-default {
            color: #0a84ff;
            background: none;
            -webkit-background-clip: unset;
            -webkit-text-fill-color: unset;
            background-clip: unset;
        }
        [data-theme="dark"] .stat-card .value-info {
            color: #64d2ff;
            background: none;
            -webkit-background-clip: unset;
            -webkit-text-fill-color: unset;
            background-clip: unset;
        }
        [data-theme="dark"] .stat-card .value-success {
            color: #30d158;
            background: none;
            -webkit-background-clip: unset;
            -webkit-text-fill-color: unset;
            background-clip: unset;
        }
        [data-theme="dark"] .stat-card .value-warning {
            color: #ff9f0a;
            background: none;
            -webkit-background-clip: unset;
            -webkit-text-fill-color: unset;
            background-clip: unset;
        }
        
        /* Section Styles */
        .section {
            background: var(--bg-secondary);
            padding: 30px;
            border-radius: 15px;
            margin-bottom: 30px;
            box-shadow: 0 2px 10px var(--shadow-color);
            transition: background 0.3s ease, box-shadow 0.3s ease;
        }
        .section-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 25px;
            flex-wrap: wrap;
            gap: 15px;
        }
        .section h2 {
            color: var(--text-primary);
            font-size: 20px;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .button-group {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
        }
        
        /* Table Styles */
        .table-wrapper {
            overflow-x: auto;
            margin: -10px;
            padding: 10px;
        }
        .table {
            width: 100%;
            border-collapse: separate;
            border-spacing: 0;
        }
        .table th, .table td {
            padding: 14px;
            text-align: left;
            border-bottom: 1px solid var(--border-color);
            color: var(--text-primary);
        }
        .table th {
            background: var(--bg-tertiary);
            font-weight: 600;
            color: var(--text-secondary);
            font-size: 13px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        .table tbody tr {
            transition: background 0.2s;
        }
        .table tbody tr:hover {
            background: var(--bg-hover);
        }
        /* 操作列靠右对齐 */
        .table td:last-child {
            text-align: right;
            white-space: nowrap;
        }
        
        /* Badge Styles */
        .badge {
            padding: 6px 12px;
            border-radius: 6px;
            font-size: 12px;
            font-weight: 600;
            display: inline-block;
        }
        .badge-success {
            background: #c6f6d5;
            color: #22543d;
        }
        .badge-danger {
            background: #fed7d7;
            color: #742a2a;
        }
        .badge-info {
            background: #bee3f8;
            color: #2c5282;
        }
        .badge-secondary {
            background: var(--bg-tertiary);
            color: var(--text-muted);
        }
        /* 暗黑模式 Badge 颜色优化 */
        [data-theme="dark"] .badge-success {
            background: var(--badge-success-bg);
            color: var(--badge-success-color);
        }
        [data-theme="dark"] .badge-danger {
            background: var(--badge-danger-bg);
            color: var(--badge-danger-color);
        }
        [data-theme="dark"] .badge-info {
            background: var(--badge-info-bg);
            color: var(--badge-info-color);
        }
        .badge.clickable {
            cursor: pointer;
            transition: all 0.2s;
        }
        .badge.clickable:hover {
            transform: scale(1.05);
            box-shadow: 0 2px 8px var(--shadow-color);
        }
        
        /* Switch Styles */
        .switch {
            position: relative;
            display: inline-block;
            width: 50px;
            height: 26px;
        }
        .switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }
        .slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: var(--switch-bg);
            transition: .4s;
            border-radius: 26px;
        }
        .slider:before { 
            position: absolute; 
            content: ""; 
            height: 20px; 
            width: 20px; 
            left: 3px; 
            bottom: 3px; 
            background-color: white; 
            transition: .4s; 
            border-radius: 50%; 
        }
        input:checked + .slider {
            background: linear-gradient(135deg, #667eea, #764ba2);
        }
        [data-theme="dark"] input:checked + .slider {
            background: #0a84ff;
        }
        input:checked + .slider:before {
            transform: translateX(24px);
        }
        
        /* Time Range Input */
        .time-range-input {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .time-range-input input[type="time"] {
            border: 2px solid var(--input-border);
            padding: 6px;
            border-radius: 6px;
            font-size: 13px;
            background: var(--bg-secondary);
            color: var(--text-primary);
        }
        [data-theme="dark"] .time-range-input input[type="time"]::-webkit-calendar-picker-indicator {
            filter: invert(0.8);
        }
        
        .interval-input {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .interval-input input[type="number"] {
            width: 80px;
            border: 2px solid var(--input-border);
            padding: 6px;
            border-radius: 6px;
            font-size: 13px;
            background: var(--bg-secondary);
            color: var(--text-primary);
        }
        /* 暗黑模式 number input 箭头颜色 */
        [data-theme="dark"] .interval-input input[type="number"]::-webkit-inner-spin-button,
        [data-theme="dark"] .interval-input input[type="number"]::-webkit-outer-spin-button,
        [data-theme="dark"] .form-group input[type="number"]::-webkit-inner-spin-button,
        [data-theme="dark"] .form-group input[type="number"]::-webkit-outer-spin-button {
            filter: invert(0.8);
        }

        .interval-input span, .time-range-input span {
            color: var(--text-secondary);
        }

        /* 暗黑模式 checkbox 样式优化 */
        [data-theme="dark"] input[type="checkbox"] {
            accent-color: #0a84ff;
        }

        .settings-display {
            font-size: 13px;
            line-height: 1.6;
            color: var(--text-secondary);
        }
        .settings-display div:first-child {
            color: var(--text-primary);
            font-weight: 500;
        }
        
        /* Modal Styles */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: var(--modal-bg);
            justify-content: center;
            align-items: center;
            padding: 20px;
            z-index: 1000;
        }
        .modal-content {
            background: var(--bg-secondary);
            padding: 30px;
            border-radius: 15px;
            width: 100%;
            max-width: 600px;
            max-height: 90vh;
            overflow-y: auto;
            animation: modalSlideIn 0.3s ease;
            transition: background 0.3s ease;
        }
        .modal-content.modal-large {
            max-width: 800px;
        }
        .modal-body-scroll {
            max-height: 60vh;
            overflow-y: auto;
            padding-right: 10px;
        }
        @keyframes modalSlideIn {
            from {
                transform: translateY(-50px);
                opacity: 0;
            }
            to {
                transform: translateY(0);
                opacity: 1;
            }
        }
        .modal-header {
            margin-bottom: 25px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .modal-header h3 {
            color: var(--text-primary);
            font-size: 20px;
        }
        .close {
            font-size: 28px;
            cursor: pointer;
            color: var(--text-muted);
            background: none;
            border: none;
            padding: 0;
            width: 30px;
            height: 30px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            transition: all 0.3s;
        }
        .close:hover {
            background: var(--bg-hover);
            color: var(--text-secondary);
        }
        
        /* Loading Spinner */
        .spinner {
            border: 3px solid var(--spinner-bg);
            border-top: 3px solid #667eea;
            border-radius: 50%;
            width: 40px;
            height: 40px;
            animation: spin 1s linear infinite;
            margin: 20px auto;
        }

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

        /* Toast Notification */
        .toast {
            position: fixed;
            bottom: 20px;
            right: 20px;
            background: var(--toast-bg);
            padding: 16px 24px;
            border-radius: 8px;
            box-shadow: 0 4px 12px var(--toast-shadow);
            display: none;
            animation: slideInUp 0.3s ease;
            z-index: 2000;
            max-width: 350px;
            color: var(--text-primary);
            transition: background 0.3s ease, color 0.3s ease;
        }
        
        @keyframes slideInUp {
            from {
                transform: translateY(100px);
                opacity: 0;
            }
            to {
                transform: translateY(0);
                opacity: 1;
            }
        }
        
        .toast.success {
            border-left: 4px solid #48bb78;
        }
        
        .toast.error {
            border-left: 4px solid #f56565;
        }
        
        .toast.info {
            border-left: 4px solid #4299e1;
        }
        
        /* Error message */
        .error-message {
            color: #e53e3e;
            font-size: 14px;
            margin-top: 10px;
            display: none;
        }
        
        /* Cookie format hint */
        .format-hint {
            font-size: 12px;
            color: var(--text-muted);
            margin-top: 5px;
        }
        
        .help-link {
            color: #667eea;
            text-decoration: none;
            font-size: 12px;
        }
        [data-theme="dark"] .help-link {
            color: var(--link-color);
        }
        .help-link:hover {
            text-decoration: underline;
        }

        /* 基础信息展示 */
        .info-display {
            font-size: 13px;
            line-height: 1.5;
        }
        .info-display .info-name {
            color: var(--text-primary);
            font-weight: 500;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 120px;
        }
        .info-display .info-sub {
            color: var(--text-muted);
            font-size: 12px;
        }

        /* 余额信息展示 */
        .balance-display {
            font-size: 13px;
            line-height: 1.5;
        }
        .balance-display .balance-amount {
            color: #48bb78;
            font-weight: 600;
        }
        .balance-display .balance-consumed {
            color: var(--text-muted);
            font-size: 12px;
        }
        [data-theme="dark"] .balance-display .balance-amount {
            color: #30d158;
        }

        /* ============ 批量兑换样式 ============ */

        /* Tab 切换 */
        .redeem-tabs {
            display: flex;
            gap: 0;
            margin-bottom: 20px;
            border-bottom: 1px solid var(--border-color);
        }

        .tab-btn {
            padding: 10px 20px;
            background: transparent;
            border: none;
            color: var(--text-secondary);
            cursor: pointer;
            border-bottom: 2px solid transparent;
            transition: all 0.3s ease;
            font-size: 14px;
            font-weight: 500;
        }

        .tab-btn:hover {
            color: var(--text-primary);
        }

        .tab-btn.active {
            color: #667eea;
            border-bottom-color: #667eea;
        }

        [data-theme="dark"] .tab-btn.active {
            color: #0a84ff;
            border-bottom-color: #0a84ff;
        }

        .tab-content {
            display: none;
        }

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

        /* 批量兑换输入框 */
        #batchRedeemCodes {
            width: 100%;
            padding: 12px;
            border: 1px solid var(--input-border);
            border-radius: 8px;
            font-size: 14px;
            font-family: 'SF Mono', Monaco, 'Courier New', monospace;
            background: var(--bg-secondary);
            color: var(--text-primary);
            resize: vertical;
            min-height: 100px;
            transition: border-color 0.3s ease, box-shadow 0.3s ease;
        }

        #batchRedeemCodes:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
        }

        [data-theme="dark"] #batchRedeemCodes:focus {
            border-color: #0a84ff;
            box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.25);
        }

        /* 批量进度区域 */
        .batch-progress-section {
            margin-top: 15px;
            padding: 15px;
            background: var(--bg-tertiary);
            border-radius: 10px;
            border: 1px solid var(--border-color);
        }

        .batch-progress-header {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 12px;
            padding-bottom: 12px;
            border-bottom: 1px solid var(--border-color);
            font-size: 13px;
            color: var(--text-primary);
        }

        .batch-status-badge {
            padding: 3px 8px;
            border-radius: 4px;
            font-size: 12px;
            font-weight: 500;
        }

        .batch-status-badge.running {
            background: rgba(102, 126, 234, 0.15);
            color: #667eea;
        }

        .batch-status-badge.paused {
            background: rgba(237, 137, 54, 0.15);
            color: #ed8936;
        }

        .batch-status-badge.completed {
            background: rgba(72, 187, 120, 0.15);
            color: #48bb78;
        }

        .batch-status-badge.cancelled {
            background: rgba(245, 101, 101, 0.15);
            color: #f56565;
        }

        [data-theme="dark"] .batch-status-badge.running {
            background: rgba(10, 132, 255, 0.2);
            color: #0a84ff;
        }

        [data-theme="dark"] .batch-status-badge.paused {
            background: rgba(255, 159, 10, 0.2);
            color: #ff9f0a;
        }

        [data-theme="dark"] .batch-status-badge.completed {
            background: rgba(48, 209, 88, 0.2);
            color: #30d158;
        }

        [data-theme="dark"] .batch-status-badge.cancelled {
            background: rgba(255, 69, 58, 0.2);
            color: #ff453a;
        }

        .batch-next-execute {
            padding: 8px 12px;
            margin-top: 10px;
            background: var(--bg-secondary);
            border-radius: 6px;
            font-size: 13px;
            color: var(--text-secondary);
        }

        .batch-code-list {
            max-height: 200px;
            overflow-y: auto;
            margin-top: 12px;
        }

        .batch-code-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 8px 10px;
            border-bottom: 1px solid var(--border-color);
            font-size: 13px;
        }

        .batch-code-item:last-child {
            border-bottom: none;
        }

        .batch-code-item code {
            background: var(--bg-secondary);
            padding: 2px 8px;
            border-radius: 4px;
            font-family: 'SF Mono', Monaco, 'Courier New', monospace;
            font-size: 12px;
            color: var(--text-primary);
            max-width: 120px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .batch-code-item .status-icon {
            font-size: 14px;
            flex-shrink: 0;
        }

        .batch-code-item .status-message {
            flex: 1;
            color: var(--text-secondary);
            font-size: 12px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .batch-code-item.success .status-message {
            color: #48bb78;
        }

        .batch-code-item.failed .status-message {
            color: #f56565;
        }

        [data-theme="dark"] .batch-code-item.success .status-message {
            color: #30d158;
        }

        [data-theme="dark"] .batch-code-item.failed .status-message {
            color: #ff453a;
        }

        .batch-code-item.waiting .status-message {
            color: #ed8936;
        }

        [data-theme="dark"] .batch-code-item.waiting .status-message {
            color: #ff9f0a;
        }

        /* 警告按钮 */
        .btn-warning {
            background: linear-gradient(135deg, #ed8936, #dd6b20);
            color: white;
        }

        .btn-warning:hover {
            background: linear-gradient(135deg, #dd6b20, #c05621);
            transform: translateY(-1px);
        }

        [data-theme="dark"] .btn-warning {
            background: #ff9f0a;
        }

        [data-theme="dark"] .btn-warning:hover {
            background: #e08d09;
        }

        /* 辅助样式 */
        .text-small {
            font-size: 0.85em;
        }

        .text-muted {
            color: #a0aec0;
        }

        [data-theme="dark"] .text-muted {
            color: #718096;
        }

        /* ========== 邀请码样式 ========== */

        /* 邀请码统计区域 */
        .invitation-stats {
            display: flex;
            align-items: center;
            gap: 20px;
            padding: 12px 16px;
            background: var(--bg-tertiary);
            border-radius: 8px;
            margin-bottom: 12px;
            flex-wrap: wrap;
        }

        .invitation-stats .stat-item {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .invitation-stats .stat-label {
            font-size: 13px;
            color: var(--text-secondary);
        }

        [data-theme="dark"] .invitation-stats .stat-label {
            color: #8e8e93;
        }

        .invitation-stats .stat-value {
            font-size: 16px;
            font-weight: 600;
        }

        .invitation-stats .stat-total {
            color: var(--primary-color);
        }

        [data-theme="dark"] .invitation-stats .stat-total {
            color: #0a84ff;
        }

        .invitation-stats .stat-available {
            color: var(--badge-success-color);
        }

        [data-theme="dark"] .invitation-stats .stat-available {
            color: #30d158;
        }

        .invitation-stats .stat-uses {
            color: var(--text-secondary);
        }

        [data-theme="dark"] .invitation-stats .stat-uses {
            color: #8e8e93;
        }

        .invitation-stats button {
            margin-left: auto;
        }

        /* 价格提示 */
        .invitation-price-hint {
            font-size: 12px;
            color: var(--text-muted);
            margin-bottom: 12px;
            padding: 8px 12px;
            background: var(--bg-secondary);
            border-radius: 6px;
            border-left: 3px solid var(--primary-color);
        }

        [data-theme="dark"] .invitation-price-hint {
            color: #8e8e93;
            background: rgba(142, 142, 147, 0.1);
            border-left-color: #0a84ff;
        }

        /* 邀请码列表 */
        .invitation-list {
            max-height: 300px;
            overflow-y: auto;
        }

        .invitation-loading,
        .invitation-empty,
        .invitation-error {
            text-align: center;
            padding: 30px 20px;
            color: var(--text-muted);
            font-size: 14px;
        }

        .invitation-error {
            color: var(--badge-danger-color);
        }

        [data-theme="dark"] .invitation-loading,
        [data-theme="dark"] .invitation-empty {
            color: #8e8e93;
        }

        [data-theme="dark"] .invitation-error {
            color: #ff453a;
        }

        /* 邀请码列表项 */
        .invitation-item {
            display: flex;
            flex-direction: row;
            justify-content: space-between;
            align-items: center;
            gap: 12px;
            padding: 12px;
            border-bottom: 1px solid var(--border-color);
            transition: background 0.2s ease;
        }

        .invitation-item:last-child {
            border-bottom: none;
        }

        .invitation-item:hover {
            background: var(--bg-tertiary);
        }

        .invitation-item.used {
            opacity: 0.6;
        }

        .invitation-main {
            display: flex;
            align-items: center;
            gap: 12px;
            flex-wrap: wrap;
            flex: 1;
        }

        .invitation-code {
            font-family: 'SF Mono', Monaco, 'Courier New', monospace;
            font-size: 14px;
            font-weight: 600;
            color: var(--primary-color);
            background: var(--bg-secondary);
            padding: 4px 10px;
            border-radius: 4px;
            letter-spacing: 0.5px;
        }

        [data-theme="dark"] .invitation-code {
            color: #0a84ff;
            background: rgba(10, 132, 255, 0.15);
        }

        .invitation-usage {
            font-size: 12px;
            color: var(--text-secondary);
        }

        [data-theme="dark"] .invitation-usage {
            color: #8e8e93;
        }

        .invitation-status {
            font-size: 11px;
            padding: 2px 8px;
            border-radius: 10px;
            font-weight: 500;
        }

        .invitation-status.available {
            background: rgba(72, 187, 120, 0.15);
            color: var(--badge-success-color);
        }

        .invitation-status.used {
            background: rgba(160, 174, 192, 0.15);
            color: var(--text-muted);
        }

        [data-theme="dark"] .invitation-status.available {
            background: rgba(48, 209, 88, 0.2);
            color: #30d158;
        }

        [data-theme="dark"] .invitation-status.used {
            background: rgba(142, 142, 147, 0.2);
            color: #8e8e93;
        }

        /* 邀请码操作按钮 */
        .invitation-actions {
            display: flex;
            gap: 8px;
            flex-shrink: 0;
        }

        /* 创建时间样式 */
        .invitation-time {
            font-size: 11px;
            color: var(--text-secondary);
            opacity: 0.7;
        }

        [data-theme="dark"] .invitation-time {
            color: #8e8e93;
        }

        .invitation-actions .btn-copy,
        .invitation-actions .btn-copy-link {
            font-size: 11px;
            padding: 4px 10px;
            background: var(--bg-secondary);
            color: var(--text-primary);
            border: 1px solid var(--border-color);
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .invitation-actions .btn-copy:hover,
        .invitation-actions .btn-copy-link:hover {
            background: var(--primary-color);
            color: white;
            border-color: var(--primary-color);
        }

        [data-theme="dark"] .invitation-actions .btn-copy,
        [data-theme="dark"] .invitation-actions .btn-copy-link {
            background: var(--bg-tertiary);
            border-color: var(--border-color);
        }

        [data-theme="dark"] .invitation-actions .btn-copy:hover,
        [data-theme="dark"] .invitation-actions .btn-copy-link:hover {
            background: var(--primary-color);
            color: white;
        }

        /* 响应式：小屏幕 */
        @media (max-width: 480px) {
            .invitation-stats {
                flex-direction: column;
                align-items: flex-start;
                gap: 10px;
            }

            .invitation-stats button {
                margin-left: 0;
                width: 100%;
            }

            .invitation-item {
                flex-direction: column;
                align-items: flex-start;
            }

            .invitation-main {
                flex-direction: column;
                align-items: flex-start;
            }

            .invitation-actions {
                width: 100%;
            }

            .invitation-actions .btn-copy,
            .invitation-actions .btn-copy-link {
                flex: 1;
                text-align: center;
            }
        }
/* ========== 搜索框样式 ========== */

/* 搜索容器样式 */
.search-container {
    transition: border-color 0.3s;
}

.search-container:focus-within {
    border-color: var(--primary-color);
}

.search-container input::placeholder,
.search-container select {
    color: var(--text-muted);
}

.search-container input:focus {
    outline: none;
    border-color: #667eea;
}

[data-theme="dark"] .search-container input:focus {
    border-color: #0a84ff;
}

/* 搜索结果提示动画 */
#searchResultHint {
    animation: fadeIn 0.3s ease-in;
}

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