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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.main-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto;
}
.subtitle a {
    color: white;
    text-decoration: none;
}
.subtitle a:hover {
    text-decoration: underline;
}

/* Navigation Styles */
.navigation {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

.nav-link {
    display: block;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.nav-link:hover,
.nav-link.active {
    color: #3498db;
    border-bottom-color: #3498db;
    background-color: #f8f9fa;
}

/* Main Content */
.main-content {
    padding: 2rem 0;
}

.section {
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #3498db;
}

.content-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
}

.intro-text {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    color: #555;
}

.figure-description,
.table-description {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    color: #555;
    font-style: italic;
}

.references {
    font-size: 0.8rem;
    line-height: 1.7;
    margin-top: 2rem;
    list-style: none;
}
.references li {
    margin-bottom: 0.5rem;
    font-style: italic;
    margin-left: 2rem;
    text-indent: -2rem;
}
.references li,
.references li a {
    color: #555;
}

/* Research Highlights */
.research-highlights h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.research-highlights ul {
    list-style: none;
    padding-left: 0;
}

.research-highlights li {
    padding: 0.8rem 0;
    border-bottom: 1px solid #eee;
    font-size: 1.05rem;
}

.research-highlights li:last-child {
    border-bottom: none;
}

.research-highlights strong {
    color: #3498db;
    font-weight: 600;
}

/* Framing Explanation */
.framing-explanation {
    margin-bottom: 2rem;
}

.framing-explanation h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.framing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.framing-item {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.framing-item h4 {
    color: #2c3e50;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.framing-item i {
    color: #3498db;
}

.framing-item p {
    color: #666;
    font-size: 0.95rem;
}

/* Analysis Summary */
.analysis-summary {
    margin-bottom: 2rem;
}

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

.stat-card {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
}

.stat-card h3 {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    display: block;
}

/* Table Controls */
.table-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.search-input,
.filter-select {
    padding: 0.8rem 1rem;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: white;
}

.search-input {
    flex: 1;
    min-width: 250px;
}

.search-input:focus,
.filter-select:focus {
    outline: none;
    border-color: #3498db;
}

.filter-select {
    min-width: 150px;
}

/* Table Styles */
.figure-wrapper img {
    max-width: 100%;
}

.figure-wrapper,
.table-wrapper {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 0.95rem;
}

.data-table th {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

.data-table tbody tr {
    transition: background-color 0.2s ease;
}

.data-table tbody tr:hover {
    background-color: #f8f9fa;
}

.data-table tbody tr.current-study {
    background-color: #e3f2fd;
    border-left: 4px solid #3498db;
}

.data-table tbody tr.current-study:hover {
    background-color: #d1ecf1;
}

.data-table tbody tr.hidden {
    display: none;
}

.data-table strong {
    color: #2c3e50;
    font-weight: 600;
}

/* Table Cell Highlighting */
.highlight-positive {
    background-color: #d4edda;
    color: #155724;
    font-weight: 600;
    text-align: center;
}

.highlight-high {
    background-color: #b8daff;
    color: #004085;
    font-weight: 600;
    text-align: center;
}

.highlight-zero {
    background-color: #f8d7da;
    color: #721c24;
    font-weight: 600;
    text-align: center;
}

/* Intensity Badges */
.intensity-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    color: white;
    text-align: center;
    min-width: 40px;
}

.intensity-0 { background-color: #6c757d; }
.intensity-2 { background-color: #ffc107; color: #212529; }
.intensity-3 { background-color: #fd7e14; }
.intensity-4 { background-color: #dc3545; }
.intensity-5 { background-color: #d63384; }

/* Table Titles */
.figure-title,
.table-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e1e8ed;
}

/* Scene Analysis */
.scene-analysis {
    margin-bottom: 3rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.scene-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.scene-info {
    background: white;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
    border: 1px solid #e1e8ed;
}

/* Dialogue Table Styling */
.dialogue-table {
    font-size: 0.9rem;
}

.dialogue-table td {
    vertical-align: top;
    line-height: 1.6;
}

.dialogue-table td:first-child {
    width: 200px;
    font-weight: 600;
    background-color: #f8f9fa;
}

.dialogue-table td:last-child {
    width: auto;
    padding-left: 1.5rem;
}

/* Sort Indicators */
.data-table th {
    position: relative;
}

.data-table th.sort-asc,
.data-table th.sort-desc {
    background: linear-gradient(135deg, #2980b9, #3498db);
}

.data-table th i {
    transition: all 0.3s ease;
}

.data-table th:hover i {
    opacity: 0.8 !important;
}

/* Scroll to Top Button */
.scroll-to-top-button {
    border: none !important;
    outline: none !important;
}

.scroll-to-top-button:focus {
    outline: 2px solid #3498db !important;
    outline-offset: 2px !important;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer p {
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1.1rem;
    }
    
    .nav-list {
        flex-direction: column;
    }
    
    .content-card {
        padding: 1.5rem;
    }
    
    .table-controls {
        flex-direction: column;
    }
    
    .search-input {
        min-width: 100%;
    }
    
    .data-table {
        font-size: 0.9rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.8rem 0.5rem;
    }
    
    .framing-grid {
        grid-template-columns: 1fr;
    }
    
    .summary-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .main-title {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .content-card {
        padding: 1rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.6rem 0.4rem;
        font-size: 0.85rem;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus styles for accessibility */
.nav-link:focus,
.search-input:focus,
.filter-select:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .navigation,
    .table-controls,
    .footer {
        display: none;
    }
    
    .content-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .data-table {
        font-size: 0.8rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.5rem;
    }
}
