/* ============================================
   1Key 批量验证系统 - 深色主题样式
   Premium Dark Mode Design
   ============================================ */

/* CSS 变量定义 */
:root {
    /* 背景色 */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: rgba(22, 22, 30, 0.8);
    --bg-card-hover: rgba(28, 28, 40, 0.9);

    /* 文字色 */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* 边框色 */
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);

    /* 主题色 */
    --color-indigo: #6366f1;
    --color-indigo-glow: rgba(99, 102, 241, 0.3);
    --color-emerald: #10b981;
    --color-emerald-glow: rgba(16, 185, 129, 0.3);
    --color-amber: #f59e0b;
    --color-amber-glow: rgba(245, 158, 11, 0.2);
    --color-blue: #3b82f6;
    --color-blue-glow: rgba(59, 130, 246, 0.3);
    --color-rose: #f43f5e;

    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* 动画 */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
}

/* 基础重置 */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* 背景光效 */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.35;
    animation: float 20s ease-in-out infinite;
}

.glow-1 {
    width: 500px;
    height: 500px;
    background: #a855f7;
    top: -150px;
    left: -100px;
    animation-delay: 0s;
}

.glow-2 {
    width: 400px;
    height: 400px;
    background: var(--color-indigo);
    top: 40%;
    right: -100px;
    animation-delay: -7s;
}

.glow-3 {
    width: 350px;
    height: 350px;
    background: var(--color-emerald);
    bottom: -80px;
    left: 25%;
    animation-delay: -14s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(30px, -30px) scale(1.05);
    }

    50% {
        transform: translate(-20px, 20px) scale(0.95);
    }

    75% {
        transform: translate(20px, 40px) scale(1.02);
    }
}

/* 主容器 */
.container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

/* 头部 */
.header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 32px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    margin-bottom: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #a855f7, var(--color-indigo));
    border-radius: var(--radius-md);
    color: white;
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.3);
}

.logo-icon svg {
    width: 28px;
    height: 28px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 公告区域 */
.notice-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.notice {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 22px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.notice:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

.notice-warning {
    border-left: 3px solid var(--color-amber);
}

.notice-info {
    border-left: 3px solid var(--color-blue);
}

.notice-badge {
    padding: 4px 10px;
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-amber);
    white-space: nowrap;
}

.notice-content {
    flex: 1;
}

.notice-content h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.notice-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.notice-text a {
    color: var(--color-blue);
    text-decoration: none;
    word-break: break-all;
}

.notice-text a:hover {
    text-decoration: underline;
}

.notice-time {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 10px;
}

.text-warning {
    color: var(--color-rose);
    font-weight: 500;
}

/* 主网格 - 两列 */
.main-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

@media (max-width: 900px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
}

/* 卡片样式 */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.card-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.card-icon svg {
    width: 22px;
    height: 22px;
}

.card-icon-indigo {
    background: rgba(99, 102, 241, 0.15);
    color: var(--color-indigo);
    box-shadow: 0 0 20px var(--color-indigo-glow);
}

.card-icon-emerald {
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-emerald);
    box-shadow: 0 0 20px var(--color-emerald-glow);
}

.card-icon-blue {
    background: rgba(59, 130, 246, 0.15);
    color: var(--color-blue);
    box-shadow: 0 0 20px var(--color-blue-glow);
}

.card-body {
    padding: 24px;
}

/* 表单元素 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.input-field {
    width: 100%;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all var(--transition-fast);
    outline: none;
}

.input-field::placeholder {
    color: var(--text-muted);
}

.input-field:hover {
    border-color: var(--border-hover);
}

.input-field:focus {
    border-color: var(--color-indigo);
    box-shadow: 0 0 0 3px var(--color-indigo-glow);
}

.input-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.input-example {
    display: block;
    font-size: 0.75rem;
    color: var(--color-blue);
    margin-top: 4px;
    word-break: break-all;
    font-family: 'Monaco', 'Menlo', monospace;
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.btn-indigo {
    background: linear-gradient(135deg, var(--color-indigo), #4f46e5);
    color: white;
    box-shadow: 0 4px 20px var(--color-indigo-glow);
}

.btn-indigo:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px var(--color-indigo-glow);
}

.btn-emerald {
    background: linear-gradient(135deg, var(--color-emerald), #059669);
    color: white;
    box-shadow: 0 4px 20px var(--color-emerald-glow);
}

.btn-emerald:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px var(--color-emerald-glow);
}

/* 使用提示 */
.usage-tips {
    margin-top: 20px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    border: 1px dashed var(--border-color);
}

.usage-tips h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.usage-tips ul {
    list-style: none;
}

.usage-tips li {
    position: relative;
    padding-left: 18px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.usage-tips li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--color-emerald);
}

.text-highlight {
    color: var(--color-emerald);
    font-weight: 500;
}

/* FAQ 常见问题 */
.faq-section {
    margin-bottom: 24px;
}

.faq-body {
    padding: 0 !important;
}

.faq-item {
    border-bottom: 1px solid var(--border-color);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: left;
}

.faq-question:hover {
    background: rgba(255, 255, 255, 0.03);
}

.faq-arrow {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    transition: transform var(--transition-normal);
    flex-shrink: 0;
}

.faq-item.active .faq-arrow {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal);
}

.faq-item.active .faq-answer {
    max-height: 1000px;
}

.faq-answer>* {
    padding: 0 24px;
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.faq-answer>*:first-child {
    padding-top: 0;
}

.faq-answer>*:last-child {
    padding-bottom: 20px;
}

.faq-answer ul {
    padding-left: 44px;
    list-style: disc;
}

.faq-answer ul li {
    margin-bottom: 8px;
}

.faq-answer code {
    display: block;
    padding: 12px 16px;
    margin: 0 24px 12px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: var(--radius-sm);
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.8rem;
    color: var(--color-blue);
    word-break: break-all;
}

.status-pending {
    color: var(--color-amber);
}

.status-success {
    color: var(--color-emerald);
}

.status-error {
    color: var(--color-rose);
}

/* 响应式 */
@media (max-width: 768px) {
    .container {
        padding: 16px;
    }

    .header {
        padding: 16px 20px;
    }

    .logo-text {
        font-size: 1.25rem;
    }

    .notice {
        padding: 14px 16px;
        flex-direction: column;
        gap: 10px;
    }

    .card-header {
        padding: 16px 20px;
    }

    .card-body {
        padding: 20px;
    }

    .faq-question {
        padding: 16px 20px;
    }

    .faq-answer>* {
        padding: 0 20px;
    }

    .faq-answer code {
        margin: 0 20px 12px;
    }
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-hover);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* 选中文本 */
::selection {
    background: var(--color-indigo);
    color: white;
}

/* ============================================
   消息提示 Toast
   ============================================ */
.message-toast {
    position: fixed;
    top: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    z-index: 9999;
    animation: slideIn 0.3s ease;
}

.message-toast.fade-out {
    animation: slideOut 0.3s ease forwards;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.message-icon {
    font-size: 1.25rem;
}

.message-success {
    border-left: 3px solid var(--color-emerald);
}

.message-success .message-icon {
    color: var(--color-emerald);
}

.message-error {
    border-left: 3px solid var(--color-rose);
}

.message-error .message-icon {
    color: var(--color-rose);
}

.message-info {
    border-left: 3px solid var(--color-blue);
}

.message-info .message-icon {
    color: var(--color-blue);
}

.message-text {
    font-size: 0.95rem;
    color: var(--text-primary);
}

/* ============================================
   查询结果区域
   ============================================ */
.result-area {
    margin-top: 20px;
    display: none;
}

.query-result {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.result-header {
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border-color);
}

.result-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 600;
}

.result-status.status-success {
    color: var(--color-emerald);
}

.result-status.status-error {
    color: var(--color-rose);
}

.result-status.status-pending {
    color: var(--color-amber);
}

.result-status.status-unused {
    color: var(--text-muted);
}

.result-details {
    padding: 16px 20px;
}

.result-details p {
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.result-details p:last-child {
    margin-bottom: 0;
}

.result-details strong {
    color: var(--text-primary);
}

.result-details .text-muted {
    color: var(--text-muted);
    font-size: 0.85rem;
    word-break: break-all;
}

/* ============================================
   按钮加载状态
   ============================================ */
.btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
    position: relative;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ============================================
   烟花特效 Canvas
   ============================================ */
#fireworksCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10000;
    display: none;
}

#fireworksCanvas.active {
    display: block;
}

/* ============================================
   成功庆祝弹窗
   ============================================ */
.success-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.success-modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.success-modal-content {
    background: linear-gradient(145deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-radius: 24px;
    padding: 40px 50px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    border: 2px solid rgba(255, 215, 0, 0.3);
    box-shadow:
        0 0 60px rgba(255, 215, 0, 0.2),
        0 0 100px rgba(16, 185, 129, 0.1),
        inset 0 0 60px rgba(255, 255, 255, 0.02);
    animation: popIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    z-index: 10001;
}

@keyframes popIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: bounce 1s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.success-title {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #ffd700 0%, #ffb700 50%, #ff8c00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 25px;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
}

.success-message {
    color: #e0e0e0;
    font-size: 16px;
    line-height: 2;
    margin-bottom: 30px;
}

.success-message p {
    margin: 8px 0;
}

.success-message .highlight {
    color: #ffd700;
    font-weight: 600;
}

.success-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 15px 50px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
}

.success-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 30px rgba(16, 185, 129, 0.5);
}