* {
    box-sizing: border-box;
}

.yt-trend-pro-container {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    max-width: 1100px;
    margin: 40px auto;
    padding: 30px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.08);
    color: #1a1a1a;
}

@media (max-width: 768px) {
    .yt-trend-pro-container {
        margin: 20px;
        padding: 20px;
    }
}

/* Header Section */
.yt-trend-header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.yt-trend-header::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #ff0000, #ff4d4d);
    border-radius: 2px;
}

.yt-trend-logo {
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.yt-trend-header h2 {
    font-size: 2.8rem;
    font-weight: 900;
    margin: 0 0 15px 0;
    background: linear-gradient(135deg, #ff0000 0%, #ff4d4d 50%, #cc0000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
}

@media (max-width: 600px) {
    .yt-trend-header h2 {
        font-size: 2rem;
    }
}

.yt-trend-header p {
    color: #666;
    font-size: 1.15rem;
    font-weight: 500;
    margin: 0;
}

/* Search Box */
.yt-trend-search-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 35px;
    border-radius: 18px;
    margin-bottom: 45px;
    border: 2px solid #eee;
    box-shadow: 0 8px 24px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
}

.yt-trend-search-box:hover {
    box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}

.yt-trend-input-group {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 600px) {
    .yt-trend-input-group {
        grid-template-columns: 1fr;
    }
}

.yt-input-wrapper {
    position: relative;
}

.yt-input-wrapper label {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 10px;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.yt-input-wrapper input, 
.yt-input-wrapper select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e1e1e1;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    font-family: inherit;
}

.yt-input-wrapper input::placeholder {
    color: #999;
}

.yt-input-wrapper input:focus, 
.yt-input-wrapper select:focus {
    border-color: #ff0000;
    outline: none;
    box-shadow: 0 0 0 5px rgba(255, 0, 0, 0.1);
    background: #fff;
}

#yt-analyze-btn {
    width: 100%;
    background: linear-gradient(135deg, #ff0000 0%, #ff4d4d 100%);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(255, 0, 0, 0.3);
}

#yt-analyze-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.5s ease;
}

#yt-analyze-btn:hover::before {
    left: 100%;
}

#yt-analyze-btn:hover {
    background: linear-gradient(135deg, #cc0000 0%, #ff0000 100%);
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(255, 0, 0, 0.4);
}

#yt-analyze-btn:active {
    transform: translateY(-1px);
}

#yt-analyze-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-text, .btn-loader {
    display: inline-block;
}

/* Loading Spinner */
.yt-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ff0000;
    border-right: 4px solid #ff6666;
    border-radius: 50%;
    animation: yt-spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

#yt-loading {
    text-align: center;
    padding: 60px 20px;
}

#yt-loading p {
    font-weight: 600;
    color: #666;
    font-size: 1.1rem;
}

/* Dashboard */
.yt-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 45px;
}

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

.yt-stat-card {
    background: white;
    padding: 30px;
    border-radius: 16px;
    border: 2px solid #eee;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.yt-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff0000, #ff4d4d);
}

.yt-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.08);
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 15px;
    font-weight: 700;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #ff0000, #ff4d4d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.yt-intensity-meter {
    width: 100%;
    height: 14px;
    background: #eee;
    border-radius: 7px;
    overflow: hidden;
    margin-top: 15px;
    position: relative;
}

#yt-intensity-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffb3b3, #ff6666, #ff0000);
    transition: width 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 7px;
}

/* Tabs */
.yt-tabs {
    display: flex;
    border-bottom: 3px solid #eee;
    margin-bottom: 35px;
    overflow-x: auto;
    gap: 10px;
}

.yt-tab-btn {
    padding: 14px 24px;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 700;
    color: #999;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.yt-tab-btn:hover {
    color: #ff6666;
}

.yt-tab-btn.active {
    color: #ff0000;
    border-bottom-color: #ff0000;
}

/* Table */
.yt-table-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 2px solid #eee;
    background: white;
}

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

.yt-data-table th {
    text-align: left;
    padding: 18px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    color: #333;
    font-weight: 800;
    border-bottom: 2px solid #eee;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.yt-data-table tbody tr {
    transition: all 0.2s ease;
}

.yt-data-table tbody tr:hover {
    background: #f8f9fa;
}

.yt-data-table td {
    padding: 18px;
    border-bottom: 1px solid #eee;
    font-weight: 500;
}

.yt-data-table tbody tr:last-child td {
    border-bottom: none;
}

.yt-score-bar {
    width: 120px;
    height: 10px;
    background: #eee;
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.yt-score-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6666, #ff0000);
    border-radius: 5px;
    transition: width 0.6s ease;
}

.trend-up { 
    color: #28a745; 
    font-weight: 800;
    font-size: 1.1rem;
}

.trend-down { 
    color: #dc3545; 
    font-weight: 800;
    font-size: 1.1rem;
}

.copy-btn {
    background: linear-gradient(135deg, #f1f1f1 0%, #e8e8e8 100%);
    border: 1px solid #ddd;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 700;
    transition: all 0.2s ease;
    color: #333;
}

.copy-btn:hover {
    background: linear-gradient(135deg, #e8e8e8 0%, #ddd 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.copy-btn.copied {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border-color: #28a745;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .yt-trend-pro-container {
        border-radius: 12px;
    }

    .yt-trend-header h2 {
        font-size: 1.8rem;
    }

    .yt-stat-value {
        font-size: 2rem;
    }

    .yt-data-table th, .yt-data-table td {
        padding: 12px;
        font-size: 0.9rem;
    }

    .yt-score-bar {
        width: 80px;
    }
}

/* Animation for dashboard appearance */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#yt-dashboard {
    animation: slideUp 0.5s ease;
}

/* Accessibility */
button:focus {
    outline: 2px solid #ff0000;
    outline-offset: 2px;
}

input:focus, select:focus {
    outline: none;
}
