/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: 
        linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
        url('background.png'),
        #001122;
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
    color: #ffffff;
    line-height: 1.6;
    font-size: 16px;
    position: relative;
}



.app-container {
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
    padding: 0 24px;
    position: relative;
}

/* Decorative Particles */
.decoration-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(0, 102, 204, 0.6) 50%, transparent 100%);
    box-shadow: 0 0 20px rgba(0, 102, 204, 0.4);
    filter: blur(0.5px);
}

.particle-1 {
    width: 8px;
    height: 8px;
    top: 20%;
    left: 10%;
    animation: float 15s ease-in-out infinite;
}

.particle-2 {
    width: 12px;
    height: 12px;
    top: 60%;
    right: 15%;
    animation: float 12s ease-in-out infinite reverse;
}

.particle-3 {
    width: 6px;
    height: 6px;
    top: 40%;
    left: 80%;
    animation: float 18s ease-in-out infinite;
}

.particle-4 {
    width: 10px;
    height: 10px;
    top: 80%;
    left: 20%;
    animation: float 14s ease-in-out infinite reverse;
}

.particle-5 {
    width: 8px;
    height: 8px;
    top: 30%;
    right: 40%;
    animation: float 16s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) translateX(0px) scale(1);
        opacity: 0.6;
    }
    25% {
        transform: translateY(-30px) translateX(15px) scale(1.2);
        opacity: 0.8;
    }
    50% {
        transform: translateY(-15px) translateX(-20px) scale(0.8);
        opacity: 0.5;
    }
    75% {
        transform: translateY(-35px) translateX(10px) scale(1.1);
        opacity: 0.9;
    }
}

/* Header */
.app-header {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 3rem;
    margin: 2rem 0;
    text-align: left;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.header-content h1 {
    font-size: 3.5rem;
    font-weight: 400;
    margin-bottom: 1rem;
    color: #ffffff;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-content h1 i {
    color: #4ade80;
    font-size: 3rem;
}

.header-content p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 400;
    max-width: 700px;
    margin: 0;
    line-height: 1.5;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Navigation */
.nav-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    padding: 0.5rem;
    margin-bottom: 2rem;
    gap: 0.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.nav-tab {
    padding: 1rem 2rem;
    background: none;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.85);
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.nav-tab:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
}

.nav-tab.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    font-weight: 600;
}

/* Loading */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    color: #7f8c8d;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #ecf0f1;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

.tab-content {
    display: none;
}

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

/* Dashboard */
.dashboard-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    gap: 2rem;
    flex-wrap: wrap;
}

.search-filter {
    position: relative;
    flex: 1;
    min-width: 300px;
}

.search-filter input {
    width: 100%;
    padding: 12px 48px 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 16px;
    outline: none;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    color: #ffffff;
}

.search-filter input:focus {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
}

.search-filter input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-filter i {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

.filter-controls {
    display: flex;
    gap: 1rem;
}

.filter-controls select {
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 16px;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    color: #ffffff;
}

.filter-controls select:focus {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
}

/* Summary Stats */
.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.stat-card h3 {
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    color: #4ade80;
    letter-spacing: -0.02em;
}

.stat-card p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Metals Grid */
.metals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 2rem;
}

.metal-card {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.metal-card:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.metal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.metal-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
    text-transform: capitalize;
    letter-spacing: -0.01em;
    position: relative;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.production-badge {
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.production-significant { background: #e8f5e8; color: #2d5a2d; border: 1px solid #b8e6b8; }
.production-moderate { background: #fff8e1; color: #7d4f00; border: 1px solid #ffcc80; }
.production-limited { background: #ffeee0; color: #8b3a00; border: 1px solid #ffab70; }
.production-minimal { background: #ffebee; color: #c62828; border: 1px solid #ef9a9a; }
.production-none { background: #f5f5f5; color: #616161; border: 1px solid #e0e0e0; }
.production-byproduct { background: #f3e5f5; color: #6a1b9a; border: 1px solid #ce93d8; }
.production-emerging { background: #e0f2f1; color: #00695c; border: 1px solid #80cbc4; }

.metal-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.stat {
    text-align: center;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(248, 249, 250, 0.8) 0%, rgba(240, 242, 247, 0.8) 100%);
    border-radius: 12px;
    border: 1px solid rgba(232, 232, 232, 0.3);
    position: relative;
    z-index: 1;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 500;
    color: #4ade80;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metal-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #7f8c8d;
}

.detail-item {
    display: flex;
    justify-content: space-between;
}

.confidence-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-left: 0.5rem;
}

.confidence-high { background: #27ae60; }
.confidence-medium { background: #f39c12; }
.confidence-low { background: #e74c3c; }

.mines-button {
    width: 100%;
    margin-top: 1.5rem;
    padding: 12px 16px;
    background: #0066cc;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.mines-button:hover {
    background: #0052a3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

/* Reports */
.reports-container {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 2rem;
    height: 70vh;
}

.reports-sidebar {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.reports-sidebar h3 {
    margin-bottom: 1.5rem;
    color: #ffffff;
    font-size: 1.125rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.metal-list {
    max-height: 50vh;
    overflow-y: auto;
}

.metal-list-item {
    padding: 12px 16px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: capitalize;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.metal-list-item:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.metal-list-item.active {
    background: rgba(76, 222, 128, 0.2);
    border-color: #4ade80;
    color: #ffffff;
    font-weight: 600;
}

.report-viewer {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
}

.report-placeholder {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    padding: 4rem 2rem;
}

.report-placeholder i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.5);
}

.report-placeholder h3 {
    color: #ffffff;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.report-placeholder p {
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.report-content {
    padding: 0;
    line-height: 1.7;
}

.report-content h1 {
    color: #ffffff;
    margin-bottom: 2rem;
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    border-bottom: 2px solid rgba(76, 222, 128, 0.5);
    padding-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.report-content h2 {
    color: #4ade80;
    margin: 2.5rem 0 1rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.report-content p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.report-content ul {
    margin: 1rem 0 1rem 2rem;
    color: rgba(255, 255, 255, 0.9);
}

.report-content li {
    margin-bottom: 0.75rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.report-content a {
    color: #4ade80;
    text-decoration: none;
    transition: color 0.2s ease;
}

.report-content a:hover {
    color: #65e495;
    text-decoration: underline;
}

/* Fix markdown strikethrough rendering */
.report-content del,
.report-content s {
    text-decoration: none !important;
    color: inherit;
}

.report-content strong {
    color: #ffffff;
    font-weight: 600;
}

/* DataTable Custom Styling */
#minerals-table {
    background: transparent !important;
    border: none !important;
}

#minerals-table thead th {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.2), rgba(34, 197, 94, 0.15)) !important;
    color: #4ade80 !important;
    border: 1px solid rgba(74, 222, 128, 0.3) !important;
    padding: 16px 12px !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    letter-spacing: 0.025em !important;
    text-transform: uppercase !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

#minerals-table tbody td {
    background: rgba(255, 255, 255, 0.05) !important;
    color: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 10px 8px !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

#minerals-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.1) !important;
}

#minerals-table tbody tr:nth-child(odd) td {
    background: rgba(255, 255, 255, 0.08) !important;
    border-left: 2px solid rgba(74, 222, 128, 0.1) !important;
}

#minerals-table tbody tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.04) !important;
    border-left: 2px solid rgba(255, 255, 255, 0.05) !important;
}

#minerals-table tbody tr {
    transition: all 0.2s ease !important;
}

#minerals-table tbody tr:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.dataTables_wrapper {
    color: rgba(255, 255, 255, 0.9) !important;
}

.dataTables_filter input {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 6px !important;
    color: #ffffff !important;
    padding: 6px 12px !important;
    margin-left: 8px !important;
}

.dataTables_filter input::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
}

.dataTables_length select {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 6px !important;
    color: #ffffff !important;
    padding: 4px 8px !important;
    margin: 0 8px !important;
}

.dataTables_info {
    color: rgba(255, 255, 255, 0.8) !important;
}

.dataTables_paginate .paginate_button {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: rgba(255, 255, 255, 0.9) !important;
    border-radius: 6px !important;
    margin: 0 2px !important;
    padding: 6px 12px !important;
}

.dataTables_paginate .paginate_button:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

.dataTables_paginate .paginate_button.current {
    background: rgba(74, 222, 128, 0.3) !important;
    border-color: #4ade80 !important;
    color: #4ade80 !important;
}

.dataTables_paginate .paginate_button.disabled {
    background: rgba(255, 255, 255, 0.05) !important;
    color: rgba(255, 255, 255, 0.4) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Make table headers sortable cursor */
#minerals-table thead th {
    cursor: pointer !important;
}

#minerals-table thead th.sorting:after,
#minerals-table thead th.sorting_asc:after, 
#minerals-table thead th.sorting_desc:after {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    overflow: hidden;
}

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

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    color: #1a1a1a;
}

.modal-close {
    background: none;
    border: none;
    color: #666666;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f8f9fa;
    color: #1a1a1a;
}

.modal-body {
    padding: 2rem;
    max-height: 60vh;
    overflow-y: auto;
}

.mine-card {
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.mine-card:hover {
    border-color: #0066cc;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.1);
}

.mine-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.mine-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.mine-detail-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.875rem;
}

.mine-detail-item:last-child {
    border-bottom: none;
}

.mine-detail-label {
    font-weight: 500;
    color: #666666;
    flex-shrink: 0;
    margin-right: 1rem;
}

.mine-detail-value {
    color: #1a1a1a;
    font-weight: 500;
    text-align: right;
}

/* Analysis Charts */
.analysis-container {
    padding: 1rem;
}

.analysis-charts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.chart-container {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.chart-container h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .app-container {
        margin: 0;
        padding: 0 16px;
    }

    .main-content {
        padding: 0;
    }

    .dashboard-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .search-filter {
        min-width: 100%;
    }

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

    .reports-container {
        grid-template-columns: 1fr;
        height: auto;
    }

    .reports-sidebar {
        border-right: none;
        border-bottom: 2px solid #ecf0f1;
        padding-right: 0;
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }

    .analysis-charts {
        grid-template-columns: 1fr;
    }

    .modal-content {
        margin: 10% auto;
        width: 95%;
    }

    .app-header {
        padding: 2rem 1.5rem;
        margin: 1rem 0;
    }

    .header-content h1 {
        font-size: 2rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .header-content p {
        font-size: 1rem;
    }
    
    .report-viewer {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }

    .nav-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding: 0.5rem;
        gap: 0.25rem;
    }

    .nav-tab {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        flex-shrink: 0;
        white-space: nowrap;
    }
    
    /* Hide scrollbar but allow scrolling */
    .nav-tabs::-webkit-scrollbar {
        height: 0;
        background: transparent;
    }
    
    .nav-tabs {
        -ms-overflow-style: none;  /* Internet Explorer 10+ */
        scrollbar-width: none;  /* Firefox */
    }
}

/* Homeworld panel responsive styling */
@media (max-width: 768px) {
    .homeworld-panel-content {
        flex-direction: column !important;
        gap: 1rem !important;
    }
    
    .homeworld-logo {
        text-align: center;
    }
    
    .homeworld-logo img {
        max-width: 150px !important;
    }
}

/* Utility classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-bold {
    font-weight: bold;
}

.text-muted {
    color: #7f8c8d;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Comment System Styles */
.comment-modal-content {
    background: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.comment-modal-header {
    background: #f8f9fa;
    padding: 20px 24px;
    border-bottom: 1px solid #e1e8ed;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comment-modal-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
}

.comment-modal-close {
    color: #7f8c8d;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
}

.comment-modal-close:hover {
    color: #e74c3c;
}

.comment-context {
    padding: 20px 24px 16px;
    background: #fafbfc;
    border-bottom: 1px solid #e1e8ed;
}

.comment-context strong {
    color: #2c3e50;
    font-size: 0.9rem;
}

.comment-selected-text {
    margin-top: 8px;
    padding: 12px 16px;
    background: white;
    border: 1px solid #e1e8ed;
    border-radius: 6px;
    font-style: italic;
    color: #5a6c7d;
    line-height: 1.4;
}

.comment-textarea {
    width: 100%;
    min-height: 120px;
    padding: 16px 24px;
    border: none;
    resize: vertical;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    color: #2c3e50;
    background: white;
    border-bottom: 1px solid #e1e8ed;
}

.comment-textarea:focus {
    outline: none;
    background: #fafbfc;
}

.comment-char-count {
    padding: 8px 24px 0;
    text-align: right;
    font-size: 12px;
    color: #7f8c8d;
    background: white;
}

.comment-modal-actions {
    padding: 20px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: white;
    border-radius: 0 0 12px 12px;
}

.comment-cancel-btn,
.comment-submit-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.comment-cancel-btn {
    background: #e9ecef;
    color: #495057;
}

.comment-cancel-btn:hover {
    background: #dee2e6;
}

.comment-submit-btn {
    background: #3498db;
    color: white;
}

.comment-submit-btn:hover {
    background: #2980b9;
}

.comment-submit-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

/* Comment icon hover effect */
.comment-icon:hover {
    background: #2980b9 !important;
    transform: scale(1.1);
}

/* Selection highlight customization */
::selection {
    background: rgba(52, 152, 219, 0.2);
}

::-moz-selection {
    background: rgba(52, 152, 219, 0.2);
}

/* Responsive design for comment modal */
@media (max-width: 768px) {
    .comment-modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .comment-modal-header,
    .comment-context,
    .comment-modal-actions {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .comment-textarea {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .comment-char-count {
        padding-left: 16px;
        padding-right: 16px;
    }
}
