/* =================================
   CSS 变量定义
   ================================= */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --success-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --error-gradient: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    --warning-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    
    --bg-primary: #0f0f23;
    --bg-secondary: #1a1a2e;
    --bg-card: rgba(26, 26, 46, 0.8);
    --bg-input: rgba(255, 255, 255, 0.05);
    
    --text-primary: #ffffff;
    --text-secondary: #a0a0b8;
    --text-muted: #6b6b7f;
    
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
    
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =================================
   全局样式
   ================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 
                 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =================================
   背景装饰
   ================================= */
.background-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s infinite ease-in-out;
}

.circle-1 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.circle-2 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #11998e, #38ef7d);
    bottom: -150px;
    right: -150px;
    animation-delay: 7s;
}

.circle-3 {
    width: 350px;
    height: 350px;
    background: linear-gradient(135deg, #f093fb, #f5576c);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 14s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(50px, -50px) scale(1.1); }
    66% { transform: translate(-30px, 30px) scale(0.9); }
}

/* =================================
   容器布局
   ================================= */
.container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* =================================
   头部样式
   ================================= */
.header {
    text-align: center;
    margin-bottom: 60px;
    animation: fadeInDown 0.8s ease-out;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.logo-icon {
    animation: floatRotate 6s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(102, 126, 234, 0.5));
    transition: var(--transition);
}

.logo:hover .logo-icon {
    filter: drop-shadow(0 0 30px rgba(102, 126, 234, 0.8));
    transform: scale(1.1);
}

.logo-icon .link-icon {
    animation: linkPulse 2s ease-in-out infinite;
}

@keyframes floatRotate {
    0%, 100% { 
        transform: translateY(0) rotate(0deg); 
    }
    25% { 
        transform: translateY(-10px) rotate(5deg); 
    }
    50% { 
        transform: translateY(0) rotate(0deg); 
    }
    75% { 
        transform: translateY(-5px) rotate(-5deg); 
    }
}

@keyframes linkPulse {
    0%, 100% { 
        opacity: 1;
        stroke-width: 6;
    }
    50% { 
        opacity: 0.8;
        stroke-width: 7;
    }
}

.logo-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo h1 {
    font-size: 3.5rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
    margin: 0;
    line-height: 1;
}

.logo .version {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 2px;
    padding: 2px 8px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 4px;
    letter-spacing: 1px;
}

.tagline {
    font-size: 1.1rem;
    color: var(--text-secondary);
    letter-spacing: 3px;
    margin-bottom: 25px;
    font-weight: 300;
}

.header-stats {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.stat-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    transition: var(--transition);
    cursor: default;
}

.stat-badge:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(102, 126, 234, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.badge-icon {
    font-size: 1.2rem;
}

.badge-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* =================================
   输入区域样式
   ================================= */
.input-section {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.8s ease-out 0.2s both;
    position: relative;
    overflow: hidden;
}

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

.section-header {
    text-align: center;
    margin-bottom: 30px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.input-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 8px;
    transition: var(--transition);
    margin-bottom: 20px;
}

.input-wrapper:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.input-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

#urlInput {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 1rem;
    color: var(--text-primary);
    padding: 12px 8px;
}

#urlInput::placeholder {
    color: var(--text-muted);
}

.check-btn {
    position: relative;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    overflow: hidden;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.check-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.check-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.check-btn:hover::before {
    width: 300px;
    height: 300px;
}

.check-btn:hover::after {
    left: 100%;
}

.check-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.5);
}

.check-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-loading {
    display: none;
    align-items: center;
    gap: 8px;
}

.check-btn.loading .btn-text {
    display: none;
}

.check-btn.loading .btn-loading {
    display: flex;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.input-tips {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.tip-item {
    color: var(--text-secondary);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 6px;
    transition: var(--transition);
}

.tip-item:hover {
    background: rgba(102, 126, 234, 0.1);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.tip-item svg {
    color: #38ef7d;
}

/* =================================
   统计卡片样式
   ================================= */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-gradient);
}

.stat-card.stat-success::before {
    background: var(--success-gradient);
}

.stat-card.stat-error::before {
    background: var(--error-gradient);
}

.stat-card.stat-time::before {
    background: var(--warning-gradient);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* =================================
   结果展示区域样式
   ================================= */
.results-section {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.results-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.results-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.filter-btn.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
}

.filter-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.export-btn {
    background: var(--success-gradient);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(17, 153, 142, 0.4);
}

.results-info {
    display: flex;
    gap: 30px;
    padding: 15px;
    background: var(--bg-input);
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.results-info strong {
    color: var(--text-primary);
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 10px;
}

.results-list::-webkit-scrollbar {
    width: 8px;
}

.results-list::-webkit-scrollbar-track {
    background: var(--bg-input);
    border-radius: 4px;
}

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

.results-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: var(--transition);
    animation: slideInRight 0.4s ease-out both;
}

.result-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(5px);
}

.result-url {
    flex: 1;
    color: var(--text-primary);
    word-break: break-all;
    margin-right: 15px;
    font-size: 0.95rem;
}

.result-status {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-success {
    background: linear-gradient(135deg, rgba(17, 153, 142, 0.2), rgba(56, 239, 125, 0.2));
    color: #38ef7d;
    border: 1px solid rgba(56, 239, 125, 0.3);
}

.status-error {
    background: linear-gradient(135deg, rgba(235, 51, 73, 0.2), rgba(244, 92, 67, 0.2));
    color: #f45c43;
    border: 1px solid rgba(244, 92, 67, 0.3);
}

.status-warning {
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.2), rgba(245, 87, 108, 0.2));
    color: #f5576c;
    border: 1px solid rgba(245, 87, 108, 0.3);
}

/* 筛选状态 */
.result-item.hidden {
    display: none;
}

/* =================================
   页脚样式
   ================================= */
.footer {
    text-align: center;
    margin-top: 80px;
    padding: 40px 20px;
    border-top: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-logo svg {
    filter: drop-shadow(0 0 10px rgba(102, 126, 234, 0.3));
}

.footer-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    padding: 5px 10px;
    border-radius: 5px;
}

.footer-link:hover {
    color: var(--text-primary);
    background: rgba(102, 126, 234, 0.1);
}

.copyright {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 20px;
}

/* =================================
   动画定义
   ================================= */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* =================================
   响应式设计
   ================================= */
@media (max-width: 768px) {
    .logo {
        flex-direction: column;
        gap: 15px;
    }
    
    .logo-icon {
        width: 50px;
        height: 50px;
    }
    
    .logo-text {
        align-items: center;
    }
    
    .logo h1 {
        font-size: 2.5rem;
    }
    
    .tagline {
        font-size: 0.9rem;
        letter-spacing: 2px;
    }
    
    .header-stats {
        gap: 10px;
    }
    
    .stat-badge {
        padding: 8px 15px;
        font-size: 0.85rem;
    }
    
    .input-section {
        padding: 30px 20px;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .input-wrapper {
        flex-direction: column;
    }
    
    .input-icon {
        display: none;
    }
    
    .check-btn {
        width: 100%;
    }
    
    .stats-section {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-icon {
        font-size: 2rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .results-actions {
        width: 100%;
    }
    
    .filter-btn,
    .export-btn {
        flex: 1;
        justify-content: center;
    }
    
    .result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .result-url {
        margin-right: 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px 15px;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .header-stats {
        width: 100%;
    }
    
    .stat-badge {
        flex: 1;
        justify-content: center;
    }
    
    .stats-section {
        grid-template-columns: 1fr;
    }
    
    .input-tips {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }
    
    .tip-item {
        justify-content: center;
    }
}

