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

html {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #fafafa;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Left Navigation Sidebar */
.sidebar {
    width: fit-content;
    min-width: 150px;
    background-color: #fff;
    border-right: 1px solid #e0e0e0;
    padding: 24px 0;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100vh;
    overflow-y: auto;
}

.logo {
    padding: 0 24px 32px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

a.logo {
    text-decoration: none;
}

a.logo:hover {
    opacity: 0.9;
}

.logo-icon {
    display: flex;
    justify-content: center;
}

.logo-icon img {
    width: 112px;
    height: 112px;
    object-fit: contain;
}

/* Mobile Logo Pattern - Hidden on desktop */
.mobile-logo-pattern {
    display: none;
    position: relative;
    width: 100%;
    height: 24px;
    background-image: url('vaamobilelogo.png');
    background-repeat: repeat-x;
    background-size: auto 20px;
    background-position: center;
    margin: 10px 0;
    opacity: 0.8;
    border-radius: 4px;
}

/* For entity detail pages */
body[data-page="detail"] .mobile-logo-pattern {
    background-image: url('../vaamobilelogo.png');
}

.nav-menu {
    list-style: none;
}

.nav-item {
    display: block;
    padding: 12px 24px;
    text-decoration: none;
    color: #666;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    white-space: nowrap;
}

.nav-item:hover {
    background-color: #f8fafc;
    color: #FF4500;
}

.nav-item.active {
    background-color: #fff0e6;
    color: #FF4500;
    border-left-color: #FF4500;
}

/* Navigation Footer - Fixed Bottom Bar */
.nav-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid #e0e0e0;
    padding: 2px 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    height: 29px; /* 40% thinner: 48px * 0.6 = 28.8px */
}

.nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 25px; /* 30% smaller: 36px * 0.7 = 25.2px */
    height: 25px; /* 30% smaller: 36px * 0.7 = 25.2px */
    text-decoration: none;
    transition: transform 0.2s ease, color 0.2s ease, background-color 0.2s ease;
    color: #6b7280;
    cursor: pointer;
    filter: grayscale(1);
    border-radius: 6px;
}

.nav-icon:hover {
    transform: translateY(-1px) scale(1.05);
    color: #374151;
    filter: grayscale(0);
    background-color: rgba(248, 250, 252, 0.8);
}

.nav-icon svg {
    width: 14px; /* 30% smaller: 20px * 0.7 = 14px */
    height: 14px; /* 30% smaller: 20px * 0.7 = 14px */
}

/* Main Content Area */
.main-content {
    flex: 1;
    padding: 32px 40px;
    padding-bottom: 45px; /* Adjusted for thinner nav bar */
    overflow-y: auto;
    overflow-x: hidden;
    height: calc(100vh - 29px); /* Account for nav footer height */
}

.page-header {
    margin-bottom: 16px;
}

.page-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0;
}

.page-header p {
    font-size: 16px;
    color: #6b7280;
}

/* Filters Section */
.filters-section {
    margin-bottom: 16px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

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

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-btn {
    background-color: #f9fafb;
    border: 1px solid #d1d5db;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.dropdown-btn:hover {
    background-color: #f3f4f6;
    border-color: #9ca3af;
}

.arrow {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.dropdown.active .arrow {
    transform: rotate(180deg);
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    min-width: 220px;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    z-index: 1000;
    margin-top: 4px;
}

/* Custom scrollbar for dropdown */
.dropdown-content::-webkit-scrollbar {
    width: 6px;
}

.dropdown-content::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 3px;
}

.dropdown-content::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.dropdown-content::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.dropdown.active .dropdown-content {
    display: block;
}

.dropdown-content a {
    color: #374151;
    padding: 10px 16px;
    text-decoration: none;
    display: block;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.dropdown-content a:hover {
    background-color: #f9fafb;
}

.dropdown-content a:first-child {
    border-radius: 6px 6px 0 0;
}

.dropdown-content a:last-child {
    border-radius: 0 0 6px 6px;
}

/* Table Styles */
.table-container {
    background-color: #fff;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    overflow-x: auto;
    overflow-y: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    max-width: 100%;
}

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

.content-table th {
    background-color: #f9fafb;
    padding: 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
}

.content-table th:first-child {
    width: 60px;
    text-align: center;
}

.content-table td {
    padding: 16px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
    vertical-align: middle;
}

.content-table td:first-child {
    text-align: center;
    font-weight: 700;
    color: #6b7280;
    width: 60px;
}

/* Leaderboard Ranking Styles */
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 16px;
}

.rank-1 {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

.rank-2 {
    background: linear-gradient(135deg, #C0C0C0, #8B8B8B);
    color: white;
    box-shadow: 0 2px 8px rgba(192, 192, 192, 0.4);
}

.rank-3 {
    background: linear-gradient(135deg, #CD7F32, #8B4513);
    color: white;
    box-shadow: 0 2px 8px rgba(205, 127, 50, 0.4);
}

.rank-normal {
    background-color: #f3f4f6;
    color: #6b7280;
}

/* Top 3 Row Highlight */
.content-table tr.top-1 {
    background: linear-gradient(to right, rgba(255, 215, 0, 0.05), transparent);
}

.content-table tr.top-2 {
    background: linear-gradient(to right, rgba(192, 192, 192, 0.05), transparent);
}

.content-table tr.top-3 {
    background: linear-gradient(to right, rgba(205, 127, 50, 0.05), transparent);
}

.content-table tr:hover {
    background-color: #fafafa;
}

.content-table tr.top-1:hover,
.content-table tr.top-2:hover,
.content-table tr.top-3:hover {
    background-color: #fafafa;
}

.content-table tr:last-child td {
    border-bottom: none;
}

/* Medal Icons */
.medal-icon {
    margin-left: 8px;
    font-size: 20px;
    vertical-align: middle;
}

/* Virality Score Emphasis */
.virality-score {
    font-weight: 700;
    font-size: 16px;
    color: #1f2937;
}

.virality-score.high {
    color: #059669;
}

.virality-score.medium {
    color: #FF4500;
}

.virality-score.low {
    color: #6b7280;
}

.growth-positive {
    color: #059669;
    font-weight: 600;
}

.growth-negative {
    color: #FF4500; /* Reddit red */
    font-weight: 600;
}

/* App info styles */
.app-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Chart Styles */
.chart-container {
    background-color: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.chart-header-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.chart-time-selector {
    display: flex;
    gap: 8px;
}

.time-option {
    padding: 6px 16px;
    border: 1px solid #d1d5db;
    background-color: #f9fafb;
    color: #374151;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.time-option:hover {
    background-color: #f3f4f6;
    border-color: #9ca3af;
}

.time-option.active {
    background-color: #4F46E5;
    color: white;
    border-color: #4F46E5;
}

.forecast-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.forecast-toggle label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

#virality-chart {
    min-height: 400px;
    position: relative;
}

/* D3 Chart Specific Styles */
.axis text {
    font-size: 12px;
    fill: #6b7280;
}

.axis path,
.axis line {
    stroke: #e5e7eb;
}

.grid line {
    stroke: #f3f4f6;
    stroke-dasharray: 2, 2;
}

.chart-tooltip {
    font-size: 12px;
    background: rgba(0, 0, 0, 0.8) !important;
    color: white !important;
    padding: 8px 12px !important;
    border-radius: 4px !important;
    pointer-events: none !important;
}

/* Clickable Row */
.clickable-row {
    cursor: pointer;
    transition: all 0.2s ease;
}

.clickable-row:hover {
    background-color: #f9fafb;
    transform: translateX(2px);
}

.app-info strong {
    font-size: 16px;
    color: #1f2937;
}

.app-description {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
}

/* Reports/Newsletter Styles */
.reports-container {
    display: none;
}

/* API Styles */
.api-container {
    display: none;
}

/* Tracking Styles */
.tracking-container {
    display: none;
}

.coming-soon {
    text-align: center;
    padding: 80px 40px;
    background-color: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    margin-top: 40px;
}

.coming-soon h2 {
    font-size: 48px;
    font-weight: 700;
    color: #FF4500;
    margin-bottom: 16px;
}

.coming-soon p {
    font-size: 18px;
    color: #6b7280;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
}

.newsletter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.newsletter-card {
    background-color: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.newsletter-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(0, 0, 0, 0.1);
    border-color: #FF4500;
}

.newsletter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f3f4f6;
}

.newsletter-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.newsletter-header .date {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.newsletter-preview {
    margin-bottom: 20px;
}

.newsletter-preview p {
    color: #4b5563;
    line-height: 1.6;
    margin: 0;
    font-size: 15px;
}

.read-more {
    display: inline-flex;
    align-items: center;
    color: #FF4500;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.2s ease;
}

.read-more:hover {
    color: #e63900;
}

/* Category Color Classes */
.category-teal {
    color: #008080 !important;
}

.category-orange {
    color: #FF4500 !important;
}

.category-navy {
    color: #003366 !important;
}

.category-dark {
    color: #333333 !important;
}

.category-bronze {
    color: #CD7F32 !important;
}

.category-maroon {
    color: #800000 !important;
}

.category-slate {
    color: #708090 !important;
}

/* Additional category mappings */
.category-llms,
.category-apis,
.category-training,
.category-benchmark,
.category-enterprise,
.category-security,
.category-workflow,
.category-office,
.category-prompts,
.category-memory,
.category-organize,
.category-build,
.category-design,
.category-writing,
.category-research,
.category-browser,
.category-translation,
.category-reader {
    color: #9ca3af !important;
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    backdrop-filter: blur(3px);
    animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    position: relative;
    animation: slideIn 0.3s ease;
    overflow: hidden;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 32px;
    color: #6b7280;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 1;
}

.modal-close:hover {
    background-color: #f3f4f6;
    color: #1f2937;
}

.modal-body {
    padding: 32px;
    overflow-y: auto;
    max-height: calc(80vh - 64px);
}

.modal-body h2 {
    font-size: 28px;
    color: #1f2937;
    margin-bottom: 20px;
}

.modal-body p {
    font-size: 16px;
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 16px;
}

/* Cookie Settings Styles */
.cookie-intro {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.cookie-category {
    margin-bottom: 20px;
    padding: 20px;
    background-color: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.cookie-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-info h3 {
    font-size: 18px;
    color: #1f2937;
    margin-bottom: 8px;
}

.cookie-info p {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    max-width: 380px;
}

/* Toggle Switch Styles */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 28px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #FF4500;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

.toggle-switch input:disabled + .toggle-slider {
    background-color: #94a3b8;
    cursor: not-allowed;
}

/* Cookie Action Buttons */
.cookie-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: #FF4500;
    color: white;
}

.btn-primary:hover {
    background-color: #e63900;
}

.btn-secondary {
    background-color: #f3f4f6;
    color: #4b5563;
}

.btn-secondary:hover {
    background-color: #e5e7eb;
}

.cookie-policy-link {
    margin-top: 24px;
    text-align: center;
}

.cookie-policy-link a {
    color: #FF4500;
    text-decoration: none;
    font-weight: 600;
}

.cookie-policy-link a:hover {
    text-decoration: underline;
}

/* Cookie Policy Full Text */
.cookie-policy-full h3 {
    font-size: 24px;
    color: #1f2937;
    margin-bottom: 16px;
}

.cookie-policy-full h4 {
    font-size: 18px;
    color: #374151;
    margin-top: 24px;
    margin-bottom: 12px;
}

.cookie-policy-full ul {
    margin-left: 24px;
    margin-bottom: 16px;
}

.cookie-policy-full li {
    margin-bottom: 8px;
    color: #4b5563;
}

.policy-date {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 24px;
}

/* Legal Content Styles */
.legal-content h3 {
    font-size: 24px;
    color: #1f2937;
    margin-bottom: 16px;
    margin-top: 32px;
}

.legal-content h3:first-child {
    margin-top: 0;
}

.legal-content h4 {
    font-size: 18px;
    color: #374151;
    margin-top: 24px;
    margin-bottom: 12px;
}

.legal-content ul {
    margin-left: 24px;
    margin-bottom: 16px;
}

.legal-content li {
    margin-bottom: 8px;
    color: #4b5563;
    line-height: 1.5;
}

.legal-section {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 2px solid #e5e7eb;
}

/* Contact Form Styles */
.contact-intro {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.contact-form-fields {
    margin-bottom: 32px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background-color: #fafafa;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #FF4500;
    box-shadow: 0 0 0 3px rgba(255, 69, 0, 0.1);
    background-color: #fff;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.form-help {
    display: block;
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

.contact-submit {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
}

.contact-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Success Message */
.contact-success {
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    font-size: 64px;
    color: #10b981;
    margin-bottom: 16px;
}

.contact-success h3 {
    font-size: 24px;
    color: #1f2937;
    margin-bottom: 12px;
}

.contact-success p {
    color: #6b7280;
    font-size: 16px;
}

/* Alternative Contact */
.contact-alternative {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.contact-alternative h4 {
    font-size: 18px;
    color: #1f2937;
    margin-bottom: 16px;
}

.contact-alternative p {
    margin-bottom: 8px;
    color: #4b5563;
}

.contact-alternative a {
    color: #FF4500;
    text-decoration: none;
}

.contact-alternative a:hover {
    text-decoration: underline;
}

/* Settings & Auth Styles */
.settings-content {
    max-width: 100%;
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-header h3 {
    font-size: 24px;
    color: #1f2937;
    margin-bottom: 8px;
}

.login-header p {
    color: #6b7280;
    font-size: 16px;
}

/* Google Login Button */
.google-login-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 24px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background-color: #fff;
    color: #374151;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 24px;
}

.google-login-btn:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

/* Divider */
.divider {
    text-align: center;
    margin: 24px 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: #e5e7eb;
}

.divider span {
    background-color: #fff;
    padding: 0 16px;
    color: #6b7280;
    font-size: 14px;
}

/* Login Footer */
.login-footer {
    text-align: center;
    margin-top: 24px;
}

.login-footer p {
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 14px;
}

.login-footer a {
    color: #FF4500;
    text-decoration: none;
    font-weight: 500;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* Chart Modal */
.chart-modal .modal-content {
    max-width: 900px;
    width: 95%;
}

.chart-modal .modal-body {
    padding: 24px;
}

.entity-header {
    margin-bottom: 24px;
}

.entity-header h2 {
    font-size: 28px;
    color: #1f2937;
    margin-bottom: 8px;
}

.entity-header p {
    color: #6b7280;
    font-size: 16px;
    line-height: 1.6;
}

.metrics-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.metric-btn {
    padding: 8px 16px;
    border: 1px solid #d1d5db;
    background-color: #f9fafb;
    color: #374151;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.metric-btn:hover {
    background-color: #f3f4f6;
    border-color: #9ca3af;
}

.metric-btn.active {
    background-color: #4F46E5;
    color: white;
    border-color: #4F46E5;
}

/* User Dashboard */
.user-profile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    background-color: #f9fafb;
    border-radius: 12px;
    margin-bottom: 32px;
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: #FF4500;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 24px;
    overflow: hidden;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-details h3 {
    font-size: 20px;
    color: #1f2937;
    margin-bottom: 4px;
}

.profile-details p {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 8px;
}

.user-status {
    background-color: #ddd6fe;
    color: #7c3aed;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* Settings Sections */
.settings-sections {
    space-y: 32px;
}

.settings-section {
    margin-bottom: 32px;
    padding: 24px;
    background-color: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.settings-section h4 {
    font-size: 18px;
    color: #1f2937;
    margin-bottom: 20px;
}

.setting-item {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f3f4f6;
}

.setting-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.setting-info h5 {
    font-size: 16px;
    color: #374151;
    margin-bottom: 4px;
}

.setting-info p {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

.setting-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-danger {
    background-color: #dc2626;
    color: white;
}

.btn-danger:hover {
    background-color: #b91c1c;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Mobile Logo Pattern */
.mobile-logo-pattern {
    position: relative;
    width: 100%;
    height: 20px;
    background-image: url('vaamobilelogo.png');
    background-repeat: repeat-x;
    background-size: auto 16px;
    background-position: center;
    margin: 20px 0;
    opacity: 0.8;
}

/* For entity detail pages */
.entity .mobile-logo-pattern,
body[data-page="detail"] .mobile-logo-pattern {
    background-image: url('../vaamobilelogo.png');
}

/* Alternative pattern with smaller size */
.mobile-logo-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 0;
    overflow: hidden;
    white-space: nowrap;
}

.mobile-logo-line img {
    height: 16px;
    width: auto;
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .filter-group {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablet and medium screen adjustments */
@media (max-width: 900px) and (min-width: 769px) {
    .nav-footer {
        gap: 20px;
        padding: 2px 0;
        height: 28px; /* 40% thinner */
    }
    
    .nav-icon {
        width: 24px; /* 30% smaller */
        height: 24px; /* 30% smaller */
    }
    
    .nav-icon svg {
        width: 13px; /* 30% smaller */
        height: 13px; /* 30% smaller */
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        order: -1;
        padding: 16px 0 0 0; /* Reduced top padding, removed bottom */
    }
    
    .logo {
        text-align: center;
        padding: 0 16px;
        border-bottom: 1px solid #f0f0f0;
        margin-bottom: 8px; /* Reduced from 16px */
    }
    
    /* Hide desktop logo on mobile */
    .logo-icon {
        display: none;
    }
    
    /* Show mobile pattern on mobile */
    .mobile-logo-pattern {
        display: block;
        height: 64px; /* Match logo height exactly */
        background-size: auto 64px; /* Single logo, 4x bigger height */
        margin: 0; /* Remove all margins */
        background-position: center;
        background-repeat: no-repeat; /* Don't repeat the logo */
        opacity: 0.9;
    }
    
    .nav-menu {
        display: flex;
        overflow-x: auto;
        padding: 0 8px 8px 8px; /* Reduced horizontal padding */
        gap: 4px; /* Reduced gap between items */
    }
    
    .nav-item {
        padding: 8px 10px; /* Reduced horizontal padding */
        border-radius: 6px;
        border-left: none;
        white-space: nowrap;
        flex-shrink: 0;
        position: relative;
        display: flex;
        align-items: center;
        gap: 4px; /* Reduced gap */
        font-size: 13px; /* Slightly smaller font */
    }
    
    .nav-item.active {
        background-color: #fff0e6;
        border-left: none;
    }
    
    .main-content {
        padding: 16px;
        padding-bottom: 40px; /* Adjusted for thinner nav bar on mobile */
    }
    
    .page-header {
        margin-bottom: 4px; /* Further reduced for tighter mobile spacing */
        padding-left: 10px; /* Match nav-item horizontal padding */
    }
    
    .page-header h1 {
        font-size: 24px;
        margin-bottom: 4px; /* Added small margin */
    }
    
    .page-header p {
        font-size: 14px;
    }
    
    .filters-section {
        padding: 16px;
        margin-bottom: 8px; /* Reduced from 20px to minimize vertical gap */
    }
    
    .filter-group {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .dropdown-btn {
        width: 100%;
        justify-content: space-between;
        padding: 12px;
        font-size: 13px;
    }
    
    .table-container {
        overflow-x: auto;
        border-radius: 6px;
    }
    
    .content-table {
        min-width: 600px;
    }
    
    .app-info strong {
        font-size: 14px;
    }
    
    .app-description {
        font-size: 12px;
    }
    
    .content-table th,
    .content-table td {
        padding: 12px 8px;
        font-size: 12px;
    }
    
    .content-table th:first-child,
    .content-table td:first-child {
        position: sticky;
        left: 0;
        background-color: #fff;
        z-index: 1;
        width: 140px;
        max-width: 140px;
        border-right: 1px solid #e5e7eb;
        box-shadow: 1px 0 3px rgba(0,0,0,0.1);
    }
    
    .content-table thead th:first-child {
        background-color: #f9fafb;
    }
    
    .content-table .app-info {
        width: 130px;
    }
    
    .content-table .app-info strong {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 13px;
    }
    
    .content-table .app-description {
        font-size: 11px;
        line-height: 1.3;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .newsletter-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 16px;
    }
    
    .newsletter-card {
        padding: 16px;
    }
    
    .newsletter-header h3 {
        font-size: 16px;
    }
    
    .coming-soon {
        padding: 40px 20px;
        margin-top: 20px;
    }
    
    .coming-soon h2 {
        font-size: 32px;
    }
    
    .coming-soon p {
        font-size: 16px;
    }
    
    .modal-content {
        max-width: 95%;
        margin: 20px;
        max-height: 90vh;
    }
    
    .modal-body {
        padding: 24px;
    }
    
    .modal-body h2 {
        font-size: 24px;
    }
    
    .cookie-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .cookie-info p {
        max-width: 100%;
    }
    
    .cookie-actions {
        flex-wrap: wrap;
    }
    
    .btn {
        flex: 1;
        min-width: 120px;
    }
}

/* Detail Modal Specific Styles */
.detail-modal .modal-content {
    max-width: 1200px;
    width: 95%;
    max-height: 90vh;
}

.detail-modal .modal-body {
    padding: 0;
    max-height: 90vh;
}

/* Detail Page Layout */
.detail-page {
    padding: 40px;
    background-color: #fafafa;
    min-height: 100%;
}

/* Header Section */
.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
    gap: 40px;
    position: relative;
}

.detail-title-section {
    flex: 1;
}

.detail-title-section h1 {
    font-size: 38.4px; /* 20% smaller than 48px */
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 12px;
}

.detail-description {
    font-size: 14.4px; /* 20% smaller than 18px */
    color: #6b7280;
    line-height: 1.6;
    max-width: 600px;
}

/* Metrics Wrapper */
.detail-metrics-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Metrics Cards */
.detail-metrics {
    display: flex;
    gap: 24px;
    width: 100%;
}

.metric-card {
    background: white;
    border-radius: 12px;
    padding: 24px 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-align: center;
    min-width: 150px;
    flex: 1;
}

.metric-value {
    font-size: 36px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
}

.metric-value.growth-positive {
    color: #059669;
}

.metric-label {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

/* Company Info Box - Below metrics */
.company-info-box {
    background: white;
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    width: 100%;
    border: 1px solid #e5e7eb;
}

.info-box-content {
    font-size: 14px;
    line-height: 1.8;
    color: #4b5563;
}

.info-box-content strong {
    color: #1f2937;
    font-weight: 600;
    margin-right: 8px;
}

.info-link {
    color: #4F46E5;
    text-decoration: none;
    transition: color 0.2s ease;
}

.info-link:hover {
    color: #4338ca;
    text-decoration: underline;
}

.social-inline-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    background-color: #f3f4f6;
    text-decoration: none;
    color: #4b5563;
    font-weight: 600;
    font-size: 12px;
    margin: 0 4px;
    transition: all 0.2s ease;
    vertical-align: middle;
}

.social-inline-link:hover {
    background-color: #e5e7eb;
    transform: translateY(-1px);
}

/* Company Info Row */
.detail-info-row {
    display: flex;
    gap: 40px;
    margin-bottom: 32px;
    padding: 20px 0;
    border-bottom: 1px solid #e5e7eb;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-label {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.info-value {
    font-size: 16px;
    color: #1f2937;
    font-weight: 600;
}

.info-value.link {
    color: #4F46E5;
    text-decoration: none;
    transition: color 0.2s ease;
}

.info-value.link:hover {
    color: #4338ca;
    text-decoration: underline;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background-color: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #4b5563;
    font-weight: 600;
    transition: all 0.2s ease;
}

.social-link:hover {
    background-color: #e5e7eb;
    transform: translateY(-1px);
}

/* Chart Container */
.detail-chart-container {
    background: white;
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.chart-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-icon {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background-color: #f3f4f6;
    border-color: #9ca3af;
}

.btn-icon.active {
    background-color: #4F46E5;
    color: white;
    border-color: #4F46E5;
}

.btn-icon svg {
    width: 20px;
    height: 20px;
}

/* Bottom Section Layout */
.detail-bottom-section {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
    align-items: start;
}

/* Channel Breakdown Card */
.channel-breakdown-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    min-height: 380px;
    display: flex;
    flex-direction: column;
}

.channel-breakdown-card h3,
.indicators-card h3,
.category-box-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.channel-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
}

.channel-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.channel-icon {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    background-color: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    filter: grayscale(100%);
    opacity: 0.8;
}

.channel-icon svg {
    width: 16px;
    height: 16px;
    fill: #374151;
}

.channel-bar {
    flex: 1;
    height: 8px;
    background-color: #f3f4f6;
    border-radius: 4px;
    overflow: hidden;
}

.channel-fill {
    height: 100%;
    background-color: #6b7280;
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Key Indicators Card */
.indicators-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    min-height: 380px;
    display: flex;
    flex-direction: column;
}

.indicator-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
    flex: 1;
    justify-content: space-between;
}

.indicator-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.indicator-label {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 4px;
}

.indicator-buttons {
    display: flex;
    gap: 8px;
}

.indicator-btn {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    background-color: #f9fafb;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    cursor: default;
    transition: all 0.2s ease;
}

.indicator-btn.active {
    background-color: #4F46E5;
    color: white;
    border-color: #4F46E5;
}

/* Category Box Card */
.category-box-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    min-height: 380px;
    display: flex;
    flex-direction: column;
}

.category-display {
    margin-bottom: 30px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.category-tag {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    color: #9ca3af;
}

.related-categories {
    padding-top: 0;
    margin-top: 0;
}

.related-label {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 16px;
    display: block;
}

.related-categories-wrapper {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.related-category {
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    background-color: #f9fafb;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    cursor: default;
    transition: all 0.2s ease;
    text-align: center;
}

.related-category:hover {
    background-color: #f3f4f6;
    border-color: #d1d5db;
}

/* Detail Actions - Below metrics */
.detail-actions {
    display: flex;
    gap: 16px;
}

/* Action Buttons - Match Back Button Style */
.action-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    font-size: 14px; /* Match back button */
}

.action-button:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
    color: #475569;
}

/* Remove old button styles from being applied */
.detail-top-bar .export-btn,
.detail-top-bar .track-btn {
    all: unset;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    font-size: 14px;
    cursor: pointer;
}

.detail-top-bar .export-btn:hover,
.detail-top-bar .track-btn:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
    color: #475569;
}

/* Detail Right Section */
.detail-right-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
}

.export-btn,
.track-btn {
    /* Styles removed - now using action-button class */
}

/* Responsive Design for Detail Page */
@media (max-width: 1024px) {
    .detail-header {
        flex-direction: column;
        gap: 24px;
    }
    
    .detail-right-section {
        width: 100%;
        align-items: flex-start;
    }
    
    .detail-metrics-wrapper {
        width: 100%;
    }
    
    .detail-metrics {
        width: 100%;
        justify-content: flex-start;
    }
    
    .detail-bottom-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .detail-page {
        padding: 24px;
    }
    
    .back-button-container {
        padding: 0 24px; /* Match mobile detail-page padding */
    }
    
    .detail-top-bar {
        padding: 0 24px; /* Match mobile detail-page padding */
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .detail-actions {
        width: 100%;
        display: flex;
        gap: 12px;
    }
    
    .action-button {
        flex: 1;
        justify-content: center;
    }
    
    .detail-title-section h1 {
        font-size: 25.6px; /* 20% smaller than 32px */
    }
    
    .detail-description {
        font-size: 12.8px; /* 20% smaller than 16px */
    }
    
    .metric-card {
        padding: 20px;
        min-width: 120px;
    }
    
    .metric-value {
        font-size: 28px;
    }
    
    .detail-info-row {
        gap: 24px;
    }
    
    .detail-chart-container {
        padding: 20px;
    }
    
    .indicator-buttons {
        flex-wrap: wrap;
    }
    
    .company-info-box {
        padding: 16px 20px;
    }
    
    .info-box-content {
        font-size: 13px;
        line-height: 1.7;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 12px;
        padding-bottom: 35px; /* Adjusted for thinner nav bar on very small screens */
    }
    
    .nav-footer {
        padding: 2px 0;
        gap: 15px;
        height: 26px; /* 40% thinner */
    }
    
    .nav-icon {
        width: 22px; /* 30% smaller */
        height: 22px; /* 30% smaller */
    }
    
    .nav-icon svg {
        width: 12px; /* 30% smaller */
        height: 12px; /* 30% smaller */
    }
    
    .page-header {
        margin-bottom: 8px; /* Further reduced for very small screens */
    }
    
    .page-header h1 {
        font-size: 20px;
    }
    
    .filters-section {
        padding: 12px 12px 8px 12px; /* Reduced bottom padding */
        margin-bottom: 4px; /* Minimal gap to table */
    }
    
    .filter-group {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .dropdown-btn {
        padding: 10px;
        font-size: 12px;
    }
    
    .content-table th,
    .content-table td {
        padding: 8px 6px;
        font-size: 11px;
    }
    
    .content-table th:first-child,
    .content-table td:first-child {
        width: 140px;
        max-width: 140px;
        background-color: #fff;
        border-right: 1px solid #e5e7eb;
        box-shadow: 1px 0 3px rgba(0,0,0,0.1);
    }
    
    .content-table thead th:first-child {
        background-color: #f9fafb;
    }
    
    .content-table .app-info {
        width: 130px;
    }
    
    .content-table .app-info strong {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 12px;
    }
    
    .content-table .app-description {
        font-size: 10px;
        line-height: 1.3;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .newsletter-card {
        padding: 12px;
    }
    
    .newsletter-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .newsletter-header h3 {
        font-size: 14px;
    }
    
    .newsletter-header .date {
        font-size: 12px;
    }
    
    .newsletter-preview p {
        font-size: 13px;
    }
    
    .coming-soon {
        padding: 30px 15px;
    }
    
    .coming-soon h2 {
        font-size: 24px;
    }
    
    .coming-soon p {
        font-size: 14px;
    }
}

/* Detail Top Bar */
.detail-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 0 40px; /* Match the detail-page padding */
}

/* Back Button */
.back-button-container {
    margin-bottom: 24px;
    padding: 0 40px; /* Match the detail-page padding */
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.back-button:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
    color: #475569;
}

.back-button svg {
    width: 16px;
    height: 16px;
}

/* Error Container */
.error-container {
    text-align: center;
    padding: 64px 32px;
    max-width: 500px;
    margin: 0 auto;
}

.error-container h2 {
    color: #dc2626;
    margin-bottom: 16px;
    font-size: 24px;
}

.error-container p {
    color: #6b7280;
    margin-bottom: 32px;
    font-size: 16px;
}

