/* 全局样式 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
}

/* 导航栏样式 */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

/* 主内容区域 */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* 卡片样式 */
.card {
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
    border: none;
}

.card-header {
    border-radius: 0.5rem 0.5rem 0 0 !important;
    font-weight: 600;
}

/* 表单样式 */
.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* 按钮样式 */
.btn {
    border-radius: 0.25rem;
    padding: 0.375rem 1rem;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0069d9;
    border-color: #0062cc;
}

/* 提取表单 */
.extract-form {
    background-color: #fff;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.extract-form .form-control {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    height: auto;
}

/* 结果区域 */
.result-container {
    display: none;
    margin-top: 2rem;
}

.video-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 768px) {
    .video-info {
        flex-direction: row;
    }
}

.video-cover {
    width: 100%;
    max-width: 300px;
    border-radius: 0.5rem;
    overflow: hidden;
}

.video-cover img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.video-details {
    flex: 1;
}

.video-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* 加载动画 */
.loading-container {
    display: none;
    text-align: center;
    margin: 2rem 0;
}

.spinner {
    width: 3rem;
    height: 3rem;
}

/* 广告位样式 */
.ad-container {
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.ad-top, .ad-bottom {
    width: 100%;
    min-height: 90px;
    background-color: #f1f1f1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    overflow: hidden;
}

.ad-sidebar {
    width: 100%;
    min-height: 250px;
    background-color: #f1f1f1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    overflow: hidden;
}

/* 页脚样式 */
footer {
    background-color: #343a40;
    color: #000;
    padding: 2rem 0;
    margin-top: 3rem;
}

footer a {
    color: #000;
    text-decoration: none;
}

footer a:hover {
    color: #333;
    text-decoration: underline;
}

.footer-text {
    font-size: 13px;
}

/* 管理后台样式 */
.admin-dashboard .card {
    height: 100%;
    transition: transform 0.2s;
}

.admin-dashboard .card:hover {
    transform: translateY(-5px);
}

.admin-dashboard .card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.stats-card {
    text-align: center;
    padding: 1.5rem;
}

.stats-card .stats-value {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stats-card .stats-label {
    font-size: 1rem;
    color: #6c757d;
}

/* 平台图标 */
.platform-icon {
    width: 24px;
    height: 24px;
    margin-right: 0.5rem;
}

/* 响应式调整 */
@media (max-width: 767.98px) {
    .extract-form {
        padding: 1.5rem;
    }
    
    .video-cover {
        max-width: 100%;
    }
    
    .video-actions {
        flex-direction: column;
    }
    
    .video-actions .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    /* 调整结果区域在小屏幕上的显示 */
    #result .row {
        flex-direction: column;
    }
    
    #result .col-md-4, #result .col-md-8 {
        width: 100%;
        max-width: 100%;
    }
    
    /* 调整模态框在小屏幕上的显示 */
    .modal-dialog {
        margin: 10px;
    }
    
    .modal-content {
        max-height: calc(100vh - 20px);
        overflow-y: auto;
    }
}

/* 平板设备优化 */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* 调整结果区域在平板上的显示 */
    #result .col-md-4 {
        flex: 0 0 40%;
        max-width: 40%;
    }
    
    #result .col-md-8 {
        flex: 0 0 60%;
        max-width: 60%;
    }
    
    /* 调整图片浏览在平板上的显示 */
    #image-container .col-md-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}
