/* 
   Ping Pong Analysis - Professional Dashboard Styles
   Author: Samir Caizapasto
    */

/* CSS Reset & Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #3b82f6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary-color);
}

.logo i {
    font-size: 1.5rem;
    color: var(--accent-color);
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 8rem 0 4rem;
    margin-top: 70px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.hero-meta>div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.85;
    font-size: 0.95rem;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    max-width: 700px;
    margin: 0 auto;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.15);
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Main Content */
.main {
    padding: 4rem 0;
}

.section {
    margin-bottom: 4rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-header {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.section-title i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.content-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.lead {
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.highlight-box {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-left: 4px solid var(--primary-color);
    padding: 1.25rem 1.5rem;
    border-radius: var(--border-radius);
}

.highlight-box h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.highlight-box p {
    color: var(--text-secondary);
    margin: 0;
}

/* Objectives */
.objectives-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.objective-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.objective-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.main-objective {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid var(--warning-color);
}

.objective-card h3,
.objective-card h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.objective-card ul {
    list-style: none;
    padding-left: 0;
}

.objective-card li {
    padding: 0.4rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
}

.objective-card li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* Tables */
.stats-table table,
.inference-table table {
    width: 100%;
    border-collapse: collapse;
}

.stats-table th,
.stats-table td,
.inference-table th,
.inference-table td {
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.stats-table th,
.inference-table th {
    background: var(--bg-tertiary);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.stats-table tr:hover,
.inference-table tr:hover {
    background: var(--bg-secondary);
}

/* Categorical Variables */
.categorical-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.categorical-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 1.25rem;
    border: 1px solid var(--border-color);
}

.categorical-card h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1rem;
}

.freq-table {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.freq-row {
    display: grid;
    grid-template-columns: 1fr 2fr auto;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.freq-bar {
    height: 12px;
    background: var(--bg-tertiary);
    border-radius: 6px;
    overflow: hidden;
}

.freq-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 6px;
    transition: var(--transition);
}

/* Charts */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.chart-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.chart-card.full-width {
    grid-column: 1 / -1;
}

.chart-card h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.chart-container {
    margin-bottom: 1rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--bg-secondary);
}

.chart-image {
    width: 100%;
    height: auto;
    display: block;
}

.chart-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Inference Table Styles */
.success-row {
    background: rgba(16, 185, 129, 0.05);
}

.significant-row {
    background: rgba(239, 68, 68, 0.05);
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.badge.significant {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

/* Conclusions */
.conclusions-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.conclusion-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.conclusion-card.primary {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid var(--primary-color);
}

.conclusion-card h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.findings-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.finding-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.finding-number {
    background: var(--primary-color);
    color: white;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.finding-content h4 {
    margin-bottom: 0.25rem;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.finding-content p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 0;
}

.implications-list {
    list-style: none;
    padding: 0;
}

.implications-list li {
    padding: 0.625rem 0;
    padding-left: 1.5rem;
    position: relative;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.implications-list li:last-child {
    border-bottom: none;
}

.implications-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

/* Project Info */
.project-info {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.info-card h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.info-card p {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.github-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--text-primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    margin-top: 1rem;
    font-size: 0.95rem;
}

.github-link:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 1.5rem 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.footer-right a {
    color: white;
    font-size: 1.5rem;
    transition: var(--transition);
}

.footer-right a:hover {
    color: var(--accent-color);
}

/* Author Section */
.author-section {
    margin-top: 2rem;
}

.author-card {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-radius: var(--border-radius-lg);
    padding: 2.5rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    box-shadow: var(--shadow-xl);
}

.author-avatar {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #06b6d4 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.author-avatar i {
    font-size: 2.5rem;
    color: white;
}

.author-info-content {
    flex: 1;
}

.author-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.25rem;
}

.author-role {
    font-size: 1.1rem;
    color: #06b6d4;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.author-institution {
    color: #94a3b8;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.author-description {
    color: #cbd5e1;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.author-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.author-buttons a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition);
}

.btn-linkedin {
    background: #0077b5;
    color: white;
}

.btn-linkedin:hover {
    background: #005885;
    transform: translateY(-2px);
}

.btn-portfolio {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: white;
}

.btn-portfolio:hover {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
    transform: translateY(-2px);
}

.btn-github {
    background: #374151;
    color: white;
    border: 1px solid #4b5563;
}

.btn-github:hover {
    background: #4b5563;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        flex-direction: column;
        padding: 1rem;
        gap: 0.5rem;
        box-shadow: var(--shadow-lg);
    }

    .nav.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-meta {
        flex-direction: column;
        gap: 0.75rem;
    }

    .hero-stats {
        grid-template-columns: 1fr;
    }

    .objectives-grid,
    .categorical-grid,
    .charts-grid,
    .conclusions-grid,
    .info-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .content-card {
        padding: 1.25rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .author-card {
        flex-direction: column;
        text-align: center;
        padding: 2rem 1.5rem;
    }

    .author-avatar {
        width: 80px;
        height: 80px;
    }

    .author-avatar i {
        font-size: 2rem;
    }

    .author-name {
        font-size: 1.5rem;
    }

    .author-buttons {
        justify-content: center;
    }

    .author-buttons a {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    /* Table responsive */
    .stats-table,
    .inference-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .stats-table table,
    .inference-table table {
        min-width: 500px;
        font-size: 0.8rem;
    }

    .stats-table th,
    .stats-table td,
    .inference-table th,
    .inference-table td {
        padding: 0.5rem 0.6rem;
        font-size: 0.8rem;
    }

    .freq-table {
        font-size: 0.85rem;
    }

    .freq-table th,
    .freq-table td {
        padding: 0.4rem 0.5rem;
    }

    /* Cards padding reduction */
    .summary-card,
    .objective-card,
    .conclusion-card {
        padding: 1rem;
    }

    /* Chart images */
    .chart-image img {
        max-height: 250px;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Print styles */
@media print {

    .header,
    .footer {
        display: none;
    }

    .hero {
        margin-top: 0;
        padding: 1.5rem 0;
        background: white !important;
        color: black !important;
    }

    .content-card,
    .chart-card {
        box-shadow: none;
        border: 1px solid var(--border-color);
    }

    .section {
        opacity: 1;
        transform: none;
    }
}