/* ==================== 基础样式重置 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #00d4ff;
    --primary-dark: #0099cc;
    --secondary-color: #7b2cbf;
    --accent-color: #ff6b35;
    --bg-dark: #0a0a0f;
    --bg-card: #12121a;
    --bg-input: #1a1a2e;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #6a6a7a;
    --border-color: #2a2a3e;
    --success-color: #00e676;
    --error-color: #ff5252;
    --warning-color: #ffab40;
    --shadow-glow: 0 0 20px rgba(0, 212, 255, 0.3);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
    --gradient-primary: linear-gradient(135deg, #00d4ff 0%, #7b2cbf 100%);
    --gradient-dark: linear-gradient(180deg, #0a0a0f 0%, #12121a 100%);
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ==================== 粒子背景动画 ==================== */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat 15s infinite;
    box-shadow: 0 0 6px var(--primary-color);
}

@keyframes particleFloat {
    0% {
        opacity: 0;
        transform: translateY(100vh) scale(0);
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(-100px) scale(1);
    }
}

/* ==================== 顶部信息栏 ==================== */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 20px;
}

.top-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.info-icon {
    font-size: 16px;
    filter: drop-shadow(0 0 4px var(--primary-color));
}

#beijing-time {
    color: var(--primary-color);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

#ip-address {
    color: var(--accent-color);
    font-weight: 500;
}

/* ==================== 主容器 ==================== */
.main-container {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 80px 20px 40px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ==================== 标题区域 ==================== */
.header-section {
    text-align: center;
    margin-bottom: 40px;
}

.logo-animation {
    margin-bottom: 20px;
}

.logo-circle {
    width: 80px;
    height: 80px;
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    margin: 0 auto;
    position: relative;
    animation: logoPulse 2s ease-in-out infinite;
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
}

.logo-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 2px solid var(--secondary-color);
    border-radius: 50%;
    animation: logoRotate 3s linear infinite;
}

@keyframes logoPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 50px rgba(0, 212, 255, 0.5);
    }
}

@keyframes logoRotate {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.main-title {
    font-size: 36px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    letter-spacing: 4px;
}

.subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.title-line {
    width: 100px;
    height: 3px;
    background: var(--gradient-primary);
    margin: 0 auto;
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

/* ==================== 输入区域 ==================== */
.input-section {
    width: 100%;
    max-width: 500px;
    margin-bottom: 30px;
}

.input-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.input-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
}

.input-group {
    margin-bottom: 20px;
}

.input-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-weight: 500;
}

.label-icon {
    font-size: 18px;
}

.input-wrapper {
    position: relative;
}

.tech-input {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
}

.tech-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
}

.tech-input::placeholder {
    color: var(--text-muted);
}

.input-glow {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--primary-color);
}

.tech-input:focus ~ .input-glow {
    width: 100%;
}

.input-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}

.attempts-info {
    text-align: center;
    margin-bottom: 20px;
    padding: 10px;
    background: rgba(0, 212, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(0, 212, 255, 0.1);
}

.attempts-text {
    font-size: 14px;
    color: var(--text-secondary);
}

.attempts-count {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
}

.attempts-count.warning {
    color: var(--warning-color);
}

.attempts-count.danger {
    color: var(--error-color);
}

/* ==================== 按钮样式 ==================== */
.verify-btn {
    width: 100%;
    padding: 14px 24px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.verify-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.4);
}

.verify-btn:active {
    transform: translateY(0);
}

.verify-btn.small {
    padding: 10px 20px;
    font-size: 14px;
}

.btn-text {
    position: relative;
    z-index: 1;
}

.btn-icon {
    font-size: 18px;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.verify-btn:hover .btn-icon {
    transform: translateX(5px);
}

.btn-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: all 0.5s ease;
}

.verify-btn:hover .btn-glow {
    width: 300px;
    height: 300px;
}

/* ==================== 结果展示区域 ==================== */
.result-section {
    width: 100%;
    max-width: 700px;
    margin-bottom: 30px;
}

.result-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 25px;
    box-shadow: var(--shadow-card);
    animation: resultSlideIn 0.5s ease;
}

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

.result-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.result-status {
    font-size: 14px;
    margin-bottom: 8px;
    padding: 5px 15px;
    border-radius: 20px;
    display: inline-block;
}

.result-status.success {
    background: rgba(0, 230, 118, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(0, 230, 118, 0.3);
}

.result-status.error {
    background: rgba(255, 82, 82, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(255, 82, 82, 0.3);
}

.result-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

/* ==================== 密码区域 ==================== */
.password-section {
    margin-bottom: 20px;
    padding: 20px;
    background: rgba(123, 44, 191, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(123, 44, 191, 0.2);
}

.password-input-group {
    max-width: 300px;
    margin: 0 auto;
}

/* ==================== 文件展示区域 ==================== */
.file-display {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.file-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--bg-input);
    border-radius: 10px;
}

.file-icon {
    font-size: 40px;
}

.file-details {
    flex: 1;
}

.file-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
    word-break: break-all;
}

.file-meta {
    font-size: 13px;
    color: var(--text-muted);
}

.file-preview {
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-input);
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-preview .preview-image {
    max-width: 100%;
    max-height: 400px;
    height: auto;
    cursor: zoom-in;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.file-preview .preview-image:hover {
    transform: scale(1.02);
}

/* ==================== 图片放大弹窗 ==================== */
.image-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.image-modal.active {
    display: block;
}

.image-modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.3);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.image-modal-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 2001;
}

.image-modal-close:hover {
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.image-modal-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 15px 0;
    font-size: 16px;
}

/* ==================== 下载按钮 ==================== */
.download-btn {
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    background: var(--gradient-primary);
    color: white;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.4);
}

.file-preview iframe {
    width: 100%;
    min-height: 500px;
    border: none;
}

.file-preview .preview-placeholder {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.file-preview .preview-placeholder .placeholder-icon {
    font-size: 48px;
    margin-bottom: 10px;
    display: block;
}

.file-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.action-btn {
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.action-btn.primary {
    background: var(--gradient-primary);
    color: white;
}

.action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.4);
}

/* ==================== 加载动画 ==================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 15, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    position: relative;
    width: 60px;
    height: 60px;
}

.spinner-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spinnerRotate 1s linear infinite;
}

.spinner-ring:nth-child(2) {
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
    border-top-color: var(--secondary-color);
    animation-duration: 0.8s;
    animation-direction: reverse;
}

.spinner-ring:nth-child(3) {
    width: 60%;
    height: 60%;
    top: 20%;
    left: 20%;
    border-top-color: var(--accent-color);
    animation-duration: 0.6s;
}

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

.loading-text {
    margin-top: 20px;
    font-size: 16px;
    color: var(--text-secondary);
}

/* ==================== 提示消息 ==================== */
.toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 1001;
    transition: all 0.3s ease;
    opacity: 0;
}

.toast.active {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast-icon {
    font-size: 24px;
}

.toast-message {
    font-size: 14px;
    color: var(--text-primary);
}

.toast.success {
    border-color: var(--success-color);
}

.toast.error {
    border-color: var(--error-color);
}

/* ==================== 底部信息 ==================== */
.footer {
    margin-top: auto;
    padding-top: 40px;
    text-align: center;
}

.footer-content {
    color: var(--text-muted);
    font-size: 13px;
}

.footer-line {
    width: 60px;
    height: 2px;
    background: var(--border-color);
    margin: 0 auto 15px;
}

.footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.footer-hint {
    margin-top: 8px;
    font-size: 12px;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 600px) {
    .main-title {
        font-size: 28px;
    }
    
    .input-card {
        padding: 20px;
    }
    
    .top-info {
        gap: 15px;
    }
    
    .file-actions {
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ==================== 滚动条美化 ==================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}
