/* ===== CSS Variables ===== */
:root {
    /* Light Theme */
    --light-bg: #f8fafc;
    --light-bg-secondary: #ffffff;
    --light-text: #1e293b;
    --light-text-secondary: #64748b;
    --light-border: #e2e8f0;
    --light-card-bg: #ffffff;
    --light-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --light-accent: #3b82f6;
    --light-accent-hover: #2563eb;

    /* Dark Theme */
    --dark-bg: #0f172a;
    --dark-bg-secondary: #1e293b;
    --dark-text: #f1f5f9;
    --dark-text-secondary: #94a3b8;
    --dark-border: #334155;
    --dark-card-bg: #1e293b;
    --dark-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --dark-accent: #60a5fa;
    --dark-accent-hover: #3b82f6;

    /* Emotional Theme Gradients */
    --emotional-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    --emotional-gradient-soft: linear-gradient(135deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 50%, rgba(240, 147, 251, 0.8) 100%);
    --emotional-bg: #1a1a2e;
    --emotional-bg-secondary: rgba(255, 255, 255, 0.05);
    --emotional-text: #ffffff;
    --emotional-text-secondary: rgba(255, 255, 255, 0.7);
    --emotional-border: rgba(255, 255, 255, 0.1);
    --emotional-card-bg: rgba(255, 255, 255, 0.08);
    --emotional-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
    --emotional-accent: #a78bfa;
    --emotional-accent-hover: #8b5cf6;

    /* Common */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    transition: var(--transition);
    min-height: 100vh;
}

/* ===== Theme Styles ===== */

/* Light Theme */
.light-theme {
    background-color: var(--light-bg);
    color: var(--light-text);
}

.light-theme .navbar {
    background: var(--light-bg-secondary);
    border-bottom: 1px solid var(--light-border);
    box-shadow: var(--light-shadow);
}

.light-theme .nav-link {
    color: var(--light-text-secondary);
}

.light-theme .nav-link:hover,
.light-theme .nav-link.active {
    color: var(--light-accent);
}

.light-theme .platform-card {
    background: var(--light-card-bg);
    border: 1px solid var(--light-border);
    box-shadow: var(--light-shadow);
}

.light-theme .btn-primary {
    background: var(--light-accent);
    color: white;
}

.light-theme .btn-primary:hover {
    background: var(--light-accent-hover);
}

.light-theme .btn-secondary {
    background: transparent;
    border: 1px solid var(--light-border);
    color: var(--light-text);
}

.light-theme .modal-content {
    background: var(--light-bg-secondary);
    color: var(--light-text);
}

.light-theme .sidebar {
    background: var(--light-bg-secondary);
    border-right: 1px solid var(--light-border);
}

.light-theme .sidebar-item {
    color: var(--light-text-secondary);
}

.light-theme .sidebar-item:hover,
.light-theme .sidebar-item.active {
    background: var(--light-accent);
    color: white;
}

.light-theme .stat-card {
    background: var(--light-card-bg);
    box-shadow: var(--light-shadow);
}

.light-theme .analytics-card {
    background: var(--light-card-bg);
    box-shadow: var(--light-shadow);
}

.light-theme .subscriptions-table {
    background: var(--light-card-bg);
}

.light-theme .subscriptions-table th {
    background: var(--light-bg);
    color: var(--light-text-secondary);
}

.light-theme .subscriptions-table td {
    border-bottom: 1px solid var(--light-border);
}

.light-theme .filters-container {
    background: var(--light-bg-secondary);
    border: 1px solid var(--light-border);
}

.light-theme select,
.light-theme input {
    background: var(--light-bg);
    border: 1px solid var(--light-border);
    color: var(--light-text);
}

.light-theme .update-card {
    background: var(--light-card-bg);
    border: 1px solid var(--light-border);
}

.light-theme .quiz-card {
    background: var(--light-card-bg);
    box-shadow: var(--light-shadow);
}

.light-theme .footer {
    background: var(--light-bg-secondary);
    border-top: 1px solid var(--light-border);
    color: var(--light-text-secondary);
}

/* Dark Theme */
.dark-theme {
    background-color: var(--dark-bg);
    color: var(--dark-text);
}

.dark-theme .navbar {
    background: var(--dark-bg-secondary);
    border-bottom: 1px solid var(--dark-border);
    box-shadow: var(--dark-shadow);
}

.dark-theme .nav-link {
    color: var(--dark-text-secondary);
}

.dark-theme .nav-link:hover,
.dark-theme .nav-link.active {
    color: var(--dark-accent);
}

.dark-theme .platform-card {
    background: var(--dark-card-bg);
    border: 1px solid var(--dark-border);
    box-shadow: var(--dark-shadow);
}

.dark-theme .btn-primary {
    background: var(--dark-accent);
    color: var(--dark-bg);
}

.dark-theme .btn-primary:hover {
    background: var(--dark-accent-hover);
}

.dark-theme .btn-secondary {
    background: transparent;
    border: 1px solid var(--dark-border);
    color: var(--dark-text);
}

.dark-theme .modal-content {
    background: var(--dark-bg-secondary);
    color: var(--dark-text);
}

.dark-theme .sidebar {
    background: var(--dark-bg-secondary);
    border-right: 1px solid var(--dark-border);
}

.dark-theme .sidebar-item {
    color: var(--dark-text-secondary);
}

.dark-theme .sidebar-item:hover,
.dark-theme .sidebar-item.active {
    background: var(--dark-accent);
    color: var(--dark-bg);
}

.dark-theme .stat-card {
    background: var(--dark-card-bg);
    box-shadow: var(--dark-shadow);
}

.dark-theme .analytics-card {
    background: var(--dark-card-bg);
    box-shadow: var(--dark-shadow);
}

.dark-theme .subscriptions-table {
    background: var(--dark-card-bg);
}

.dark-theme .subscriptions-table th {
    background: var(--dark-bg);
    color: var(--dark-text-secondary);
}

.dark-theme .subscriptions-table td {
    border-bottom: 1px solid var(--dark-border);
}

.dark-theme .filters-container {
    background: var(--dark-bg-secondary);
    border: 1px solid var(--dark-border);
}

.dark-theme select,
.dark-theme input {
    background: var(--dark-bg);
    border: 1px solid var(--dark-border);
    color: var(--dark-text);
}

.dark-theme .update-card {
    background: var(--dark-card-bg);
    border: 1px solid var(--dark-border);
}

.dark-theme .quiz-card {
    background: var(--dark-card-bg);
    box-shadow: var(--dark-shadow);
}

.dark-theme .footer {
    background: var(--dark-bg-secondary);
    border-top: 1px solid var(--dark-border);
    color: var(--dark-text-secondary);
}

/* Emotional Theme */
.emotional-theme {
    background: var(--emotional-bg);
    color: var(--emotional-text);
    position: relative;
}

.emotional-theme::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--emotional-gradient);
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
}

.emotional-theme > * {
    position: relative;
    z-index: 1;
}

.emotional-theme .navbar {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--emotional-border);
    box-shadow: var(--emotional-shadow);
}

.emotional-theme .nav-link {
    color: var(--emotional-text-secondary);
}

.emotional-theme .nav-link:hover,
.emotional-theme .nav-link.active {
    color: var(--emotional-accent);
}

.emotional-theme .platform-card {
    background: var(--emotional-card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--emotional-border);
    box-shadow: var(--emotional-shadow);
}

.emotional-theme .platform-card:hover {
    border-color: var(--emotional-accent);
    box-shadow: 0 8px 40px rgba(167, 139, 250, 0.4);
}

.emotional-theme .btn-primary {
    background: var(--emotional-gradient);
    color: white;
    border: none;
}

.emotional-theme .btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.emotional-theme .btn-secondary {
    background: var(--emotional-card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--emotional-border);
    color: var(--emotional-text);
}

.emotional-theme .modal-content {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    color: var(--emotional-text);
    border: 1px solid var(--emotional-border);
}

.emotional-theme .sidebar {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--emotional-border);
}

.emotional-theme .sidebar-item {
    color: var(--emotional-text-secondary);
}

.emotional-theme .sidebar-item:hover,
.emotional-theme .sidebar-item.active {
    background: var(--emotional-gradient);
    color: white;
}

.emotional-theme .stat-card {
    background: var(--emotional-card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--emotional-border);
}

.emotional-theme .stat-card.chat {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(147, 51, 234, 0.3));
}

.emotional-theme .stat-card.image {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.3), rgba(251, 146, 60, 0.3));
}

.emotional-theme .stat-card.coding {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.3), rgba(20, 184, 166, 0.3));
}

.emotional-theme .stat-card.productivity {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.3), rgba(249, 115, 22, 0.3));
}

.emotional-theme .analytics-card {
    background: var(--emotional-card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--emotional-border);
}

.emotional-theme .analytics-card.spending {
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.2), rgba(236, 72, 153, 0.2));
}

.emotional-theme .subscriptions-table {
    background: var(--emotional-card-bg);
    backdrop-filter: blur(10px);
}

.emotional-theme .subscriptions-table th {
    background: rgba(15, 23, 42, 0.6);
    color: var(--emotional-text-secondary);
}

.emotional-theme .subscriptions-table td {
    border-bottom: 1px solid var(--emotional-border);
}

.emotional-theme .filters-container {
    background: var(--emotional-card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--emotional-border);
}

.emotional-theme select,
.emotional-theme input {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--emotional-border);
    color: var(--emotional-text);
}

.emotional-theme .update-card {
    background: var(--emotional-card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--emotional-border);
}

.emotional-theme .quiz-card {
    background: var(--emotional-card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--emotional-border);
}

.emotional-theme .footer {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--emotional-border);
    color: var(--emotional-text-secondary);
}

/* ===== Navigation ===== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0 24px;
    transition: var(--transition);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 700;
}

.nav-logo i {
    font-size: 1.6rem;
    background: var(--emotional-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-link {
    padding: 10px 18px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.theme-switcher {
    display: flex;
    gap: 4px;
    padding: 4px;
    border-radius: var(--border-radius);
    background: rgba(0, 0, 0, 0.1);
}

.theme-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: transparent;
    color: inherit;
    opacity: 0.6;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-btn:hover {
    opacity: 1;
}

.theme-btn.active {
    background: var(--emotional-gradient);
    color: white;
    opacity: 1;
}

.sign-in-btn {
    padding: 10px 24px;
    border-radius: var(--border-radius);
    border: none;
    background: var(--emotional-gradient);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.sign-in-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: inherit;
    cursor: pointer;
}

/* ===== Main Content ===== */
.main-content {
    min-height: calc(100vh - 70px - 80px);
    padding: 40px 24px;
    max-width: 1400px;
    margin: 0 auto;
}

.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== Hero Section ===== */
.hero {
    text-align: center;
    padding: 60px 20px 80px;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 16px;
    background: var(--emotional-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.light-theme .hero-title {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.8;
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn {
    padding: 14px 28px;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
}

/* ===== Section ===== */
.section {
    margin-top: 60px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 24px;
}

/* ===== Platforms Grid ===== */
.platforms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

/* ===== Platform Card ===== */
.platform-card {
    border-radius: var(--border-radius-lg);
    padding: 24px;
    transition: var(--transition);
    cursor: pointer;
}

.platform-card:hover {
    transform: translateY(-4px);
}

.platform-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.platform-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--emotional-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.platform-info {
    flex: 1;
}

.platform-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.platform-price {
    font-size: 0.95rem;
    opacity: 0.8;
}

.platform-description {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-bottom: 16px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.platform-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.tag {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.tag.free {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.tag.bonus {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.3), rgba(249, 115, 22, 0.3));
    color: #fbbf24;
    font-weight: 600;
}

.tag.popular {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.tag.category {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.platform-actions {
    display: flex;
    justify-content: flex-end;
}

.view-details-btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    background: var(--emotional-gradient);
    color: white;
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.view-details-btn:hover {
    opacity: 0.9;
}

/* ===== Page Header ===== */
.page-header {
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.page-header p {
    opacity: 0.7;
}

/* ===== Filters ===== */
.filters-container {
    padding: 20px;
    border-radius: var(--border-radius-lg);
    margin-bottom: 32px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 250px;
}

.search-box i {
    opacity: 0.5;
}

.search-box input {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.95rem;
}

.filter-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-group select {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    min-width: 150px;
}

/* ===== Subscriptions Layout ===== */
.subscriptions-layout {
    display: flex;
    gap: 24px;
    margin: -40px -24px;
    min-height: calc(100vh - 70px);
}

.sidebar {
    width: 240px;
    padding: 24px 16px;
    flex-shrink: 0;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.subscriptions-content {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
}

.page-title {
    font-size: 1.8rem;
    margin-bottom: 32px;
}

/* ===== Stats Grid ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    padding: 24px;
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.85rem;
    opacity: 0.8;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
}

.stat-desc {
    font-size: 0.75rem;
    opacity: 0.6;
}

/* ===== Analytics Section ===== */
.analytics-section {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.analytics-card {
    padding: 24px;
    border-radius: var(--border-radius-lg);
}

.analytics-card h3 {
    font-size: 1rem;
    margin-bottom: 20px;
    opacity: 0.9;
}

.spending-info {
    display: flex;
    flex-direction: column;
    margin-bottom: 24px;
}

.spending-label {
    font-size: 0.85rem;
    opacity: 0.7;
}

.spending-value {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--emotional-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.spending-subs {
    font-size: 0.9rem;
    opacity: 0.6;
}

.spending-breakdown {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.breakdown-item .label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.breakdown-item .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.trends-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.trends-header h3 {
    margin: 0;
}

.trends-header select {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
}

.chart-container {
    height: 200px;
}

/* ===== Subscriptions Table ===== */
.subscriptions-table-container {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.subscriptions-table {
    width: 100%;
    border-collapse: collapse;
}

.subscriptions-table th,
.subscriptions-table td {
    padding: 16px 20px;
    text-align: left;
}

.subscriptions-table th {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.subscriptions-table td {
    font-size: 0.95rem;
}

.table-platform {
    display: flex;
    align-items: center;
    gap: 12px;
}

.table-platform-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--emotional-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

.rating {
    display: flex;
    align-items: center;
    gap: 4px;
}

.rating i {
    color: #fbbf24;
    font-size: 0.9rem;
}

.referral-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.referral-badge.yes {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.referral-badge.no {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.table-actions {
    display: flex;
    gap: 8px;
}

.table-btn {
    padding: 6px 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    transition: var(--transition);
}

.table-btn.manage {
    background: var(--emotional-gradient);
    color: white;
}

.table-btn.remove {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* ===== Quiz ===== */
.quiz-container {
    max-width: 700px;
    margin: 0 auto;
}

.quiz-card {
    padding: 40px;
    border-radius: var(--border-radius-xl);
}

.quiz-progress {
    margin-bottom: 32px;
}

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: var(--emotional-gradient);
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.9rem;
    opacity: 0.7;
}

.quiz-question {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quiz-option {
    padding: 18px 24px;
    border-radius: var(--border-radius);
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    color: inherit;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.quiz-option:hover {
    border-color: var(--emotional-accent);
    background: rgba(167, 139, 250, 0.1);
}

.quiz-option.selected {
    border-color: var(--emotional-accent);
    background: rgba(167, 139, 250, 0.2);
}

.recommendations-result {
    text-align: center;
}

.recommendations-result h2 {
    margin-bottom: 32px;
}

#retake-quiz {
    margin-top: 32px;
}

/* ===== Updates ===== */
.updates-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.update-card {
    padding: 24px;
    border-radius: var(--border-radius-lg);
    display: flex;
    gap: 20px;
}

.update-date {
    flex-shrink: 0;
    text-align: center;
    padding: 12px 16px;
    border-radius: var(--border-radius);
    background: var(--emotional-gradient);
    color: white;
}

.update-day {
    font-size: 1.5rem;
    font-weight: 700;
    display: block;
}

.update-month {
    font-size: 0.8rem;
    text-transform: uppercase;
}

.update-content {
    flex: 1;
}

.update-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.update-platform {
    font-weight: 600;
}

.update-importance {
    font-size: 0.8rem;
}

.update-importance.critical {
    color: #ef4444;
}

.update-importance.high {
    color: #f59e0b;
}

.update-importance.medium {
    color: #3b82f6;
}

.update-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.update-description {
    font-size: 0.95rem;
    opacity: 0.8;
    line-height: 1.6;
}

.update-source {
    margin-top: 12px;
}

.update-source a {
    color: var(--emotional-accent);
    text-decoration: none;
    font-size: 0.9rem;
}

.update-source a:hover {
    text-decoration: underline;
}

/* ===== Modal ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: var(--border-radius-xl);
    padding: 32px;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: inherit;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.modal-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--emotional-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.modal-category {
    opacity: 0.7;
    font-size: 0.95rem;
}

.modal-section {
    margin-bottom: 24px;
}

.modal-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
    opacity: 0.9;
}

.modal-pricing {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.pricing-tier {
    padding: 16px;
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.05);
    text-align: center;
}

.pricing-tier .tier-name {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-bottom: 4px;
}

.pricing-tier .tier-price {
    font-size: 1.3rem;
    font-weight: 700;
}

.pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.pros, .cons {
    padding: 16px;
    border-radius: var(--border-radius);
}

.pros {
    background: rgba(34, 197, 94, 0.1);
}

.cons {
    background: rgba(239, 68, 68, 0.1);
}

.pros h4, .cons h4 {
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.pros h4 {
    color: #22c55e;
}

.cons h4 {
    color: #ef4444;
}

.pros ul, .cons ul {
    list-style: none;
    font-size: 0.9rem;
}

.pros li, .cons li {
    padding: 4px 0;
    padding-left: 20px;
    position: relative;
}

.pros li::before {
    content: '+';
    position: absolute;
    left: 0;
    color: #22c55e;
    font-weight: bold;
}

.cons li::before {
    content: '-';
    position: absolute;
    left: 0;
    color: #ef4444;
    font-weight: bold;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.modal-actions .btn {
    flex: 1;
    justify-content: center;
}

/* Modal Meta Info */
.modal-meta {
    font-size: 0.9rem;
    opacity: 0.7;
    margin: 2px 0;
}

/* Pricing Tier Features */
.tier-features {
    list-style: none;
    padding: 0;
    margin: 12px 0 0 0;
    font-size: 0.8rem;
    text-align: left;
}

.tier-features li {
    padding: 4px 0;
    opacity: 0.8;
    position: relative;
    padding-left: 16px;
}

.tier-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #22c55e;
}

/* Detail Info Grid */
.detail-info-grid {
    display: grid;
    gap: 8px;
}

.detail-info-grid p {
    margin: 0;
    font-size: 0.95rem;
}

.referral-note {
    background: rgba(251, 191, 36, 0.1);
    padding: 8px 12px;
    border-radius: 8px;
    border-left: 3px solid #fbbf24;
    font-size: 0.9rem;
}

/* Pricing Tier Improvements */
.pricing-tier {
    padding: 20px;
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.05);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.pricing-tier:hover {
    border-color: var(--emotional-accent);
    transform: translateY(-2px);
}

.light-theme .pricing-tier {
    background: var(--light-bg);
    border-color: var(--light-border);
}

.dark-theme .pricing-tier {
    background: var(--dark-bg);
    border-color: var(--dark-border);
}

/* Modal Scrollbar */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Platform Card Icon Fix */
.platform-icon i,
.modal-icon i,
.table-platform-icon i {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands";
}

/* Tag improvements */
.tag.popular {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(249, 115, 22, 0.2));
    color: #f97316;
    font-weight: 600;
}

/* ===== Footer ===== */
.footer {
    padding: 24px;
    text-align: center;
    font-size: 0.9rem;
}

.footer-note {
    margin-top: 8px;
    font-size: 0.8rem;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .analytics-section {
        grid-template-columns: 1fr;
    }

    .subscriptions-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        padding: 16px;
    }

    .sidebar-menu {
        flex-direction: row;
        overflow-x: auto;
    }

    .subscriptions-content {
        padding: 24px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .nav-actions .sign-in-btn {
        display: none;
    }

    .hero {
        padding: 40px 10px 60px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .platforms-grid {
        grid-template-columns: 1fr;
    }

    .filters-container {
        flex-direction: column;
    }

    .search-box {
        width: 100%;
    }

    .filter-group {
        width: 100%;
    }

    .filter-group select {
        flex: 1;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pros-cons {
        grid-template-columns: 1fr;
    }

    .subscriptions-table-container {
        overflow-x: auto;
    }

    .subscriptions-table {
        min-width: 700px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .theme-switcher {
        display: none;
    }
}
