/* ==========================================
   DermoGraphics - Minimal Professional CSS
   ========================================== */

:root {
    /* Neutral Color Palette */
    --white: #ffffff;
    --off-white: #fafafa;
    --light-gray: #f5f5f5;
    --medium-gray: #e0e0e0;
    --dark-gray: #666666;
    --darker-gray: #333333;
    --black: #000000;
    
    /* Text Colors */
    --text-primary: var(--black);
    --text-secondary: var(--dark-gray);
    --text-muted: #999999;
    
    /* Background Colors */
    --bg-primary: var(--off-white);
    --bg-secondary: var(--white);
    --bg-card: var(--white);
    
    /* Border and Shadows */
    --border-color: var(--medium-gray);
    --border-light: #f0f0f0;
    --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 2px 8px rgba(0, 0, 0, 0.12);
    --shadow-strong: 0 4px 16px rgba(0, 0, 0, 0.15);
    
    /* Interactive States */
    --hover-bg: #f8f8f8;
    --active-bg: #eeeeee;
    
    /* Layout */
    --nav-height: 70px;
    --container-max: 1200px;
    --border-radius: 8px;
    --border-radius-large: 12px;
    
    /* Typography */
    --font-family: 'Gilroy', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Filter Buttons */
    --filter-btn-bg: var(--white);
    --filter-btn-border: var(--border-color);
    --filter-btn-hover: var(--hover-bg);
    --filter-btn-active: var(--darker-gray);
    --filter-btn-active-text: var(--white);
}

/* ========================================
   Reset & Base
   ======================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    font-size: 14px;
}

/* ========================================
   Layout
   ======================================== */

.main-content {
    flex: 1;
    margin-top: var(--nav-height);
    padding: 40px 0;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   Navigation
   ======================================== */

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--nav-height);
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand img {
    height: 40px;
    width: auto;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
    padding: 8px 0;
    transition: color 0.2s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--text-primary);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* ========================================
   Typography
   ======================================== */

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 16px;
    color: var(--text-secondary);
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
    text-align: center;
    padding: 80px 0;
    background: var(--white);
    border-bottom: 1px solid var(--border-light);
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
}

/* ========================================
   Stats Grid
   ======================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 60px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    text-align: center;
    transition: all 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================
   Cards
   ======================================== */

.professional-card,
.video-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: all 0.2s ease;
    cursor: pointer;
}

.professional-card:hover,
.video-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-strong);
    border-color: var(--darker-gray);
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-light);
}

.card-body {
    padding: 20px;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.card-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

/* ========================================
   Grids
   ======================================== */

.professionals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.videos-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 40px;
}

.video-card-compact {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-large);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.video-card-compact::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(135deg, var(--darker-gray), var(--black));
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.video-card-compact:hover {
    border-color: var(--darker-gray);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.video-card-compact:hover::before {
    transform: scaleY(1);
}

.video-thumbnail-small {
    position: relative;
    flex: 0 0 180px;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--light-gray), var(--medium-gray));
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.video-thumbnail-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-card-compact:hover .video-thumbnail-small img {
    transform: scale(1.05);
}

.video-ai-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #000000, #333333);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
}

.video-info {
    flex: 1;
    min-width: 0;
}

.video-title-compact {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 12px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.video-card-compact:hover .video-title-compact {
    color: var(--black);
}

.video-channel-compact {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: var(--off-white);
    border-radius: 20px;
    width: fit-content;
}

.video-channel-compact img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.video-channel-compact span {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 600;
}

.video-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 8px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.video-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    font-weight: 500;
}

.video-meta i {
    font-size: 0.8rem;
}

.video-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 4px 0;
}

/* Modern stat cards for videos page */
.stat-card-modern {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-large);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--darker-gray), var(--black));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stat-card-modern:hover::before {
    transform: scaleX(1);
}

.stat-card-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--light-gray), var(--medium-gray));
    color: var(--text-primary);
    font-size: 1.25rem;
}

.stat-icon.ai-icon {
    background: linear-gradient(135deg, var(--darker-gray), var(--black));
    color: white;
}

.stat-icon.views-icon {
    background: linear-gradient(135deg, #666666, #333333);
    color: white;
}

.stat-icon.likes-icon {
    background: linear-gradient(135deg, #999999, #666666);
    color: white;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Video card animations */
.videos-list .video-card-compact {
    animation: slideInUp 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

.videos-list .video-card-compact:nth-child(1) { animation-delay: 0.1s; }
.videos-list .video-card-compact:nth-child(2) { animation-delay: 0.2s; }
.videos-list .video-card-compact:nth-child(3) { animation-delay: 0.3s; }
.videos-list .video-card-compact:nth-child(4) { animation-delay: 0.4s; }
.videos-list .video-card-compact:nth-child(5) { animation-delay: 0.5s; }

@keyframes slideInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Filters
   ======================================== */

.filters-section {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-large);
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

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

.filters-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.filters-reset {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 8px 16px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.filters-reset:hover {
    background: var(--hover-bg);
    border-color: var(--darker-gray);
}

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

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.filter-select,
.filter-input {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    background: var(--white);
    transition: border-color 0.2s ease;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: var(--darker-gray);
}

/* ========================================
   Analytics Charts
   ======================================== */

.chart-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 32px;
    overflow: hidden;
}

.chart-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chart-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}

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

.chart-option {
    padding: 6px 12px;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chart-option:hover {
    background: var(--hover-bg);
}

.chart-option.active {
    background: var(--text-primary);
    color: var(--white);
    border-color: var(--text-primary);
}

.chart-body {
    padding: 20px;
}

/* ========================================
   Buttons
   ======================================== */

.btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--text-primary);
    color: var(--white);
    text-decoration: none;
    border-radius: var(--border-radius);
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.btn:hover {
    background: var(--darker-gray);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--white);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--hover-bg);
    border-color: var(--darker-gray);
}

/* Filter Buttons */
.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--filter-btn-bg);
    color: var(--text-primary);
    border: 1px solid var(--filter-btn-border);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.filter-btn:hover {
    background: var(--filter-btn-hover);
    border-color: var(--darker-gray);
    transform: translateY(-1px);
}

.filter-btn.active {
    background: var(--filter-btn-active);
    color: var(--filter-btn-active-text);
    border-color: var(--filter-btn-active);
}

.filter-btn i {
    font-size: 0.8rem;
}

/* Custom Chart Styles */
.question-section {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-large);
    padding: 32px;
    margin-bottom: 32px;
}

.question-header {
    margin-bottom: 32px;
}

.question-id {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--black);
    margin-bottom: 8px;
}

.question-text {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.question-total {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.custom-chart {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chart-bar-item {
    display: flex;
    align-items: center;
    gap: 20px;
}

.bar-label {
    flex: 0 0 400px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bar-option {
    font-weight: 700;
    color: var(--black);
    font-size: 0.875rem;
}

.bar-description {
    color: var(--text-primary);
    font-size: 0.875rem;
    line-height: 1.4;
    font-weight: 500;
}

.bar-container {
    flex: 1;
    position: relative;
    height: 40px;
    display: flex;
    align-items: center;
}

.bar-background {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    right: 0;
    height: 24px;
    background: var(--light-gray);
    border-radius: 12px;
}

.bar-fill {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    height: 24px;
    background: linear-gradient(135deg, var(--darker-gray) 0%, var(--black) 100%);
    border-radius: 12px;
    min-width: 2px;
    transition: width 0.8s ease-out;
}

.bar-stats {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 600;
}

.bar-count {
    color: var(--white);
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.bar-percentage {
    color: var(--black);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .chart-bar-item {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .bar-label {
        flex: none;
    }
    
    .bar-stats {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        justify-content: space-between;
        margin-top: 8px;
    }
}

/* ========================================
   Tables
   ======================================== */

.table-container {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--white);
}

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

th {
    background: var(--light-gray);
    padding: 12px 16px;
    font-weight: 600;
    font-size: 0.875rem;
    text-align: left;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

tr:hover {
    background: var(--hover-bg);
}

/* ========================================
   Footer
   ======================================== */

.footer {
    background: var(--white);
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    margin-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
}

.footer-section h4 {
    font-size: 1rem;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.footer-section p,
.footer-section a {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
    line-height: 1.6;
}

.footer-section a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    border-top: 1px solid var(--border-light);
    margin-top: 32px;
    padding-top: 24px;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ========================================
   Utilities
   ======================================== */

.mt-5 { margin-top: 48px; }
.mb-5 { margin-bottom: 48px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: var(--nav-height);
        flex-direction: column;
        background: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-medium);
        padding: 20px;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .professionals-grid,
    .videos-grid {
        grid-template-columns: 1fr;
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}