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

:root {
    /* Color Palette - Common */
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.5);
    --secondary: #6366f1;
    --accent: #10b981;

    /* Layout */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --container-max: 1200px;
    --header-height: 80px;

    /* Transitions */
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Default Light Theme */
:root:not([data-theme='dark']),
[data-theme='light'] {
    --bg-dark: #ffffff;
    --bg-darker: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.9);
    --text-white: #0f172a;
    --text-gray: #475569;
    --glass-border: rgba(59, 130, 246, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --logo-color: linear-gradient(135deg, #1e293b, #3b82f6);
    --hero-overlay: rgba(255, 255, 255, 0.15); /* Restore original light overlay */
    --card-overlay: linear-gradient(transparent, rgba(255, 255, 255, 0.9));
    --placeholder-bg: linear-gradient(45deg, #f1f5f9, #e2e8f0);
    --lightbox-bg: rgba(255, 255, 255, 0.98);
    --lightbox-text: #0f172a;
    --logo-filter: none;
    --footer-heading: var(--primary);
    --hero-text-glow: rgba(255, 255, 255, 0.8);
    --modal-bg: rgba(255, 255, 255, 0.75);
}

/* Dark Theme Toggle */
[data-theme='dark'] {
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-white: #f8fafc;
    --text-gray: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --logo-color: linear-gradient(135deg, #fff, #94a3b8);
    --hero-overlay: rgba(2, 6, 23, 0.5); /* Revert dark overlay to original */
    --card-overlay: linear-gradient(transparent, rgba(2, 6, 23, 0.9));
    --placeholder-bg: linear-gradient(45deg, #1e293b, #0f172a);
    --lightbox-bg: rgba(2, 6, 23, 0.95);
    --lightbox-text: #f8fafc;
    --logo-filter: invert(1) brightness(1.5) contrast(1.2);
    --footer-heading: #ffffff;
    --hero-text-glow: rgba(255, 255, 255, 0.1);
    --modal-bg: rgba(2, 6, 23, 0.8);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-darker);
    color: var(--text-white);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

ul {
    list-style: none;
}

/* Reusable Components */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 2rem;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: 2rem;
    transition: var(--transition-smooth);
}

.glass-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px -10px var(--primary-glow);
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.8rem 2rem;
    border-radius: 5rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
    font-family: var(--font-heading);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px var(--primary-glow);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-white);
}

.btn-outline:hover {
    background: var(--glass-bg);
    border-color: var(--primary);
}

/* Hero Sections */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-align: center;
    padding-top: var(--header-height);
    background-image: url('../assets/hero_bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--hero-overlay);
    z-index: 1;
}

.hero-content {
    max-width: 900px;
    z-index: 2;
    position: relative;
    color: var(--text-white);
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    margin-bottom: 1.5rem;
    color: var(--text-white);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    text-shadow: 0 2px 10px var(--hero-text-glow);
    font-family: var(--font-heading);
}

[data-theme='dark'] .hero h1,
:root:not([data-theme='light']) .hero h1 {
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-gray);
}

/* Page Hero (Subpages) */
.page-hero {
    position: relative;
    padding: 12rem 0 6rem;
    background: linear-gradient(var(--hero-overlay), var(--hero-overlay)), url('../assets/hero_bg.png');
    background-size: cover;
    background-position: center;
    text-align: center;
    color: var(--text-white); /* Dynamic text color based on theme/background */
}

.page-hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin-bottom: 1.5rem;
    font-weight: 800;
    text-shadow: 0 2px 15px var(--hero-text-glow);
}

.page-hero p {
    color: var(--text-gray);
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto;
    font-weight: 500;
}

/* Form Controls */
.form-control {
    width: 100%;
    padding: 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 0.8rem;
    color: var(--text-white);
    font-family: inherit;
    transition: var(--transition-smooth);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--card-bg);
}

.form-control::placeholder {
    color: var(--text-gray);
    opacity: 0.6;
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header .tag {
    color: var(--primary);
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.2rem;
    font-size: 0.8rem;
    display: block;
    margin-bottom: 1rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto;
}

/* Animation Utilities */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Navigation */
header {
    height: var(--header-height);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: var(--transition-smooth);
    background: var(--bg-dark);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

[data-theme='dark'] header:not(.scrolled) {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

header.scrolled {
    background: var(--bg-dark);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    height: 70px;
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

[data-theme='dark'] header.scrolled {
    background: rgba(2, 6, 23, 0.8);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

nav {
    display: flex;
    justify-content: flex-start;
    /* Change from space-between */
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    transition: var(--transition-smooth);
    margin-right: 4rem;
    /* Specific gap instead of just space-between */
}

.logo-img {
    height: 42px;
    width: auto;
    filter: var(--logo-filter);
    transition: var(--transition-smooth);
    /* Background removed for PNG */
}

header.scrolled .logo-img {
    height: 32px;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-gray);
    letter-spacing: -0.01em;
    transition: var(--transition-smooth);
}

[data-theme='dark'] .nav-links a {
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.3); /* Subtle shadow for dark mode only if needed */
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    gap: 6px;
    cursor: pointer;
    border: none;
    background: transparent;
    border-radius: 50%;
    transition: var(--transition-smooth);
    z-index: 1001;
}

.menu-toggle:hover {
    background: var(--glass-bg);
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: var(--text-white);
    border-radius: 4px;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease,
                background-color 0.4s ease;
    transform-origin: center;
}

/* Theme Toggle Switch */
.theme-switch {
    display: flex;
    align-items: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 4px;
    border-radius: 50px;
    margin-left: 2rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.theme-switch svg {
    width: 20px;
    height: 20px;
    padding: 4px;
    border-radius: 50%;
    transition: var(--transition-smooth);
    fill: currentColor;
}

.theme-switch .sun {
    display: none;
}

.theme-switch .moon {
    display: block;
    color: var(--primary);
}

[data-theme='light'] .theme-switch .sun {
    display: block;
    color: var(--primary);
}

[data-theme='light'] .theme-switch .moon {
    display: none;
}

[data-theme='light'] header.scrolled {
    background: rgba(255, 255, 255, 0.8);
}

footer {
    padding: 4rem 0;
    background: var(--bg-darker);
    border-top: 1px solid var(--glass-border);
    color: var(--text-gray);
}

/* Mobile Menu Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    .nav-links {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        position: fixed;
        top: 0;
        right: -320px;
        width: 280px;
        height: 100vh;
        background: var(--bg-darker);
        z-index: 1000;
        transition: var(--transition-smooth);
        gap: 0;
        padding: 6rem 0;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.15rem;
        font-family: var(--font-heading);
        font-weight: 600;
        color: var(--text-gray);
        width: 100%;
        padding: 1.2rem 2.5rem;
        border-bottom: 1px solid var(--glass-border);
        transition: var(--transition-smooth);
    }

    .nav-links a:hover,
    .nav-links a.active {
        color: var(--primary);
        background: var(--glass-bg);
        padding-left: 3rem;
    }

    .menu-toggle {
        display: flex;
        position: relative;
    }

    /* Hamburger Animation - Enhanced & Smoother */
    .menu-toggle.active {
        background: var(--glass-bg);
        border: 1px solid var(--glass-border);
    }

    .menu-toggle.active span:nth-child(1) {
        transform: translateY(8.5px) rotate(45deg);
        background: var(--primary);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
        transform: translateX(-10px);
    }

    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-8.5px) rotate(-45deg);
        background: var(--primary);
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .theme-switch {
        margin-left: auto;
        margin-right: 1.5rem;
        z-index: 1001;
    }

    header.scrolled .nav-links {
        background: var(--bg-darker);
    }

    [data-theme='light'] .nav-links {
        background: #ffffff;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    }

    [data-theme='light'] .nav-links a {
        color: #475569;
        border-bottom-color: rgba(0, 0, 0, 0.05);
    }

    [data-theme='light'] .nav-links a:hover,
    [data-theme='light'] .nav-links a.active {
        color: var(--primary);
        background: rgba(59, 130, 246, 0.05);
    }

    [data-theme='light'] .menu-toggle span {
        background: #1e293b;
    }
}

/* Modal / Lightbox Components */
.modal, .lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--modal-bg);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 2rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
}

.modal.active, .lightbox.active {
    display: flex;
}

.modal-container, .lightbox-container {
    background: var(--bg-dark);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    max-width: 1000px;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    padding: 3rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-container {
    width: 90%;
}

.lightbox-container {
    width: 90%;
    max-width: 1100px;
    border: 2px solid var(--primary);
    padding: 2.5rem 2rem 1.5rem;
}

.table-container {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 0.5rem;
    border: 1px solid var(--glass-border);
}

.modal-header {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.modal-close, .lightbox-close {
    font-size: 2.5rem;
    color: var(--text-gray);
    cursor: pointer;
    line-height: 1;
    transition: var(--transition-smooth);
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    z-index: 10;
}

.modal-close:hover, .lightbox-close:hover {
    color: var(--primary);
    transform: rotate(90deg);
}

.modal-title {
    font-size: 2rem;
    color: var(--primary);
    margin: 0;
}

.modal-body {
    overflow-y: auto;
}

/* Lightbox Specific */
.lightbox-content {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 1rem;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
    object-fit: contain;
}

.gallery-nav {
    margin-top: 1.5rem;
    display: flex;
    gap: 2rem;
    align-items: center;
}

@media (max-width: 768px) {
    .modal-container {
        padding: 1.5rem;
        width: 95%;
    }

    .modal-title {
        font-size: 1.5rem;
    }
}

/* --- Page Specific Styles (Centralized) --- */

/* Home / Index Section */
.tech-section {
    padding: 8rem 0;
    background: linear-gradient(to bottom, var(--bg-darker), var(--bg-dark));
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.tech-card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    display: block;
}

.stats-bar {
    padding: 4rem 0;
    background: var(--bg-dark);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}

.stats-grid {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 2rem;
    text-align: center;
}

.stat-item h3 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-item p {
    color: var(--text-gray);
    font-weight: 500;
}

/* Company Page Styles */
.content-section {
    padding: 6rem 0;
}

.sub-nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}

.sub-nav a {
    padding: 0.5rem 1rem;
    border-bottom: 2px solid transparent;
    color: var(--text-gray);
    font-weight: 600;
}

.sub-nav a.active {
    color: var(--primary);
    border-color: var(--primary);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--glass-border);
    transform: translateX(-50%);
}

.timeline-item {
    margin-bottom: 4rem;
    position: relative;
    width: 50%;
    padding: 0 2rem;
}

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
    text-align: left;
}

.timeline-dot {
    position: absolute;
    top: 0;
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 50%;
    z-index: 10;
    box-shadow: 0 0 10px var(--primary-glow);
}

.timeline-item:nth-child(odd) .timeline-dot {
    right: -8px;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -8px;
}

.timeline-date {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.cert-card {
    text-align: center;
    padding: 1.5rem;
}

.cert-card img {
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    filter: grayscale(0.5);
    transition: var(--transition-smooth);
}

.cert-card:hover img {
    filter: grayscale(0);
}

.cert-card.interactive {
    cursor: pointer;
}

.cert-card.interactive:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
}

@media (max-width: 768px) {
    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        text-align: left !important;
        padding-left: 50px;
    }

    .timeline-item:nth-child(even) {
        left: 0;
    }

    .timeline-dot {
        left: 12px !important;
    }
}

/* Products Page Styles */
.product-section {
    padding: 8rem 0;
}

.product-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 4rem;
    align-items: center;
}

.product-meta:nth-child(even) {
    direction: rtl;
}

.product-meta:nth-child(even) .product-info {
    direction: ltr;
}

.product-img-wrapper {
    position: relative;
    border-radius: 2rem;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
}

.product-img-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition-smooth);
}

.product-img-wrapper:hover img {
    transform: scale(1.05);
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
    background: var(--glass-bg);
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.spec-table th,
.spec-table td {
    padding: 1.2rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.spec-table th {
    background: rgba(255, 255, 255, 0.03);
    color: var(--primary);
    width: 30%;
    font-weight: 700;
}

.spec-table td {
    color: var(--text-gray);
}

.core-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.core-card {
    padding: 0;
    overflow: hidden;
}

.core-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid var(--glass-border);
}

.core-card .info {
    padding: 2rem;
}

/* Gallery Page Styles */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.gallery-item {
    position: relative;
    border-radius: 1.5rem;
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    opacity: 0;
    transition: var(--transition-smooth);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.filter-btns {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.perf-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed; /* Fix layout to prevent breaking */
}

.perf-table th,
.perf-table td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-gray);
    vertical-align: middle;
    word-break: break-word; /* Wrap long text */
}

/* Table Column Widths */
.perf-table th:nth-child(1), .perf-table td:nth-child(1) { width: 80px; text-align: center; } /* 번호 */
.perf-table th:nth-child(2), .perf-table td:nth-child(2) { width: 120px; } /* 시공일시 */
.perf-table th:nth-child(3), .perf-table td:nth-child(3) { width: 150px; } /* 고객사명 */
.perf-table th:nth-child(4), .perf-table td:nth-child(4) { width: 220px; } /* 위치 */
/* 5th column takes remaining space */

.perf-table tr:hover {
    background: rgba(59, 130, 246, 0.05);
}

.perf-table th {
    color: var(--primary);
    font-weight: 700;
    background: var(--bg-darker);
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 0;
}

.page-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--glass-border);
    background: var(--bg-darker);
    color: var(--text-gray);
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.page-btn:hover:not(:disabled) {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Responsive Performance Table */
@media screen and (max-width: 768px) {
    .perf-table th:nth-child(2), .perf-table td:nth-child(2),
    .perf-table th:nth-child(3), .perf-table td:nth-child(3),
    .perf-table th:nth-child(5), .perf-table td:nth-child(5) {
        display: none;
    }

    .perf-table th:nth-child(1), .perf-table td:nth-child(1) { width: 60px; padding: 1rem 0.5rem; }
    .perf-table th:nth-child(4), .perf-table td:nth-child(4) { width: auto; padding: 1rem 0.5rem; }
    
    .modal-container {
        padding: 2rem 1.5rem;
    }
}

/* Spin Animation */
@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}