/* Population Page Specific Styles */

/* Main content styling for population page */
.population-content {
    background: rgba(26, 31, 58, 0.95);
    border: 1px solid rgba(0, 212, 255, 0.4);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Card styling for population page */
.population-content .card {
    background: rgba(26, 31, 58, 0.95);
    border: 1px solid rgba(0, 212, 255, 0.4);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.population-content .card-body {
    background: rgba(26, 31, 58, 0.95);
}

/* Heading styles for population page */
.population-content h1 {
    color: var(--moon-accent);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    font-weight: 700;
}

.population-content h2 {
    color: var(--moon-gold);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    font-weight: 700;
}

.population-content h3, .population-content h4 {
    color: var(--moon-accent);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    font-weight: 700;
}

/* Text styling for population page */
.population-content p {
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    font-weight: 500;
}

.population-content .lead {
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    font-weight: 500;
    font-size: 1.2rem;
}

/* Icon styling */
.population-content .fa-users {
    color: var(--moon-accent);
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

/* Table styling for citizens registry */
.table, table {
    background: #0a0a0a !important;
    border: 2px solid rgba(0, 212, 255, 0.6);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 0;
    width: 100%;
    border-collapse: collapse;
    font-family: 'Rajdhani', sans-serif;
    box-shadow: 0 8px 32px rgba(0, 212, 255, 0.3);
}

.table thead th, table thead th, .table th, table th {
    background: linear-gradient(135deg, var(--moon-accent), var(--moon-gold), var(--moon-accent));
    background-size: 200% 200%;
    animation: cosmicGradient 3s ease infinite;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    font-weight: 700;
    border: none;
    padding: 1.2rem 1rem;
    text-align: center;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.table thead th::before, table thead th::before, .table th::before, table th::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.table thead th:hover::before, table thead th:hover::before, .table th:hover::before, table th:hover::before {
    left: 100%;
}

@keyframes cosmicGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.table tbody tr, table tbody tr, .table tr, table tr {
    background: #0a0a0a !important;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 212, 255, 0.3);
}

.table tbody tr:hover, table tbody tr:hover, .table tr:hover, table tr:hover {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.3), rgba(255, 215, 0, 0.2)) !important;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
    border-bottom: 1px solid rgba(0, 212, 255, 0.6);
}

.table tbody tr:nth-child(even), table tbody tr:nth-child(even), .table tr:nth-child(even), table tr:nth-child(even) {
    background: #111111 !important;
}

.table tbody tr:nth-child(even):hover, table tbody tr:nth-child(even):hover, .table tr:nth-child(even):hover, table tr:nth-child(even):hover {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.35), rgba(255, 215, 0, 0.25)) !important;
}

.table td, table td {
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
    font-weight: 600;
    border: none;
    padding: 1.2rem 1rem;
    text-align: center;
    vertical-align: middle;
    transition: all 0.3s ease;
    position: relative;
    background: transparent !important;
}

.table td:first-child, table td:first-child {
    font-weight: 700;
    color: #FFD700 !important;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8), 0 2px 4px rgba(0, 0, 0, 0.9);
}

.table td:nth-child(2), table td:nth-child(2) {
    color: #00D4FF !important;
    font-style: italic;
    font-weight: 600;
    text-shadow: 0 0 15px rgba(0, 212, 255, 0.8), 0 2px 4px rgba(0, 0, 0, 0.9);
}

.table td:nth-child(3), table td:nth-child(3) {
    color: #ffffff !important;
    font-weight: 700;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(0, 212, 255, 0.3)) !important;
    border-radius: 8px;
    padding: 0.8rem;
    margin: 0 0.5rem;
    border: 2px solid rgba(0, 212, 255, 0.5);
    text-shadow: 0 0 12px rgba(0, 212, 255, 0.8), 0 2px 4px rgba(0, 0, 0, 0.9);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.table td:last-child, table td:last-child {
    color: #E0E0E0 !important;
    font-size: 0.95rem;
    font-weight: 600;
    text-shadow: 0 0 12px rgba(224, 224, 224, 0.8), 0 2px 4px rgba(0, 0, 0, 0.9);
}

/* Override Bootstrap default table styles */
.table-striped > tbody > tr:nth-of-type(odd) > td,
.table-striped > tbody > tr:nth-of-type(odd) > th {
    background-color: #0a0a0a !important;
}

.table-striped > tbody > tr:nth-of-type(even) > td,
.table-striped > tbody > tr:nth-of-type(even) > th {
    background-color: #111111 !important;
}

.table > tbody > tr > td,
.table > tbody > tr > th {
    background-color: transparent !important;
    border-top: none !important;
}

.table > thead > tr > th {
    border-bottom: none !important;
}

/* Statistics cards styling */
.statistics-card {
    background: rgba(26, 31, 58, 0.95);
    border: 1px solid rgba(0, 212, 255, 0.4);
    transition: all 0.3s ease;
}

.statistics-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.3);
    border-color: var(--moon-gold);
}

.statistics-card .card-title {
    color: var(--moon-gold);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    font-weight: 700;
}

.statistics-card .card-text {
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    font-weight: 500;
}

.statistics-card .fa-globe,
.statistics-card .fa-users,
.statistics-card .fa-calendar,
.statistics-card .fa-rocket {
    color: var(--moon-accent);
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

/* Table header styling */
.card-header {
    background: linear-gradient(135deg, rgba(26, 31, 58, 0.95), rgba(0, 212, 255, 0.1));
    border-bottom: 2px solid rgba(0, 212, 255, 0.4);
}

.card-header h3 {
    color: var(--moon-gold);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    font-weight: 700;
}

.card-header p {
    color: var(--moon-silver);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    font-weight: 500;
}

/* Responsive table adjustments */
@media (max-width: 768px) {
    .table-responsive {
        border-radius: 8px;
        overflow: hidden;
    }
    
    .table thead th, table thead th {
        font-size: 0.9rem;
        padding: 0.75rem 0.5rem;
    }
    
    .table td, table td {
        font-size: 0.85rem;
        padding: 0.75rem 0.5rem;
    }
    
    .table td:nth-child(3), table td:nth-child(3) {
        font-size: 0.75rem;
        padding: 0.25rem;
    }
}

/* Additional table visibility improvements */
.content-section table {
    margin: 2rem 0;
    box-shadow: 0 8px 32px rgba(0, 212, 255, 0.3);
}

.content-section table caption {
    color: var(--moon-gold);
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* Ensure table is visible in the card */
.card-body .table-responsive {
    background: rgba(26, 31, 58, 0.95);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

/* Responsive adjustments for population page */
@media (max-width: 768px) {
    .population-content h1 {
        font-size: 2rem;
    }
    
    .population-content h2 {
        font-size: 1.5rem;
    }
    
    .population-content .lead {
        font-size: 1.1rem;
    }
}
