/* Chrome扩展弹窗样式 - 重构版 */ :root { /* 颜色变量 */ --primary-color: #667eea; --secondary-color: #764ba2; --success-color: #00c851; --danger-color: #ff4444; --warning-color: #ffbb33; --info-color: #33b5e5; --text-color: #333; --text-light: #666; --bg-white: #ffffff; --bg-light: #f8f9fa; --border-color: #e1e5e9; --border-light: #f0f0f0; /* 尺寸变量 */ --border-radius-sm: 4px; --border-radius-md: 8px; --border-radius-lg: 12px; --spacing-xs: 4px; --spacing-sm: 8px; --spacing-md: 12px; --spacing-lg: 16px; --spacing-xl: 20px; /* 阴影变量 */ --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1); --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1); --shadow-lg: 0 6px 20px rgba(0, 0, 0, 0.15); /* 动画变量 */ --transition-fast: 0.2s ease; --transition-normal: 0.3s ease; --transition-slow: 0.5s ease; } /* 暗色模式变量 */ @media (prefers-color-scheme: dark) { :root { --text-color: #f0f0f0; --text-light: #cccccc; --bg-white: #2a2a2a; --bg-light: #3a3a3a; --border-color: #444444; --border-light: #555555; } } * { margin: 0; padding: 0; box-sizing: border-box; } body { width: 380px; min-height: 500px; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%); color: var(--text-color); transition: background var(--transition-normal), color var(--transition-normal); } .container { padding: var(--spacing-xl); display: flex; flex-direction: column; gap: var(--spacing-lg); } /* 头部样式 */ .header { text-align: center; margin-bottom: 0; color: var(--bg-white); animation: fadeIn 0.8s ease; } @keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } } .logo { font-size: 32px; margin-bottom: var(--spacing-sm); transition: transform var(--transition-normal); display: inline-block; } .logo:hover { transform: scale(1.1) rotate(5deg); } .title { font-size: 18px; font-weight: 600; margin-bottom: var(--spacing-xs); text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); } .version { font-size: 12px; opacity: 0.8; background: rgba(255, 255, 255, 0.2); padding: 2px 8px; border-radius: 10px; display: inline-block; } /* 状态卡片 */ .status-section { margin-bottom: var(--spacing-xl); } .status-card { background: var(--bg-white); border-radius: var(--border-radius-lg); padding: var(--spacing-lg); display: flex; align-items: center; gap: var(--spacing-md); box-shadow: var(--shadow-md); transition: all 0.3s ease; } .status-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); } .status-card.activated { border-left: 4px solid var(--success-color); } .status-card.not-activated { border-left: 4px solid var(--danger-color); } .status-icon { font-size: 24px; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--bg-light); transition: transform 0.2s ease; } .status-card:hover .status-icon { transform: scale(1.1); } .status-text { flex: 1; font-weight: 500; } /* 网站列表 */ .sites-section { margin-bottom: var(--spacing-xl); } .section-title { color: var(--bg-white); font-size: 14px; font-weight: 600; margin-bottom: var(--spacing-md); opacity: 0.9; text-transform: uppercase; letter-spacing: 0.5px; } .sites-list { background: var(--bg-white); border-radius: var(--border-radius-lg); overflow: hidden; box-shadow: var(--shadow-md); transition: transform 0.3s ease; } .sites-list:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); } .site-item { display: flex; align-items: center; padding: var(--spacing-md) var(--spacing-lg); gap: var(--spacing-md); border-bottom: 1px solid var(--border-light); transition: background-color 0.2s ease; } .site-item:hover { background-color: rgba(102, 126, 234, 0.05); } .site-item:last-child { border-bottom: none; } .site-icon { font-size: 20px; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: var(--border-radius-md); background: var(--bg-light); transition: transform 0.2s ease; } .site-item:hover .site-icon { transform: scale(1.1); } .site-info { flex: 1; } .site-name { font-weight: 500; font-size: 14px; margin-bottom: 2px; } .site-url { font-size: 11px; color: var(--text-light); } .site-status { font-size: 11px; padding: var(--spacing-xs) var(--spacing-sm); border-radius: var(--border-radius-sm); font-weight: 500; } .site-status.active { background: #d4f5d4; color: #00875a; } .site-status.inactive { background: #ffebe6; color: #de350b; } /* 按钮样式 */ .actions-section { margin-bottom: var(--spacing-xl); } .btn { width: 100%; padding: var(--spacing-md) var(--spacing-lg); border: none; border-radius: var(--border-radius-md); font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; display: flex; align-items: center; justify-content: center; gap: var(--spacing-sm); margin-bottom: var(--spacing-sm); } .btn:last-child { margin-bottom: 0; } .btn-primary { background: var(--success-color); color: var(--bg-white); box-shadow: 0 4px 12px rgba(0, 200, 81, 0.3); } .btn-primary:hover:not(:disabled) { background: #00a844; transform: translateY(-2px); box-shadow: var(--shadow-lg); } .btn-primary:disabled { background: #ccc; cursor: not-allowed; box-shadow: none; } .btn-secondary { background: var(--bg-white); color: var(--primary-color); border: 2px solid var(--primary-color); } .btn-secondary:hover { background: var(--primary-color); color: var(--bg-white); transform: translateY(-2px); } .btn-activate { background: var(--primary-color); color: var(--bg-white); width: auto; margin: 0; padding: 10px 20px; flex-shrink: 0; } .btn-activate:hover { background: #5a6fd8; } .btn-icon { font-size: 16px; transition: transform 0.2s ease; } .btn:hover .btn-icon { transform: scale(1.2); } /* 激活区域 */ .activation-section { background: white; border-radius: 12px; padding: 16px; margin-bottom: 20px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); } .input-group { display: flex; gap: 8px; margin-bottom: 12px; } .activation-input { flex: 1; padding: 10px 12px; border: 2px solid #e1e5e9; border-radius: 6px; font-size: 14px; text-transform: uppercase; outline: none; transition: border-color 0.3s ease; } .activation-input:focus { border-color: #667eea; box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1); } /* 已激活信息 */ .activated-info { background: white; border-radius: 12px; padding: 16px; margin-bottom: 20px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); } .info-item { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; } .info-item:last-child { margin-bottom: 0; } .info-label { font-size: 14px; color: #666; } .info-value { font-size: 14px; font-weight: 500; } .info-value.success { color: #00c851; } /* 消息提示 */ .message { padding: 10px 12px; border-radius: 6px; font-size: 13px; font-weight: 500; text-align: center; } .message.success { background: #d4f5d4; color: #00875a; border: 1px solid #79e2f2; } .message.error { background: #ffe6e6; color: #d93651; border: 1px solid #ffc6cb; } /* 帮助区域 */ .help-section { margin-bottom: 20px; } .help-details { background: rgba(255, 255, 255, 0.1); border-radius: 8px; overflow: hidden; } .help-summary { padding: 12px 16px; cursor: pointer; color: white; font-weight: 500; font-size: 14px; list-style: none; transition: background 0.3s ease; } .help-summary:hover { background: rgba(255, 255, 255, 0.1); } .help-summary::-webkit-details-marker { display: none; } .help-summary::before { content: '▶'; margin-right: 8px; transition: transform 0.3s ease; } .help-details[open] .help-summary::before { transform: rotate(90deg); } .help-content { padding: 0 16px 16px; color: white; font-size: 13px; line-height: 1.5; } .help-content ol { margin-bottom: 12px; padding-left: 20px; } .help-content li { margin-bottom: 4px; } .help-note { padding: 10px; background: rgba(255, 255, 255, 0.1); border-radius: 6px; font-size: 12px; } /* 底部 */ .footer { text-align: center; color: white; opacity: 0.7; } .footer-text { font-size: 12px; } /* 动画 */ @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } } .loading { animation: pulse 1.5s infinite; }