/* Utility Classes for Common Patterns */

/* Colors */
.text-primary-color { color: var(--primary-color); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); text-decoration: none; }

/* Text styles */
.text-secondary-small {
    color: var(--text-secondary);
    font-size: 0.9em;
}

.font-bold { font-weight: bold; }

/* Spacing utilities */
.mb-20 { margin-bottom: 20px; }
.mt-15 { margin-top: 15px; }
.mt-40 { margin-top: 40px; }
.mt-40-center {
    margin-top: 40px;
    text-align: center;
}

/* Layout utilities */
.flex-center-gap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.flex-1 { flex: 1; }

/* Form labels */
.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--text-primary);
}

/* Icon sizes */
.icon-16 {
    width: 16px;
    height: 16px;
}

/* Transform utilities */
.scale-120 { transform: scale(1.2); }

/* Alert boxes */
.alert-danger {
    background: var(--danger-color);
    color: white;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.alert-success {
    background: var(--success-color);
    color: white;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.alert-warning {
    background: var(--warning-color);
    color: white;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* Common card pattern */
.card {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid var(--border-color);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
    box-shadow: 0 6px 20px var(--shadow-color);
    transform: translateY(-2px);
}

/* Empty state */
.empty-state {
    text-align: center;
    color: var(--text-secondary);
    padding: 40px 20px;
}

.empty-state-icon {
    font-size: 2.5em;
    margin-bottom: 12px;
}

.empty-state h3 {
    color: var(--text-primary);
    margin: 0 0 8px;
    font-size: 1.1em;
}

.empty-state p {
    margin: 0 0 20px;
    font-size: 0.95em;
}

/* Responsive image */
.responsive-img {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin: 0.5rem 0;
}

/* Header section */
.header-section {
    text-align: center;
    margin-bottom: 2rem;
}

.header-section h1 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin: 0;
}

/* Hero section (home page) */
.hero {
    text-align: center;
    margin-bottom: 40px;
    padding: 50px 30px 40px;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--secondary-color) 100%);
    border-radius: 12px;
    color: white;
}

.hero h2 {
    margin: 0 0 12px;
    font-size: 2em;
    color: white;
}

.hero .subtitle {
    margin: 0 0 28px;
    font-size: 1.15em;
    opacity: 0.9;
    color: white;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 36px;
}

.hero-buttons .btn {
    background: white;
    color: var(--secondary-color);
    font-weight: 600;
}

.hero-buttons .btn:hover {
    background: rgba(255, 255, 255, 0.85);
}

/* Stat bar */
.stat-bar {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 28px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 1.8em;
    font-weight: 700;
    color: white;
    line-height: 1;
}

.stat-label {
    font-size: 0.8em;
    opacity: 0.75;
    margin-top: 4px;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Home page sections */
.home-section {
    margin-top: 40px;
}

.home-section h2 {
    margin: 0 0 20px;
}

/* Top tracks list */
.top-track-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    margin-bottom: 12px;
}

.top-track-rank {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--primary-color);
    min-width: 30px;
}

.top-track-info {
    flex: 1;
}

.top-track-title {
    font-weight: bold;
    font-size: 1.05em;
}

.top-track-plays {
    text-align: center;
    color: var(--text-secondary);
}

.top-track-plays-count {
    font-weight: bold;
}

.top-track-plays-label {
    font-size: 0.8em;
}

.top-track-streamers {
    font-size: 0.8em;
    color: var(--text-secondary);
    text-align: right;
}

/* Recent tracks list */
.recent-track-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 10px;
}

.recent-track-info {
    flex: 1;
}

.recent-track-title {
    font-weight: bold;
}

.recent-track-streamer {
    text-align: center;
    text-decoration: none;
    color: var(--primary-color);
}

.recent-track-streamer img {
    width: 32px;
    height: 32px;
    border-radius: 16px;
    object-fit: cover;
    border: 1px solid var(--border-color);
    display: block;
    margin: 0 auto;
}

.recent-track-streamer-name {
    font-size: 0.8em;
    margin-top: 4px;
}

.recent-track-time {
    text-align: right;
    color: var(--text-secondary);
    font-size: 0.8em;
    min-width: 80px;
}

/* Home page CTA for non-users */
.home-cta {
    margin-top: 40px;
    text-align: center;
    color: var(--text-secondary);
}