/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ffa500;
    --primary-dark: #ff8c00;
    --secondary-color: #ffa500;
    --accent-color: #ffa500;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-tertiary: #3a3a3a;
    --bg-glass: rgba(255, 255, 255, 0.05);
    --bg-glass-hover: rgba(255, 255, 255, 0.1);
    
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --text-muted: #a0a0a0;
    
    --border-color: #404040;
    --border-hover: #ffa500;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px rgba(255, 165, 0, 0.3);
    
    --gradient-primary: linear-gradient(135deg, #ffa500 0%, #ff8c00 100%);
    --gradient-secondary: linear-gradient(135deg, #ffa500 0%, #ff8c00 100%);
    --gradient-accent: linear-gradient(135deg, #ffa500 0%, #ff8c00 100%);
    --gradient-bg: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    --gradient-stat-number: linear-gradient(135deg, #ff6b35 0%, #ffa500 50%, #ffd700 100%);
    --gradient-stat-label: linear-gradient(135deg, #ffa500 0%, #ff8c00 100%);
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gradient-bg);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    position: relative;
}

/* Background Animation */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('2025-09-10 15_50_10- copy.png');
    background-repeat: repeat;
    background-size: 1600px 835px;
    background-attachment: fixed;
    filter: brightness(0.2) contrast(1.2);
    z-index: -1;
}

.background-animation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(6, 182, 212, 0.1) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(1deg); }
    66% { transform: translateY(10px) rotate(-1deg); }
}

/* Container */
.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 40px 30px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.header-content {
    margin-bottom: 1rem;
    width: 100%;
}

.title {
    font-size: 3.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    letter-spacing: 0.02em;
    animation: fadeInUp 1s ease-out;
    white-space: nowrap;
}

.title span {
    display: inline-block;
    letter-spacing: inherit;
}

.title i {
    color: var(--primary-color);
    filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.5));
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 400;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.connection-status {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    backdrop-filter: blur(10px);
    font-size: 0.875rem;
    transition: all 0.3s ease;
    min-width: 200px;
}

.status-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.last-update {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
    text-align: right;
}

.connection-status i {
    font-size: 0.5rem;
    animation: pulse 2s infinite;
}

.connection-status.connected i {
    color: var(--success-color);
}

.connection-status.error i {
    color: var(--error-color);
}

.connection-status.connecting i {
    color: var(--warning-color);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto 0 auto;
}

.summary-card {
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-align: center;
    animation: fadeInUp 0.6s ease-out;
    border-left: 4px solid var(--primary-color);
}

.summary-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.summary-card.movies {
    border-left: 4px solid var(--primary-color);
}

.summary-card.tv {
    border-left: 4px solid var(--primary-color);
}

.summary-card-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin: 0 auto 1.5rem;
}

.summary-card-icon.movies {
    background: var(--gradient-primary);
}

.summary-card-icon.tv {
    background: var(--gradient-secondary);
}

.summary-card-number {
    font-size: 4rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.summary-card.movies .summary-card-number {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.summary-card.tv .summary-card-number {
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.summary-card-label {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Libraries Container */
.libraries-container {
    display: flex;
    gap: 2rem;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    margin-bottom: 3rem;
}

/* Libraries Section */
.libraries-section {
    flex: 1;
    padding: 24px;
}

.section-header {
    margin-bottom: 0.5rem;
    margin-top: 2rem;
    text-align: center;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(255, 165, 0, 0.3);
    letter-spacing: 0.05em;
}

.section-header h2 i {
    color: var(--primary-color);
    filter: drop-shadow(0 0 15px rgba(255, 165, 0, 0.6));
    font-size: 2.2rem;
}

.section-header.movies h2 {
    color: var(--primary-color);
}

.section-header.tv h2 {
    color: var(--primary-color);
}

.section-header.tv h2 i {
    color: var(--primary-color);
    filter: drop-shadow(0 0 10px rgba(255, 165, 0, 0.5));
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    width: 100%;
}

/* Centering removed - keeping original layout */

.stat-card {
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
    border-left: 3px solid var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.stat-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.stat-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
}

.stat-card-icon.movies {
    background: var(--gradient-primary);
}

.stat-card-icon.tv {
    background: var(--gradient-primary);
}

.stat-card-icon.music {
    background: var(--gradient-primary);
}

.stat-card-icon.other {
    background: var(--gradient-primary);
}

.stat-card-content {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    background: var(--gradient-stat-number);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    line-height: 1;
    text-shadow: 0 0 30px rgba(255, 107, 53, 0.3);
}

.stat-label {
    font-size: 1rem;
    background: var(--gradient-stat-label);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-shadow: 0 0 15px rgba(255, 165, 0, 0.2);
}

.stat-details {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    font-size: 0.875rem;
}

.stat-detail {
    text-align: center;
}

.stat-detail-value {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.125rem;
}

.stat-detail-label {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Loading States */
.loading-container {
    text-align: center;
    padding: 3rem;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error States */
.error-container {
    text-align: center;
    padding: 3rem;
    background: var(--bg-glass);
    border: 1px solid var(--error-color);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    max-width: 500px;
    margin: 0 auto;
}

.error-container i {
    font-size: 3rem;
    color: var(--error-color);
    margin-bottom: 1rem;
}

.error-container h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.error-container p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.retry-btn {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.retry-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
/* Responsive Design for Side-by-Side Layout */
@media screen and (max-width: 1024px) {
    .libraries-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .libraries-section {
        margin-bottom: 2rem;
    }
}

@media screen and (min-width: 600px) {
    .summary-cards {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 20px !important;
    }
    
    .stats-grid {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
        gap: 20px !important;
    }
}

@media screen and (max-width: 599px) {
    .container {
        padding: 20px 15px !important;
    }
    
    .libraries-section {
        padding: 16px !important;
        margin-bottom: 15px !important;
    }
    
    .stat-card {
        margin-bottom: 15px !important;
        padding: 16px !important;
    }
    
    .summary-cards {
        display: block !important;
    }
    
    .summary-card {
        margin-bottom: 15px !important;
    }
    
    .title {
        font-size: 2rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .connection-status {
        position: static;
        margin-top: 1rem;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}
