/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Light mode colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-primary: #1a1a1a;
    --text-secondary: #6b7280;
    --accent-primary: #166534; /* Dark green */
    --accent-secondary: #dcfce7; /* Light green */
    --border-color: #e5e7eb;
    --card-bg: #ffffff;
    --card-border: #e5e7eb;
    --nav-bg: rgba(255, 255, 255, 0.95);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    /* Dark mode colors */
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-primary: #22c55e; /* Bright green for dark mode */
    --accent-secondary: #166534; /* Dark green */
    --border-color: #374151;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --nav-bg: rgba(10, 10, 10, 0.95);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Lato', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Navigation */
.navbar {
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.brand-logo {
    height: 40px;
    width: auto;
    border-radius: 8px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--accent-primary);
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.theme-toggle:hover {
    background: var(--bg-secondary);
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dropdown-toggle i {
    transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-toggle i {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-link {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.dropdown-link:hover {
    background: var(--bg-secondary);
    color: var(--accent-primary);
}

/* Responsive dropdown */
@media (max-width: 768px) {
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
        margin: 0;
        margin-left: 1rem;
    }
    
    .dropdown-link {
        padding: 0.5rem 0;
        font-size: 0.9rem;
    }
}

/* Analytics Container */
.analytics-container {
    max-width: 1200px;
    margin: 80px auto 0;
    padding: 2rem;
}

/* Header */
.analytics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.analytics-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.date-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.date-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    color: var(--text-primary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.date-btn:hover {
    background: var(--accent-secondary);
}

.date-range {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.stat-change {
    font-size: 0.9rem;
    font-weight: 600;
}

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

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

/* Donut Chart */
.stat-chart {
    margin-top: 1.5rem;
}

.donut-chart {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    position: relative;
    margin: 0 auto 1rem;
    background: conic-gradient(
        #ec4899 0deg calc(var(--percentage) * 3.6deg),
        #a855f7 calc(var(--percentage) * 3.6deg) 360deg
    );
}

.donut-chart::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: #0a0a0a;
    border-radius: 50%;
}

.chart-legend {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-color.followers {
    background: #ec4899;
}

.legend-color.non-followers {
    background: #a855f7;
}

/* Content Section */
.content-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 3rem;
    backdrop-filter: blur(10px);
}

.content-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.content-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.filter-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: var(--bg-primary);
}

.content-breakdown {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.content-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.content-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1;
}

.content-type {
    font-weight: 500;
    color: var(--text-primary);
}

.content-percentage {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.progress-bar {
    width: 200px;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-fill.reels {
    background: linear-gradient(90deg, #ec4899, #a855f7);
}

.progress-fill.stories {
    background: linear-gradient(90deg, #a855f7, #8b5cf6);
}

.progress-fill.posts {
    background: linear-gradient(90deg, #8b5cf6, #7c3aed);
}

/* Top Content Section */
.top-content-section {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 3rem;
    backdrop-filter: blur(10px);
}

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

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.see-all {
    color: #a855f7;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.content-card {
    text-align: center;
}

.content-preview {
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1rem;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-image {
    font-size: 2rem;
    color: #a855f7;
}

.view-count {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background: rgba(0, 0, 0, 0.8);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.content-date {
    color: #a0a0a0;
    font-size: 0.8rem;
}

/* Demographics Section */
.demographics-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.demographics-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.demographics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.demographics-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.city-list,
.country-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.city-item,
.country-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.city-name,
.country-name {
    min-width: 120px;
    font-weight: 500;
    color: var(--text-primary);
}

.city-bar,
.country-bar {
    flex: 1;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.city-percentage,
.country-percentage {
    min-width: 50px;
    text-align: right;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Analytics Description */
.analytics-description {
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.analytics-description p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* Account Growth Section */
.account-growth h3 {
    color: var(--text-primary);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.growth-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.growth-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.3s ease;
}

.growth-link:hover {
    transform: translateY(-3px);
}

.growth-link:hover .growth-item {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-primary);
}

.growth-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    gap: 1rem;
    cursor: pointer;
}

.account-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.profile-pic {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-primary);
}

.account-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.account-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.account-handle {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 400;
}

.growth-numbers {
    color: var(--accent-primary);
    font-weight: 700;
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

/* Responsive adjustments for account growth */
@media (max-width: 768px) {
    .growth-list {
        grid-template-columns: 1fr;
    }
    
    .growth-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .analytics-container {
        padding: 1rem;
        margin-top: 60px;
    }
    
    .analytics-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .demographics-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .content-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .nav-menu {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .content-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .progress-bar {
        width: 100%;
    }
} 

/* Follower Growth Section */
.follower-growth-section {
    margin-bottom: 3rem;
}

.growth-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 2rem;
}

.growth-icon {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.growth-icon i {
    font-size: 2rem;
    color: var(--bg-primary);
}

.growth-content {
    flex: 1;
}

.growth-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.growth-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
}

.growth-content p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.growth-trend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-primary);
    font-size: 0.9rem;
    font-weight: 500;
}

.growth-trend i {
    font-size: 0.8rem;
} 