/* Academic Research Website Styles - Black & White Theme */

/* Import Google Fonts - Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* CSS Variables for Design System */
:root {
    /* Colors */
    --primary-color: #000000;
    --secondary-color: #666666;
    --background-color: #ffffff;
    --surface-color: #ffffff;
    --text-primary: #000000;
    --text-secondary: #666666;
    --text-muted: #999999;
    --border-color: #000000;
    --border-light: #e0e0e0;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --error-color: #dc3545;
    
    /* Typography */
    --font-family: 'Inter', sans-serif;
    --font-size-xs: 0.75rem;    /* 12px */
    --font-size-sm: 0.875rem;   /* 14px */
    --font-size-base: 1rem;     /* 16px */
    --font-size-lg: 1.125rem;   /* 18px */
    --font-size-xl: 1.25rem;    /* 20px */
    --font-size-2xl: 1.5rem;    /* 24px */
    --font-size-3xl: 1.875rem;  /* 30px */
    --font-size-4xl: 2.25rem;   /* 36px */
    
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;
    
    /* Spacing */
    --spacing-xs: 0.25rem;   /* 4px */
    --spacing-sm: 0.5rem;    /* 8px */
    --spacing-md: 1rem;      /* 16px */
    --spacing-lg: 1.5rem;    /* 24px */
    --spacing-xl: 2rem;      /* 32px */
    --spacing-2xl: 3rem;     /* 48px */
    
    /* Border Radius */
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 12px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-normal);
    color: var(--text-primary);
    background-color: var(--background-color);
}

/* Universal font size for all text elements except headings */
p, span, div, a, li, td, th, label, input, textarea, select, button {
    font-size: 14px !important;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

h1 { 
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
}
h2 { 
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-semibold);
}
h3 { 
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-semibold);
}
h4 { 
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-medium);
}
h5 { 
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
}
h6 { 
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
}

.text-small {
    font-size: var(--font-size-sm);
}

.text-large {
    font-size: var(--font-size-lg);
}

.text-muted {
    color: var(--text-muted);
}

.text-secondary {
    color: var(--text-secondary);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 250px;
    background-color: #ffffff;
    border-right: 2px solid #000000;
    padding: 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    left: 0;
}

.sidebar-header {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid #000000;
    background-color: #000000;
}

.sidebar-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffffff;
    text-align: center;
}

.nav-links {
    list-style: none;
    padding: 0;
}

.nav-links li {
    border-bottom: 1px solid #000000;
}

.nav-links a {
    display: block;
    padding: 1rem 1rem;
    text-decoration: none;
    color: #000000;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-links a:hover {
    background-color: #000000;
    color: #ffffff;
}

.nav-links a.active {
    background-color: #000000;
    color: #ffffff;
    font-weight: 600;
}

/* Main Content Styles */
.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 0;
    width: calc(100vw - 250px);
}

.content-header {
    background-color: #ffffff;
    border-bottom: 2px solid #000000;
    padding: 2rem 3rem;
}

.content-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #000000;
    margin: 0;
}

.content-body {
    padding: 3rem;
    width: 100%;
    max-width: none;
}

/* Research Description Styles */
.research-description {
    line-height: 1.8;
}

.research-description h2 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: #000000;
    border-bottom: 2px solid #000000;
    padding-bottom: 0.5rem;
}

.research-title h3 {
    font-size: 1.4rem;
    margin-bottom: 2rem;
    color: #000000;
    font-weight: 600;
    text-align: justify;
}

.research-content h4 {
    font-size: 1.2rem;
    margin: 2rem 0 1rem 0;
    color: #000000;
    font-weight: 600;
}

.research-content p {
    margin-bottom: 1.5rem;
    text-align: justify;
    color: #000000;
}

.research-objectives ul {
    margin-left: 2rem;
    margin-bottom: 2rem;
}

.research-objectives li {
    margin-bottom: 0.5rem;
    color: #000000;
}

.methodology {
    background-color: #ffffff;
    padding: 2rem;
    border-left: 4px solid #000000;
    margin-top: 2rem;
}

/* Experiment Page Styles */
.experiment-page {
    text-align: center;
    padding: 3rem 0;
}

.experiment-header h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #000000;
}

.experiment-content {
    max-width: 600px;
    margin: 0 auto;
}

.experiment-placeholder {
    font-size: 1.1rem;
    color: #000000;
    margin-bottom: 2rem;
    font-style: italic;
}

.experiment-status {
    margin-top: 2rem;
}

.status-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #ffffff;
    color: #000000;
    border: 1px solid #000000;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }
    
    .main-content {
        margin-left: 200px;
    }
    
    .content-body {
        padding: 2rem;
    }
    
    .content-header {
        padding: 1.5rem 2rem;
    }
    
    .content-header h1 {
        font-size: 1.6rem;
    }
}

/* Experiment 0 specific styles */
.experiment-content {
    max-width: 1000px;
}

.data-section {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #000000;
    background: white;
}

.data-controls {
    margin-top: 15px;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-lg);
    background-color: var(--surface-color);
    color: var(--primary-color);
    text-decoration: none;
    border: 2px solid var(--primary-color);
    cursor: pointer;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    font-family: var(--font-family);
    transition: all 0.3s ease;
    text-align: center;
    border-radius: var(--border-radius-sm);
    line-height: var(--line-height-normal);
}

.btn:hover {
    background-color: var(--primary-color);
    color: var(--surface-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.btn:disabled {
    background-color: var(--text-muted);
    color: var(--surface-color);
    border-color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.6;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--surface-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--surface-color);
    color: var(--primary-color);
}

.btn-success {
    background-color: var(--success-color);
    border-color: var(--success-color);
    color: var(--surface-color);
}

.btn-success:hover {
    background-color: var(--surface-color);
    color: var(--success-color);
    border-color: var(--success-color);
}

.btn-large {
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
}

.btn-small {
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: var(--font-size-xs);
}

.btn-next {
    background-color: var(--primary-color);
    color: var(--surface-color);
    border: 2px solid var(--primary-color);
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.btn-next:hover {
    background-color: var(--surface-color);
    color: var(--primary-color);
}

.loading-indicator {
    margin-top: 10px;
    font-style: italic;
    color: black;
}

.statistics-section {
    margin-top: 30px;
    padding: 20px;
    border: 1px solid #000000;
    background: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    margin: var(--spacing-lg) 0;
}

.stat-card {
    padding: var(--spacing-lg);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-md);
    background: var(--surface-color);
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

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

.stat-card h3 {
    margin: 0 0 var(--spacing-xs) 0;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: black;
    font-family: var(--font-universal-sans),ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
}

.additional-stats {
    margin-top: 30px;
}

.additional-stats h3 {
    margin-bottom: 15px;
    font-size: 18px;
    color: black;
    border-bottom: 1px solid #000000;
    padding-bottom: 5px;
}

.info-grid {
    display: grid;
    gap: 10px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #000000;
}

.info-label {
    font-weight: 500;
    color: black;
}

.info-value {
    font-weight: 600;
    color: black;
}

/* Data table styles */
.data-table-section {
    background: #ffffff;
    border: 1px solid #000000;
    padding: 20px;
    margin-bottom: 20px;
}

.data-table-section h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    color: #000000;
}

.table-container {
    margin-top: var(--spacing-lg);
    border: 2px solid var(--border-color);
    background: var(--surface-color);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 10px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
}

.data-table th {
    background-color: var(--primary-color);
    color: var(--surface-color);
    padding: var(--spacing-md) var(--spacing-sm);
    text-align: left;
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-sm);
    border-bottom: 2px solid var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 10;
    border-right: 1px solid #ffffff;
}

.data-table th:last-child {
    border-right: none;
}

.data-table td {
    padding: var(--spacing-sm);
    border-bottom: 1px solid var(--border-light);
    vertical-align: top;
    color: var(--text-primary);
    line-height: var(--line-height-normal);
    border-right: 1px solid #000000;
}

.data-table td:last-child {
    border-right: none;
}

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

.data-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.data-table tr:hover {
    background-color: #e9ecef;
    transition: background-color 0.2s ease;
}

.amount-cell {
    text-align: right;
    font-weight: 600;
}

.abn-cell {
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

.table-info {
    font-size: 12px;
    color: #000000;
    font-style: italic;
}

/* Modal base styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #ffffff;
    border: 2px solid #000000;
    border-radius: 0;
    box-shadow: none;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #000000;
    background-color: #ffffff;
}

.modal-header .close {
    font-size: 24px;
    font-weight: bold;
    color: #000000;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    margin: 0;
    line-height: 1;
}

.modal-header .close:hover {
    color: #666666;
}

.modal-body {
    padding: 20px;
}

/* Custom modal content styles (Bootstrap compatible) */

#jsonDisplay {
    background: #ffffff;
    border: 1px solid #000000;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.4;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 400px;
    overflow-y: auto;
    color: #000000;
}

.format-description h4 {
    color: #000000;
    margin-bottom: 15px;
    font-size: 1.1em;
    font-weight: 600;
}

.format-example {
    background: #ffffff;
    border: 1px solid #000000;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.4;
    color: #000000;
    margin-bottom: 15px;
}

.format-description p {
    margin: 10px 0;
    color: #000000;
}

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

/* Button styles */
.btn-secondary {
    background: #ffffff;
    color: #000000;
    border: 2px solid #000000;
}

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

.btn-info {
    background: #ffffff;
    color: #000000;
    border: 2px solid #000000;
}

.btn-info:hover {
    background: #000000;
    color: #ffffff;
}

.data-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.navigation-section {
    margin-top: 30px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #000000;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .info-item {
        flex-direction: column;
        gap: 5px;
    }
    
    .info-label, .info-value {
        text-align: left;
    }
    
    .data-table {
        font-size: 12px;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 4px;
    }
    
    .abn-cell {
        font-size: 10px;
    }
    
    /* Modal responsive styles */
    .modal-content {
        width: 95%;
        margin: 2% auto;
        max-height: 90vh;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-header h3 {
        font-size: 1.1em;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    #jsonDisplay,
    .format-example {
        font-size: 11px;
        padding: 10px;
    }
    
    .data-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .data-controls .btn {
        margin-bottom: 5px;
    }
}

@media (max-width: 576px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .nav-links {
        display: flex;
        overflow-x: auto;
    }
    
    .nav-links li {
        border-bottom: none;
        border-right: 1px solid #000000;
        min-width: 120px;
    }
}