@font-face {
  font-family: IRANSans;
  font-style: normal;
  font-weight: normal;
  src: url('/static/font/iransansdnweb.ttf') format('truetype');
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: IRANSans;
    transition: background-color 0.5s ease, color 0.3s ease, border-color 0.3s ease;
}

body {
    background: #0a0e29;
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
}

body.light-mode {
    background: #f0f2f5;
    color: #333;
}

/* دکمه تغییر حالت */
.theme-toggle-container {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

.theme-toggle {
    background: rgba(78, 84, 200, 0.2);
    border: none;
    width: 60px;
    height: 30px;
    border-radius: 25px;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 3px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

body.light-mode .theme-toggle {
    background: rgba(37, 99, 235, 0.2);
}

.theme-toggle::before {
    content: '☀️';
    position: absolute;
    left: 5px;
    font-size: 12px;
    transition: all 0.3s ease;
    z-index: 1;
}

.theme-toggle::after {
    content: '🌙';
    position: absolute;
    right: 5px;
    font-size: 12px;
    transition: all 0.3s ease;
    z-index: 1;
}

.toggle-thumb {
    width: 24px;
    height: 24px;
    background: #4e54c8;
    border-radius: 50%;
    position: absolute;
    transition: all 0.3s ease;
    left: 3px;
    z-index: 2;
}

body.light-mode .toggle-thumb {
    background: #2563eb;
    left: 33px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
    padding-top: 2rem;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #4e54c8, #8f94fb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.light-mode h1 {
    background: linear-gradient(to right, #2563eb, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: #a0a7e6;
    font-size: 1.2rem;
}

body.light-mode .subtitle {
    color: #5e6ebf;
}

/* فیلترها و جستجو */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    background: rgba(13, 18, 48, 0.7);
    border: 1px solid #2a2f6b;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 0 20px rgba(78, 84, 200, 0.2);
    backdrop-filter: blur(10px);
}

body.light-mode .filters {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #d1d5db;
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.1);
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #8f94fb;
    font-weight: bold;
}

body.light-mode .filter-group label {
    color: #2563eb;
}

.filter-group input, .filter-group select {
    width: 100%;
    padding: 0.7rem;
    border-radius: 8px;
    border: 1px solid #2a2f6b;
    background: rgba(13, 18, 48, 0.7);
    color: #fff;
}

body.light-mode .filter-group input,
body.light-mode .filter-group select {
    border: 1px solid #d1d5db;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

.btn {
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(to right, #4e54c8, #8f94fb);
    color: white;
}

body.light-mode .btn-primary {
    background: linear-gradient(to right, #2563eb, #3b82f6);
}

.btn-secondary {
    background: rgba(78, 84, 200, 0.2);
    color: #8f94fb;
}

body.light-mode .btn-secondary {
    background: rgba(37, 99, 235, 0.2);
    color: #2563eb;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(78, 84, 200, 0.3);
}

body.light-mode .btn:hover {
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.2);
}

/* کارت‌های اطلاعاتی */
.neo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.neo-card {
    background: rgba(13, 18, 48, 0.7);
    border: 1px solid #2a2f6b;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 0 20px rgba(78, 84, 200, 0.2);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

body.light-mode .neo-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #d1d5db;
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.1);
}

.neo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(78, 84, 200, 0.3);
}

body.light-mode .neo-card:hover {
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.2);
}

.neo-card.hazardous {
    border-left: 4px solid #ff6b6b;
}

.neo-card.safe {
    border-left: 4px solid #4cd964;
}

.neo-name {
    font-size: 1.3rem;
    color: #8f94fb;
    margin-bottom: 1rem;
}

body.light-mode .neo-name {
    color: #2563eb;
}

.neo-info {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(42, 47, 107, 0.3);
}

body.light-mode .info-item {
    border-bottom: 1px solid rgba(209, 213, 219, 0.5);
}

.info-label {
    color: #a0a7e6;
    font-weight: bold;
}

body.light-mode .info-label {
    color: #6b7280;
}

.info-value {
    color: #fff;
}

body.light-mode .info-value {
    color: #1f2937;
}

.hazard-badge {
    display: inline-block;
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-top: 1rem;
}

.hazard-true {
    background: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
}

.hazard-false {
    background: rgba(76, 217, 100, 0.2);
    color: #4cd964;
}

/* نمودار و آمار */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(13, 18, 48, 0.7);
    border: 1px solid #2a2f6b;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 0 20px rgba(78, 84, 200, 0.2);
    backdrop-filter: blur(10px);
    text-align: center;
}

body.light-mode .stat-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #d1d5db;
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.1);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #8f94fb;
    margin: 1rem 0;
}

body.light-mode .stat-value {
    color: #2563eb;
}

.stat-label {
    color: #a0a7e6;
    font-size: 1rem;
}

body.light-mode .stat-label {
    color: #6b7280;
}

/* نمودار دایره‌ای */
.chart-container {
    background: rgba(13, 18, 48, 0.7);
    border: 1px solid #2a2f6b;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 0 20px rgba(78, 84, 200, 0.2);
    backdrop-filter: blur(10px);
    margin-bottom: 2rem;
    text-align: center;
}

body.light-mode .chart-container {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #d1d5db;
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.1);
}

.chart-title {
    color: #8f94fb;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

body.light-mode .chart-title {
    color: #2563eb;
}

/* .pie-chart {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: conic-gradient(
        #ff6b6b 0% 50%,
        #4cd964 50% 100%
    );
    margin: 0 auto;
    position: relative;
} */

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-color {
    width: 15px;
    height: 15px;
    border-radius: 3px;
}

.legend-danger {
    background: #ff6b6b;
}

.legend-safe {
    background: #4cd964;
}

.legend-text {
    color: #a0a7e6;
    font-size: 0.9rem;
}

body.light-mode .legend-text {
    color: #6b7280;
}

/* صفحه‌بندی */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

#page-numbers {
    display: flex;        /* شماره صفحات هم ردیفی بشن */
    gap: 0.5rem;          /* فاصله بین شماره‌ها */
}

.pagination a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    color: #a0a7e6;
    text-decoration: none;
    background: rgba(13, 18, 48, 0.7);
    border: 1px solid #2a2f6b;
    transition: all 0.3s ease;
}

body.light-mode .pagination a {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #d1d5db;
    color: #6b7280;
}

.pagination a.active, 
.pagination a:hover {
    background: rgba(78, 84, 200, 0.3);
    color: #fff;
}

body.light-mode .pagination a.active,
body.light-mode .pagination a:hover {
    background: rgba(37, 99, 235, 0.2);
    color: #2563eb;
}

/* رسپانسیو برای موبایل */
@media (max-width: 968px) {
    .filters {
        flex-direction: column;
    }
    
    .filter-buttons {
        justify-content: center;
        margin-top: 1rem;
    }
    
    .theme-toggle-container {
        top: 10px;
        left: 10px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1.5rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .neo-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .pie-chart {
        width: 200px;
        height: 200px;
    }
}


