* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #ff0000, #cc0000);
    min-height: 100vh;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 900px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: fadeIn 0.8s ease;
}

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

/* Header */
.header {
    background: linear-gradient(to right, #ff0000, #ff3333);
    color: white;
    padding: 30px;
    text-align: center;
}

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

.logo i {
    font-size: 3em;
}

.logo h1 {
    font-size: 2.2em;
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
    margin-top: 10px;
}

/* Main Content */
.main {
    padding: 30px;
}

/* Input Section */
.input-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 2px dashed #dee2e6;
}

.input-group {
    display: flex;
    align-items: center;
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    border: 2px solid #e9ecef;
    transition: border-color 0.3s;
}

.input-group:hover {
    border-color: #ff0000;
}

.input-group i {
    font-size: 1.2em;
    color: #ff0000;
    margin-right: 15px;
    min-width: 30px;
}

.input-group input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    padding: 5px;
}

.api-key-input {
    margin-top: 20px;
    padding: 15px;
    background: #fff3cd;
    border-radius: 10px;
    border-left: 4px solid #ffc107;
}

.api-key-input label {
    display: block;
    color: #856404;
    font-weight: bold;
    margin-bottom: 10px;
}

.api-key-input input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ffc107;
    border-radius: 8px;
    font-size: 15px;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(to right, #ff0000, #ff3333);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 20px auto;
    width: 100%;
    max-width: 300px;
    transition: all 0.3s;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 15px rgba(255, 0, 0, 0.2);
}

.btn-primary:active {
    transform: translateY(-1px);
}

/* Loading */
.loading {
    display: none;
    text-align: center;
    padding: 30px;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #ff0000;
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

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

/* Results */
.result {
    margin-top: 30px;
    display: none;
}

.video-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
}

.video-thumbnail {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-bottom: 3px solid #ff0000;
}

.video-info {
    padding: 25px;
}

.video-title {
    color: #333;
    font-size: 1.5em;
    margin-bottom: 15px;
    line-height: 1.4;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.info-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #ff0000;
}

.info-item h3 {
    color: #ff0000;
    margin-bottom: 10px;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.tag {
    background: #ffe6e6;
    color: #cc0000;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
}

.description-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    max-height: 300px;
    overflow-y: auto;
    line-height: 1.6;
}

/* Instructions */
.instructions {
    background: #e7f3ff;
    padding: 25px;
    border-radius: 12px;
    margin-top: 30px;
    border-left: 4px solid #007bff;
}

.instructions h3 {
    color: #0056b3;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.instructions ol {
    margin-left: 20px;
    line-height: 1.8;
}

.instructions li {
    margin-bottom: 10px;
    padding-left: 10px;
}

/* Footer */
footer {
    text-align: center;
    padding: 25px;
    background: #f8f9fa;
    color: #666;
    border-top: 1px solid #dee2e6;
}

.warning {
    color: #856404;
    background: #fff3cd;
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        margin: 10px;
    }
    
    .logo h1 {
        font-size: 1.8em;
    }
    
    .video-thumbnail {
        height: 200px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
}

.error {
    background: #f8d7da;
    color: #721c24;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    border-left: 4px solid #dc3545;
}


/* =========================================== */
/* STYLE CHO FULL INFO APP */
/* =========================================== */

/* Tabs System */
.tabs-container {
    margin-top: 20px;
}

.tabs-header {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 12px 24px;
    background: #f8f9fa;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    color: #666;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.tab-btn.active {
    background: #ff0000;
    color: white;
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.2);
}

.tab-pane {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-pane.active {
    display: block;
}

/* Overview Tab */
.overview-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 992px) {
    .overview-grid {
        grid-template-columns: 1fr;
    }
}

.video-preview {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.preview-info {
    margin-top: 15px;
}

.btn-watch {
    background: #ff0000;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
}

.basic-info h2 {
    margin-top: 0;
    color: #333;
    line-height: 1.4;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.info-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: transform 0.3s;
}

.info-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.info-card i {
    font-size: 24px;
    color: #ff0000;
    margin-bottom: 10px;
}

.info-card h4 {
    margin: 5px 0;
    color: #666;
    font-size: 14px;
}

.info-card p {
    margin: 0;
    font-weight: bold;
    color: #333;
}

.quick-stats {
    display: flex;
    justify-content: space-around;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    border-radius: 12px;
    color: white;
    margin-top: 20px;
}

.stat {
    text-align: center;
}

.stat i {
    font-size: 28px;
    margin-bottom: 10px;
}

.stat span {
    display: block;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat small {
    font-size: 12px;
    opacity: 0.9;
}

.description-box {
    background: white;
    padding: 25px;
    border-radius: 12px;
    border-left: 4px solid #3498db;
    margin-bottom: 30px;
}

.description-box h3 {
    color: #3498db;
    margin-top: 0;
}

.description-meta {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    color: #666;
    font-size: 14px;
}

.tags-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.tag {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    padding: 8px 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tag small {
    background: #ff0000;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* Details Tab */
.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.detail-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #eee;
}

.detail-section.full-width {
    grid-column: 1 / -1;
}

.details-table {
    width: 100%;
    border-collapse: collapse;
}

.details-table tr {
    border-bottom: 1px solid #f8f9fa;
}

.details-table td {
    padding: 10px 0;
}

.details-table td:first-child {
    color: #666;
    width: 40%;
}

.details-table td:last-child {
    font-weight: 500;
}

.thumbnails-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.thumbnail-item {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s;
}

.thumbnail-item:hover {
    transform: scale(1.05);
}

.thumbnail-info {
    padding: 10px;
    text-align: center;
    font-size: 12px;
}

.btn-small {
    background: #007bff;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 5px;
    font-size: 11px;
}

.topics-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.topic-item {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.topic-item a {
    color: #333;
    text-decoration: none;
    word-break: break-all;
}

.topic-item a:hover {
    color: #ff0000;
}

/* Statistics Tab */
.stats-container {
    background: white;
    padding: 25px;
    border-radius: 12px;
}

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

.stat-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.stat-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.stat-progress {
    height: 6px;
    background: #dee2e6;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-bar {
    height: 100%;
    transition: width 1s ease;
}

.stat-percent {
    color: #666;
    font-size: 14px;
}

.charts-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin: 30px 0;
}

@media (max-width: 768px) {
    .charts-container {
        grid-template-columns: 1fr;
    }
}

.chart-box {
    background: white;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #eee;
}

.chart-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 15px 0;
}

.chart-label {
    width: 100px;
    color: #666;
}

.chart-track {
    flex: 1;
    height: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    overflow: hidden;
}

.chart-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff7e5f, #feb47b);
    transition: width 1s ease;
}

.chart-value {
    width: 60px;
    text-align: right;
    font-weight: bold;
}

.score-display {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-top: 20px;
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
    font-weight: bold;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.score-info {
    flex: 1;
}

.channel-stats {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-top: 30px;
}

.channel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.channel-stat {
    background: white;
    padding: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.channel-stat i {
    font-size: 32px;
    color: #ff0000;
}

.channel-stat strong {
    display: block;
    font-size: 20px;
    color: #333;
}

.channel-stat small {
    color: #666;
    font-size: 14px;
}

/* Analysis Tab */
.analysis-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.analysis-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #eee;
}

.analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.analysis-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.analysis-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.analysis-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.analysis-table tr {
    border-bottom: 1px solid #eee;
}

.analysis-table td {
    padding: 12px 0;
}

.analysis-table td:first-child {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #333;
}

.analysis-table td:nth-child(2) {
    color: #666;
}

.recommendations {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.recommendation {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid;
}

.recommendation.high {
    background: #ffe6e6;
    border-left-color: #dc3545;
}

.recommendation.medium {
    background: #fff3cd;
    border-left-color: #ffc107;
}

.recommendation.low {
    background: #d4edda;
    border-left-color: #28a745;
}

.recommendation i {
    font-size: 24px;
    min-width: 30px;
}

.recommendation.high i {
    color: #dc3545;
}

.recommendation.medium i {
    color: #ffc107;
}

.recommendation.low i {
    color: #28a745;
}

/* Raw Data Tab */
.rawdata-container {
    background: white;
    padding: 25px;
    border-radius: 12px;
}

.rawdata-info {
    color: #666;
    margin-bottom: 20px;
}

.rawdata-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.btn-copy, .btn-download, .btn-toggle {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-copy {
    background: #28a745;
    color: white;
}

.btn-download {
    background: #17a2b8;
    color: white;
}

.btn-toggle {
    background: #6c757d;
    color: white;
}

.rawdata-content {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    max-height: 500px;
    overflow-y: auto;
}

.rawdata-content pre {
    margin: 0;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.5;
}

/* Error Styles */
.error {
    background: #f8d7da;
    color: #721c24;
    padding: 30px;
    border-radius: 12px;
    border-left: 4px solid #dc3545;
}

.error h3 {
    color: #dc3545;
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.error-details {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f5c6cb;
}

.error-details h4 {
    color: #721c24;
    margin-bottom: 10px;
}

.error-details ul, .error-details ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.error-details li {
    margin-bottom: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tabs-header {
        flex-direction: column;
    }
    
    .tab-btn {
        width: 100%;
        justify-content: center;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-stats {
        flex-wrap: wrap;
    }
    
    .stat {
        width: 45%;
        margin-bottom: 15px;
    }
    
    .rawdata-actions {
        flex-direction: column;
    }
    
    .btn-copy, .btn-download, .btn-toggle {
        width: 100%;
        justify-content: center;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}