/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header h1 i {
    margin-right: 15px;
    color: #ffd700;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 主要内容区域 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 输入区域 */
.input-section {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 600px;
    margin-bottom: 30px;
}

.input-group {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.url-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
}

.url-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.detect-btn {
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 140px;
    justify-content: center;
}

.detect-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.detect-btn:active {
    transform: translateY(0);
}

.detect-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.url-examples {
    text-align: center;
    color: #666;
}

.url-examples code {
    background: #f8f9fa;
    padding: 5px 10px;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    color: #667eea;
}

/* 加载动画区域 */
.loading-section {
    background: white;
    padding: 60px 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 600px;
    text-align: center;
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.loading-spinner {
    position: relative;
    width: 80px;
    height: 80px;
}

.spinner {
    width: 100%;
    height: 100%;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.loading-text p {
    color: #666;
    margin-bottom: 20px;
}

.loading-dots {
    display: flex;
    gap: 5px;
    justify-content: center;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    background: #667eea;
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* 结果展示区域 */
.result-section {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 800px;
    margin-bottom: 30px;
}

.result-container {
    animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.result-header h3 {
    color: #333;
    font-size: 1.8rem;
}

.result-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #d4edda;
    color: #155724;
    border-radius: 20px;
    font-weight: 600;
}

.result-status i {
    color: #28a745;
}

.result-content {
    display: grid;
    gap: 30px;
}

.video-info, .sensitive-content {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    border-left: 4px solid #667eea;
}

.video-info h4, .sensitive-content h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.video-info p {
    margin-bottom: 10px;
    color: #666;
}

.video-info strong {
    color: #333;
}

.sensitive-result {
    margin-top: 15px;
}

.sensitive-item {
    background: white;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 10px;
    border-left: 4px solid #dc3545;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.sensitive-item.safe {
    border-left-color: #28a745;
}

.sensitive-item h5 {
    color: #dc3545;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.sensitive-item.safe h5 {
    color: #28a745;
}

.sensitive-item p {
    color: #666;
    margin-bottom: 5px;
}

.sensitive-item .confidence {
    font-size: 0.9rem;
    color: #999;
    font-style: italic;
}

/* 错误信息区域 */
.error-section {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 600px;
    text-align: center;
}

.error-container i {
    font-size: 3rem;
    color: #dc3545;
    margin-bottom: 20px;
}

.error-container h3 {
    color: #dc3545;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.error-container p {
    color: #666;
    margin-bottom: 25px;
}

.retry-btn {
    padding: 12px 30px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    background: #c82333;
    transform: translateY(-2px);
}

/* 页脚 */
.footer {
    text-align: center;
    color: white;
    margin-top: 40px;
    opacity: 0.9;
}

.footer p {
    margin: 8px 0;
}

.feedback-email {
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.feedback-email i {
    color: #ffd700;
}

.feedback-email a {
    color: white;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    padding-bottom: 2px;
}

.feedback-email a:hover {
    color: #ffd700;
    border-bottom-color: #ffd700;
    transform: translateY(-1px);
}

/* 工具类 */
.hidden {
    display: none !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .detect-btn {
        width: 100%;
    }
    
    .input-section, .loading-section, .result-section, .error-section {
        padding: 25px;
    }
    
    .result-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .header h1 i {
        margin-right: 10px;
    }
    
    .input-section, .loading-section, .result-section, .error-section {
        padding: 20px;
    }
}

/* User Guide Button */
.user-guide-header {
    text-align: center;
    margin-bottom: 20px;
}

.user-guide-btn {
    padding: 14px 32px;
    background: #fff;
    color: #764ba2;
    border: 2px solid #764ba2;
    border-radius: 20px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.09);
}

.user-guide-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.user-guide-btn i {
    font-size: 16px;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideInUp 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 18px;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.guide-section {
    margin-bottom: 30px;
}

.guide-section h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.3rem;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

/* Rating Items */
.rating-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.rating-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.rating-badge {
    min-width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
}

.rating-g {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.rating-pg {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
}

.rating-pg13 {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
}

.rating-nc16 {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
}

.rating-m18 {
    background: linear-gradient(135deg, #c92a2a 0%, #a61e4d 100%);
}

.rating-r {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.rating-info h4 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 1.1rem;
}

.rating-info p {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
}

/* Advisory Items */
.advisory-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.advisory-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.advisory-badge {
    min-width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
}

.advisory-text {
    color: #333;
    font-size: 0.95rem;
}

/* How It Works */
.how-it-works {
    padding-left: 25px;
}

.how-it-works li {
    margin-bottom: 12px;
    color: #666;
    line-height: 1.6;
}

.how-it-works li::marker {
    color: #667eea;
    font-weight: bold;
}

/* Note Section */
.note-text {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px;
    border-radius: 8px;
    color: #856404;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.6;
}

.note-text i {
    color: #ffc107;
    margin-top: 3px;
}

/* Responsive for Modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .modal-header {
        padding: 20px;
    }

    .modal-header h2 {
        font-size: 1.4rem;
    }

    .modal-body {
        padding: 20px;
    }

    .rating-item {
        flex-direction: column;
        text-align: center;
    }

    .rating-badge {
        min-width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
}

