/*
 * File: css/youtube-analytics.css
 * Description: Golden Standard Styles - Fixed Grid Alignment
 */

.full-width-container {
    max-width: 1400px;
}

.analytics-workspace {
    display: flex;
    flex-direction: column;
    gap: 30px;
    min-height: 600px;
    margin-bottom: 40px;
}

/* Search Panel */
.search-panel {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid #e0e0e0;
    text-align: center;
}

.search-box { max-width: 600px; margin: 0 auto; }
.input-group { display: flex; gap: 10px; position: relative; }
.input-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); font-size: 1.2rem; }

#channelInput {
    flex: 1;
    padding: 15px 15px 15px 45px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s;
}

#channelInput:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 4px rgba(147, 112, 219, 0.1);
}

/* --- PROFILE CARD --- */
.profile-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid #e0e0e0;
    margin-bottom: 30px;
}

.channel-banner {
    height: 150px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    background-size: cover;
    background-position: center;
}

.channel-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 5px solid white;
    background-color: #eee;
    background-size: cover;
    background-position: center;
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.channel-info {
    padding: 70px 30px 30px;
    text-align: center;
}

.channel-info h2 { margin: 0 0 10px; font-size: 1.8rem; color: var(--text-dark); }
.channel-info p { color: #666; max-width: 700px; margin: 0 auto 15px; }

.channel-meta {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.meta-tag {
    background: #f0f2f5;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #555;
}

/* --- 12-GRID STATS (FIXED ALIGNMENT) --- */
.stats-grid-detailed {
    display: grid;
    /* Force 4 equal columns on desktop */
    grid-template-columns: repeat(4, 1fr); 
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    border-radius: 15px;
    padding: 20px;
    color: white;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    /* Ensure equal height */
    min-height: 100px; 
}

.stat-card:hover { transform: translateY(-5px); }

/* The 12 Gradients */
.gradient-1 { background: linear-gradient(135deg, #667eea, #764ba2); }
.gradient-2 { background: linear-gradient(135deg, #f093fb, #f5576c); }
.gradient-3 { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.gradient-4 { background: linear-gradient(135deg, #43e97b, #38f9d7); color: #333; }
.gradient-5 { background: linear-gradient(135deg, #fa709a, #fee140); color: #333; }
.gradient-6 { background: linear-gradient(135deg, #a18cd1, #fbc2eb); }
.gradient-7 { background: linear-gradient(135deg, #ff9a9e, #fecfef); color: #333; }
.gradient-8 { background: linear-gradient(135deg, #fbc2eb, #a6c1ee); }
.gradient-9 { background: linear-gradient(135deg, #fdcbf1, #e6dee9); color: #333; }
.gradient-10 { background: linear-gradient(135deg, #a8edea, #fed6e3); color: #333; }
.gradient-11 { background: linear-gradient(135deg, #84fab0, #8fd3f4); color: #333; }
.gradient-12 { background: linear-gradient(135deg, #e0c3fc, #8ec5fc); color: #333; }

.stat-icon { font-size: 2rem; opacity: 0.8; flex-shrink: 0; }
.stat-data { display: flex; flex-direction: column; overflow: hidden; }
.stat-value { font-size: 1.2rem; font-weight: 800; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-label { font-size: 0.75rem; text-transform: uppercase; opacity: 0.9; }

/* Revenue Card */
.revenue-card {
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    border: 1px solid #e0e0e0;
    margin-bottom: 30px;
}

.revenue-row {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin: 20px 0;
}

.rev-grad {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #11998e, #38ef7d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 5px 0;
}

.rev-note { font-size: 0.85rem; color: #888; font-style: italic; }

/* Charts */
.charts-area {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.chart-card {
    background: #fff;
    border-radius: 16px;
    padding: 25px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
}

.chart-card h3 { text-align: center; margin-bottom: 15px; color: var(--text-dark); }

/* Empty State */
.empty-state {
    text-align: center;
    padding: 100px 20px;
    background: #fff;
    border-radius: 16px;
    border: 2px dashed #e0e0e0;
    color: #999;
}
.empty-icon { font-size: 3rem; margin-bottom: 15px; opacity: 0.5; }

/* Notification Override (Golden Standard) */
#notification {
    top: 30px !important;
    bottom: auto !important;
    right: auto !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    border-radius: 12px !important;
    padding: 15px 30px !important;
    font-size: 1rem !important;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 300px !important;
    z-index: 99999 !important;
}

/* Responsive */
@media (max-width: 1200px) {
    .stats-grid-detailed { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 992px) {
    .stats-grid-detailed { grid-template-columns: repeat(2, 1fr); }
    .charts-area { grid-template-columns: 1fr; }
    .revenue-row { flex-direction: column; gap: 20px; }
}

@media (max-width: 576px) {
    .stats-grid-detailed { grid-template-columns: 1fr; }
}