/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* 头部 */
.header {
    text-align: center;
    margin-bottom: 2rem;
}

.header h1 {
    color: #202124;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.header p {
    color: #5f6368;
    font-size: 1rem;
}

/* 输入区域 */
.input-section {
    margin-bottom: 2rem;
}

.input-wrapper {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

#video-url {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

#video-url:focus {
    border-color: #1a73e8;
}

.error-message {
    color: #d93025;
    font-size: 0.9rem;
    display: none;
}

/* 按钮样式 */
.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.primary-btn {
    background-color: #1a73e8;
    color: white;
}

.primary-btn:hover {
    background-color: #1557b0;
}

.secondary-btn {
    background-color: #f1f3f4;
    color: #202124;
}

.secondary-btn:hover {
    background-color: #e8eaed;
}

/* 视频卡片 */
.video-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    overflow: hidden;
    margin-bottom: 2rem;
}

.card-header {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.thumbnail {
    width: 180px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
}

.video-meta {
    flex: 1;
}

#video-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #202124;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.meta-details {
    color: #5f6368;
    font-size: 0.9rem;
}

.card-body {
    padding: 1rem;
}

.selection-group {
    margin-bottom: 1rem;
}

.selection-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #202124;
}

.form-select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-size: 1rem;
    outline: none;
    background-color: white;
}

.form-select:focus {
    border-color: #1a73e8;
}

.button-group {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

/* 加载状态 */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f1f3f4;
    border-top: 4px solid #1a73e8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

/* 响应式适配 */
@media (max-width: 600px) {
    .card-header {
        flex-direction: column;
    }
    .thumbnail {
        width: 100%;
        height: auto;
    }
    .input-wrapper, .button-group {
        flex-direction: column;
    }
}