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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.header h1 {
    color: #4c51bf;
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
}

.header h1 i {
    margin-right: 15px;
    color: #e53e3e;
}

.header p {
    color: #666;
    font-size: 1.1em;
}

/* 查询区域样式 */
.query-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.input-group {
    margin-bottom: 0;
}

.input-group label {
    display: block;
    margin-bottom: 15px;
    font-weight: 600;
    color: #4c51bf;
    font-size: 1.1em;
}

.input-wrapper {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

#videoUrl {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    min-width: 200px;
}

#videoUrl:focus {
    outline: none;
    border-color: #4c51bf;
    box-shadow: 0 0 0 3px rgba(76, 81, 191, 0.1);
}

.query-button {
    padding: 15px 25px;
    background: linear-gradient(135deg, #4c51bf, #667eea);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.query-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(76, 81, 191, 0.3);
}

.query-button:active {
    transform: translateY(0);
}

.query-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 加载状态样式 */
.loading {
    text-align: center;
    padding: 40px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #4c51bf;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* 结果显示样式 */
.result-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.result-section h3 {
    color: #4c51bf;
    margin-bottom: 20px;
    font-size: 1.4em;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
}

.result-content {
    display: grid;
    gap: 20px;
}

.video-info {
    background: #f7fafc;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #4c51bf;
}

.video-info h4 {
    color: #2d3748;
    font-size: 1.3em;
    margin-bottom: 10px;
    font-weight: 700;
}

.video-info .author {
    color: #4a5568;
    margin-bottom: 5px;
    font-weight: 600;
}

.video-info .url {
    color: #718096;
    font-size: 0.9em;
    word-break: break-all;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.stat-item {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.stat-item:hover {
    border-color: #4c51bf;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(76, 81, 191, 0.15);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e53e3e, #c53030);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2em;
}

.stat-info {
    flex: 1;
}

.stat-label {
    color: #718096;
    font-size: 0.9em;
    margin-bottom: 5px;
    font-weight: 600;
}

.stat-value {
    color: #2d3748;
    font-size: 1.4em;
    font-weight: 700;
}

.query-time {
    text-align: center;
    color: #718096;
    font-size: 0.9em;
    padding: 15px;
    background: #f7fafc;
    border-radius: 8px;
    border-top: 2px solid #e2e8f0;
}

.query-time i {
    margin-right: 5px;
    color: #4c51bf;
}

/* 旧的结果项样式保留以兼容 */
.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f7fafc;
    border-radius: 10px;
    border-left: 4px solid #4c51bf;
}

.result-item .label {
    font-weight: 600;
    color: #4a5568;
}

.result-item .value {
    font-size: 1.1em;
    color: #2d3748;
    font-weight: 700;
}

/* 错误信息样式 */
.error-section {
    background: rgba(254, 226, 226, 0.95);
    border: 1px solid #feb2b2;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

.error-content {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #c53030;
}

.error-content i {
    font-size: 1.2em;
}

/* 使用说明样式 */
.info-section {
    background: rgba(237, 242, 247, 0.95);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.info-section h3 {
    color: #4a5568;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.info-section ul {
    list-style: none;
}

.info-section li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
    color: #4a5568;
}

.info-section li:before {
    content: "•";
    color: #4c51bf;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* 隐藏类 */
.hidden {
    display: none !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2em;
    }
    
    .query-section, .result-section, .loading, .info-section {
        padding: 20px;
    }
    
    .input-wrapper {
        flex-direction: column;
    }
    
    #videoUrl, .query-button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8em;
    }
    
    .query-section, .result-section, .loading, .info-section {
        padding: 15px;
    }
    
    .result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* 可点击链接样式 */
.url-link {
    color: #3182ce;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.url-link:hover {
    color: #2c5282;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.url-link:visited {
    color: #805ad5;
}

.url-link:visited:hover {
    color: #6b46c1;
}

/* 成功消息样式 */
.success-message {
    color: #e53e3e !important;
    font-size: 1.4em !important;
    font-weight: 700 !important;
    margin-bottom: 15px !important;
}

/* 播放量图标黑色样式 */
.stat-item:first-child .stat-icon {
    background: linear-gradient(135deg, #2d3748, #1a202c) !important;
}

/* 分享图标金黄色样式 */
.stat-item:nth-child(3) .stat-icon {
    background: linear-gradient(135deg, #f6e05e, #d69e2e) !important;
}