* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0e27;
    --bg-secondary: #151b3d;
    --bg-tertiary: #1e2749;
    --text-primary: #ffffff;
    --text-secondary: #e2e8f0;
    --text-muted: #94a3b8;
    --accent-blue: #4f46e5;
    --accent-purple: #7c3aed;
    --accent-green: #059669;
    --accent-yellow: #f59e0b;
    --accent-red: #dc2626;
    --accent-cyan: #06b6d4;
    --accent-pink: #ec4899;
    --border-color: #1e2749;
    --shadow: rgba(0, 0, 0, 0.4);
    --glow-blue: rgba(79, 70, 229, 0.4);
    --glow-purple: rgba(124, 58, 237, 0.4);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0a0e27 0%, #151b3d 50%, #1a1f3a 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
}

.dashboard-container {
    min-height: 100vh;
}

.header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 6px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.header-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    padding: 0.75rem;
    border-radius: 0.75rem;
    color: white;
    font-size: 1.5rem;
}

.header-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-text p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.last-updated {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.refresh-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem;
}

.loading-spinner {
    text-align: center;
    padding: 4rem 2rem;
}

.loading-spinner i {
    font-size: 3rem;
    color: #3b82f6;
    margin-bottom: 1rem;
}

.loading-spinner p {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

.error-message {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-secondary);
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px var(--shadow);
    border: 1px solid var(--border-color);
}

.error-message i {
    font-size: 3rem;
    color: var(--accent-red);
    margin-bottom: 1rem;
}

.error-message p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

.error-message button {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.error-message button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

section {
    margin-bottom: 2.5rem;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.header-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
    box-shadow: 0 4px 20px var(--glow-blue);
    flex-shrink: 0;
}

.header-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.header-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-blue), transparent);
    opacity: 0.3;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
}

.stat-card {
    background: linear-gradient(135deg, rgba(21, 27, 61, 0.8), rgba(30, 39, 73, 0.6));
    backdrop-filter: blur(20px);
    padding: 1.25rem;
    border-radius: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    gap: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-blue), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 20px var(--glow-blue);
    border-color: var(--accent-blue);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: white;
    position: relative;
    transition: all 0.3s ease;
}

.stat-card:hover .stat-icon {
    transform: scale(1.1) rotate(5deg);
}

.stat-card.blue .stat-icon {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
}

.stat-card.green .stat-icon {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
}

.stat-card.yellow .stat-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
}

.stat-card.purple .stat-icon {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
}

.stat-content {
    flex: 1;
}

.stat-content h3 {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    letter-spacing: -0.02em;
}

.stat-trend {
    font-size: 0.875rem;
    font-weight: 500;
}

.stat-trend.positive {
    color: #10b981;
}

.stat-trend.negative {
    color: #ef4444;
}

.platform-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.25rem;
}

.platform-card {
    background: linear-gradient(135deg, rgba(21, 27, 61, 0.9), rgba(30, 39, 73, 0.7));
    backdrop-filter: blur(20px);
    border-radius: 1.25rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.platform-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4), 0 0 30px var(--glow-blue);
}

.platform-header {
    padding: 1.5rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.platform-header.playstore {
    background: linear-gradient(135deg, #34A853, #0F9D58);
    box-shadow: 0 4px 20px rgba(52, 168, 83, 0.3);
}

.platform-header.appstore {
    background: linear-gradient(135deg, #007AFF, #0051D5);
    box-shadow: 0 4px 20px rgba(0, 122, 255, 0.3);
}

.platform-header i {
    font-size: 2rem;
}

.platform-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.platform-stats {
    padding: 1.5rem;
}

.platform-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.platform-stat:hover {
    padding-left: 0.5rem;
    background: rgba(59, 130, 246, 0.05);
}

.platform-stat:last-child {
    border-bottom: none;
}

.platform-stat .label {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.platform-stat .value {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.25rem;
}

.reviews-card {
    background: linear-gradient(135deg, rgba(21, 27, 61, 0.9), rgba(30, 39, 73, 0.7));
    backdrop-filter: blur(20px);
    border-radius: 1.25rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 500px;
    display: flex;
    flex-direction: column;
}

.reviews-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4), 0 0 30px var(--glow-purple);
}

.reviews-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
    flex: 1;
    padding-right: 0.5rem;
}

.reviews-list::-webkit-scrollbar {
    width: 6px;
}

.reviews-list::-webkit-scrollbar-track {
    background: rgba(30, 39, 73, 0.5);
    border-radius: 10px;
}

.reviews-list::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    border-radius: 10px;
}

.reviews-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
}

.review-item {
    padding: 1rem;
    background: linear-gradient(135deg, rgba(30, 39, 73, 0.6), rgba(51, 65, 85, 0.4));
    border-radius: 0.875rem;
    border-left: 3px solid transparent;
    border-image: linear-gradient(180deg, var(--accent-blue), var(--accent-purple)) 1;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.review-item:hover {
    background: linear-gradient(135deg, rgba(30, 39, 73, 0.8), rgba(51, 65, 85, 0.6));
    border-image: linear-gradient(180deg, var(--accent-purple), var(--accent-pink)) 1;
    transform: translateX(6px) scale(1.02);
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.3);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.review-author {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.review-rating {
    color: var(--accent-yellow);
    font-size: 0.875rem;
    text-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

.review-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.review-date {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.chart-container {
    background: linear-gradient(135deg, rgba(21, 27, 61, 0.9), rgba(30, 39, 73, 0.7));
    backdrop-filter: blur(20px);
    border-radius: 1.25rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.chart-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple), var(--accent-cyan));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.chart-container:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4), 0 0 30px var(--glow-blue);
    border-color: rgba(79, 70, 229, 0.3);
}

.chart-container:hover::before {
    opacity: 1;
}

.chart-container h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.875rem;
}

.chart-container h3 i {
    color: var(--accent-blue);
    font-size: 1rem;
}

.chart-wrapper {
    position: relative;
    height: 280px;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .stats-grid,
    .platform-grid,
    .reviews-grid,
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-wrapper {
        height: 250px;
    }
    
    .reviews-card {
        height: 400px;
    }
    
    .header-line {
        display: none;
    }
}
