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

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --success-color: #4ade80;
    --warning-color: #fbbf24;
    --danger-color: #f87171;
    --info-color: #60a5fa;
    --dark-bg: #1a1a2e;
    --dark-card: #16213e;
    --light-bg: #f8f9fa;
    --text-dark: #2d3748;
    --text-light: #e2e8f0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: all 0.3s ease;
}

body.dark-mode {
    background: var(--dark-bg);
    color: var(--text-light);
}

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-small {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(102, 126, 234, 0.3);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loading-text {
    color: white;
    margin-top: 20px;
    font-size: 1.2em;
    animation: pulse 1.5s ease-in-out infinite;
}

.loading-subtext {
    color: rgba(255, 255, 255, 0.8);
    margin-top: 10px;
    font-size: 0.9em;
}

.loading-content {
    text-align: center;
    padding: 100px 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body.dark-mode .header {
    background: var(--dark-card);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5em;
    font-weight: bold;
}

.logo-icon {
    font-size: 1.8em;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

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

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(10px);
}

.stats-bar {
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

body.dark-mode .stat-item {
    background: var(--dark-card);
}

.stat-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    font-size: 2em;
}

.stat-value {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.85em;
    color: #718096;
}

body.dark-mode .stat-label {
    color: #a0aec0;
}

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

.search-box {
    position: relative;
    background: white;
    border-radius: 50px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transition: all 0.3s ease;
}

body.dark-mode .search-box {
    background: var(--dark-card);
}

.search-box:focus-within {
    transform: scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.search-input {
    width: 100%;
    padding: 18px 60px 18px 25px;
    border: none;
    font-size: 1.1em;
    outline: none;
    background: transparent;
    color: var(--text-dark);
}

body.dark-mode .search-input {
    color: var(--text-light);
}

.search-icon {
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.3em;
    color: var(--primary-color);
}

.filters {
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 20px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-label {
    color: white;
    font-weight: 600;
    font-size: 1.1em;
}

body.dark-mode .filter-label {
    color: var(--text-light);
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid white;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.filter-btn:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.container {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
}

.sidebar {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 100px;
    height: fit-content;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

body.dark-mode .sidebar {
    background: var(--dark-card);
}

.sidebar-title {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 20px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-item {
    padding: 12px 15px;
    margin: 8px 0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.nav-item:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateX(5px);
}

.nav-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.nav-icon {
    font-size: 1.2em;
}

.content {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    min-height: 600px;
}

body.dark-mode .content {
    background: var(--dark-card);
}

.section {
    margin-bottom: 50px;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-title {
    font-size: 2.2em;
    color: var(--primary-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

body.dark-mode .section-title {
    color: var(--accent-color);
}

.section-subtitle {
    font-size: 1.1em;
    color: #718096;
    margin-bottom: 25px;
}

body.dark-mode .section-subtitle {
    color: #a0aec0;
}

.info-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
    border-left: 5px solid var(--primary-color);
    transition: all 0.3s ease;
}

body.dark-mode .info-card {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
}

.info-card:hover {
    transform: translateX(5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.info-card.success {
    border-left-color: var(--success-color);
}

.info-card.warning {
    border-left-color: var(--warning-color);
}

.info-card.danger {
    border-left-color: var(--danger-color);
}

.info-card.info {
    border-left-color: var(--info-color);
}

.info-card-title {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: all 0.3s ease;
    border-top: 4px solid var(--primary-color);
}

body.dark-mode .stat-card {
    background: var(--dark-card);
}

.stat-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.stat-card .stat-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.stat-card .stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: var(--primary-color);
    margin: 10px 0;
}

.stat-card .stat-label {
    font-size: 1.1em;
    color: #718096;
}

body.dark-mode .stat-card .stat-label {
    color: #a0aec0;
}

.table-container {
    overflow-x: auto;
    margin: 25px 0;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

body.dark-mode table {
    background: var(--dark-card);
}

thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

th {
    padding: 18px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 0.5px;
}

td {
    padding: 15px 18px;
    border-bottom: 1px solid #e2e8f0;
}

body.dark-mode td {
    border-bottom-color: #2d3748;
}

tbody tr {
    transition: all 0.3s ease;
}

tbody tr:hover {
    background: #f8f9fa;
    transform: scale(1.01);
}

body.dark-mode tbody tr:hover {
    background: #2d3748;
}

.code-block {
    background: #2d3748;
    color: #e2e8f0;
    padding: 25px;
    border-radius: 12px;
    overflow-x: auto;
    margin: 20px 0;
    font-family: 'Courier New', monospace;
    font-size: 0.95em;
    line-height: 1.6;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
}

.code-block::before {
    content: '💻 Code';
    position: absolute;
    top: 10px;
    right: 15px;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 0.8em;
}

.badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    margin: 3px;
}

.badge-primary { background: var(--primary-color); color: white; }
.badge-success { background: var(--success-color); color: white; }
.badge-warning { background: var(--warning-color); color: #1a202c; }
.badge-danger { background: var(--danger-color); color: white; }
.badge-info { background: var(--info-color); color: white; }

.accordion {
    margin: 20px 0;
}

.accordion-item {
    background: white;
    border-radius: 10px;
    margin: 10px 0;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

body.dark-mode .accordion-item {
    background: var(--dark-card);
}

.accordion-header {
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 1.1em;
    transition: all 0.3s ease;
}

.accordion-header:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.accordion-icon {
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-item.active .accordion-content {
    max-height: 3000px;
}

.accordion-body {
    padding: 20px;
    border-top: 1px solid #e2e8f0;
}

body.dark-mode .accordion-body {
    border-top-color: #2d3748;
}

.tabs {
    margin: 30px 0;
}

.tab-buttons {
    display: flex;
    gap: 10px;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 25px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    color: #718096;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

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

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-content.active {
    display: block;
}

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

.footer {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    color: white;
    padding: 40px 20px;
    margin-top: 50px;
    text-align: center;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.footer-link {
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-link:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}

.mobile-menu-btn {
    display: none;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5em;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.sidebar-overlay.active {
    display: block;
}

.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 998;
}

.scroll-top.visible {
    opacity: 1;
    pointer-events: all;
}

.scroll-top:hover {
    transform: translateY(-5px);
}

.highlight {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

body.dark-mode .highlight {
    background: linear-gradient(135deg, #f39c12 0%, #f1c40f 100%);
    color: #1a202c;
}

.example-box {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
}

body.dark-mode .example-box {
    background: #1e3a5f;
    border-left-color: #60a5fa;
}

.example-title {
    font-weight: bold;
    margin-bottom: 10px;
    color: #1976d2;
}

body.dark-mode .example-title {
    color: #60a5fa;
}

ul, ol {
    margin: 15px 0 15px 30px;
}

li {
    margin: 10px 0;
    line-height: 1.8;
}

li::marker {
    color: var(--primary-color);
    font-weight: bold;
}

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 10px 16px;
    border: 2px solid var(--primary-color);
    background: white;
    color: var(--primary-color);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 45px;
}

body.dark-mode .pagination-btn {
    background: var(--dark-card);
    color: var(--text-light);
}

.pagination-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.pagination-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: var(--secondary-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.pagination-dots {
    padding: 0 8px;
    color: var(--primary-color);
    font-weight: bold;
}

.data-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    flex-wrap: wrap;
    gap: 15px;
}

body.dark-mode .data-controls {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
}

.items-per-page {
    display: flex;
    align-items: center;
    gap: 10px;
}

.items-per-page label {
    font-weight: 600;
    color: var(--text-dark);
}

body.dark-mode .items-per-page label {
    color: var(--text-light);
}

.items-per-page select {
    padding: 8px 15px;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    background: white;
    color: var(--text-dark);
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

body.dark-mode .items-per-page select {
    background: var(--dark-card);
    color: var(--text-light);
}

.items-per-page select:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.page-info {
    font-weight: 600;
    color: var(--text-dark);
}

body.dark-mode .page-info {
    color: var(--text-light);
}

@media (max-width: 768px) {
    .pagination {
        gap: 5px;
    }
    
    .pagination-btn {
        padding: 8px 12px;
        font-size: 0.85em;
        min-width: 40px;
    }
    
    .data-controls {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .page-info {
        font-size: 0.9em;
    }
}

@media (max-width: 1024px) {
    .container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        left: -300px;
        top: 0;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
        max-height: 100vh;
    }

    .sidebar.active {
        left: 0;
    }

    .mobile-menu-btn {
        display: block;
    }
}

@media (max-width: 768px) {
    .header-content {
        justify-content: center;
    }

    .logo {
        font-size: 1.2em;
    }

    .search-input {
        font-size: 1em;
        padding: 15px 50px 15px 20px;
    }

    .filters {
        justify-content: center;
    }

    .content {
        padding: 25px 20px;
    }

    .section-title {
        font-size: 1.8em;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .tab-buttons {
        justify-content: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1em;
    }

    .btn {
        padding: 8px 15px;
        font-size: 0.85em;
    }

    .section-title {
        font-size: 1.5em;
    }

    .stat-number {
        font-size: 2em;
    }
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

body.dark-mode ::-webkit-scrollbar-track {
    background: #2d3748;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}