* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #070A14;
    --bg-secondary: #0F1623;
    --bg-card: #0e1320;
    --bg-header: #080E1C;
    --text-primary: #E8EEF8;
    --text-secondary: #A3B1C2;
    --text-light: #7B8EA2;
    --accent-primary: #957EFC;
    --accent-secondary: #FF8F00;
    --accent-danger: #F44336;
    --accent-warning: #FB8C00;
    --accent-success: #4CAF50;
    --border-color: rgba(255, 255, 255, 0.12);
    --shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    --radius: 16px;
    --transition: all 0.2s ease;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
}

/* ===== HEADER & NAV ===== */

:root {
    --helvetica: "Helvetica Neue", Helvetica, Arial, sans-serif;
    --inter: "Inter", sans-serif;
}


body, button{
    font-family: var(--inter);
}

body{
    background-color: rgb(20, 20, 20);
}

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box; 
    
}

header{
    width: 100%;
    background-color: rgb(39, 39, 39);
}


nav{
    width: 100%;
    max-width: 1400px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
}

.nav-left img{
    width: 150px;
    object-fit: cover;
}

.nav-left{
    display: flex;
    align-items: center;
    gap: 40px;
}

.input{
    width: 700px;
    height: 45px;
    position: relative;
}

.input input{
    width: 100%;
    height: 100%;
    padding: 4px 4px 4px 24px;
    border-radius: 20px;
    border: none;
    outline: none;
    font-size: 16px;
    background-color: #101518;
    outline: 2px solid rgb(44, 54, 63);
    color: rgb(240, 243, 245);
}

#searchBtn{
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    color: rgb(44, 54, 63); 
    width: 80px;
    height: 100%;
    border-radius: 26px;
    border: none;
    background-color: #957efc;
    color: #000;
}

#inputClick{
    position: absolute;
    top: 50%;
    left: -10px;
    transform: translateY(-50%);
    color: rgb(96, 111, 126);
    border: none;
    background-color: transparent;
    opacity: 0;
    transition: all 0.4s ease-in-out;
}

.links{
    display: flex;
    align-items: center;
    gap: 20px;
}

.links a{
    color: #b0b9c1;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease-in-out;
    cursor: pointer;
}

.links a:hover{
    color: #957efc;
}


body.light .links a:hover{
    color: #7c49fc;
}

.nav-right{
    display: flex;
    align-items: center;
    gap: 10px;
}
/* ===== MOBILE NAVIGATION - VISIBLE ONLY ON MOBILE ===== */
.nav-mobile {
    display: none;
}

/* Mobile breakpoint - HIDE desktop menu, SHOW mobile menu ONLY */
@media (max-width: 850px) {
    /* HIDE desktop navigation completely */
    .nav-left .links, .nav-right{
        display: none !important;
    }
    
    /* Hide the desktop nav-left image on mobile */
    .nav-left img {
        display: none;
    }
    
    /* Show mobile navigation container */
    .nav-mobile {
        display: flex;
        width: 100%;
        align-items: center;
        justify-content: space-between;
    }
    
    .nav-up-mobile {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
    
    /* 3-line hamburger menu icon */
    .hamburger {
        display: flex;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
        padding: 8px;
    }
    
    .hamburger span {
        width: 28px;
        height: 2.5px;
        background: white;
        border-radius: 3px;
        transition: 0.2s;
    }
    
    /* Mobile logo */
    .nav-up-mobile img {
        width: 110px;
        object-fit: cover;
        filter: brightness(0) invert(1);
    }
    
    /* Right side 3-line icon (for get in touch) */
    
    
    /* Make input full width on mobile */
    .input {
        width: 100%;
        margin-top: 12px;
        display: block;
    }
    
    /* Adjust nav layout for mobile - stack vertically */
    nav {
        flex-direction: column;
        align-items: stretch;
        padding: 12px 16px;
    }
    
    /* Move input below the mobile nav row */
    .nav-left {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }
}

/* Side Drawer Menu */
#mobileNav {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: #0a0f1a;
    z-index: 2000;
    padding: 24px;
    transition: 0.3s ease;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.6);
    overflow-y: auto;
}

#mobileNav.active {
    left: 0;
}

.mobile-nav-link {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 60px;
}

.mobile-nav-link a {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    border-bottom: 1px solid #2c3e50;
    padding: 12px 0;
    transition: 0.2s;
}

.mobile-nav-link a:hover {
    color: var(--accent-primary);
    padding-left: 5px;
}

#closeMoileNav {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    transition: 0.2s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#closeMoileNav:hover {
    transform: rotate(90deg);
}

#bottom-p {
    color: var(--text-light);
    font-size: 0.7rem;
    margin-top: 40px;
    text-align: center;
}

/* Alert Banner */
.alert-banner {
    background: linear-gradient(90deg, var(--accent-danger), #6a1b1b);
    color: white;
    padding: 12px 20px;
    display: none;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1050;
}

.alert-content {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    max-width: 1400px;
    margin: auto;
}

.alert-close {
    background: rgba(0, 0, 0, 0.3);
    border: none;
    color: white;
    padding: 6px 14px;
    border-radius: 40px;
    cursor: pointer;
}

/* Dashboard Layout */
.dashboard-container {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 28px;
}

.left-column,
.right-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Map Container */
.map-container {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    position: relative;
    height: 460px;
}

#earthquakeMap {
    height: 100%;
    width: 100%;
    border-radius: 12px;
    z-index: 1;
}

.map-legend {
    position: absolute;
    bottom: 16px;
    left: 16px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.8rem;
    z-index: 500;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0;
}

.legend-color {
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

.map-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.control-buttons {
    display: flex;
    gap: 10px;
}

.btn-control {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 8px 18px;
    border-radius: 40px;
    cursor: pointer;
    color: var(--text-primary);
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-control.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

/* Filter Section */
.filter-section {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.range-input {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 0;
}

#magnitudeFilter {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    appearance: none;
    -webkit-appearance: none;
    background: var(--border-color);
}

#magnitudeFilter::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-primary);
    cursor: pointer;
}

#countryFilter {
    width: 100%;
    padding: 12px 16px;
    border-radius: 60px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: white;
    margin-top: 8px;
}

.btn-reset {
    background: transparent;
    border: 1px solid var(--accent-primary);
    padding: 10px;
    border-radius: 60px;
    width: 100%;
    margin-top: 16px;
    font-weight: 600;
    cursor: pointer;
    color: var(--accent-primary);
}

.btn-reset:hover {
    background: var(--accent-primary);
    color: white;
}

/* Data Cards */
.data-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    padding: 20px;
}

.stat-box {
    background: rgba(149, 126, 252, 0.1);
    border-radius: 14px;
    padding: 14px;
    text-align: center;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--accent-primary);
}

/* Table */
.table-container {
    overflow-x: auto;
    max-height: 450px;
    overflow-y: auto;
}

#earthquakeTable {
    width: 100%;
    border-collapse: collapse;
}

#earthquakeTable th,
#earthquakeTable td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.magnitude-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.8rem;
}

.magnitude-minor {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.magnitude-moderate {
    background: rgba(255, 152, 0, 0.2);
    color: #ff9800;
}

.magnitude-major {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
}

#magnitudeChart {
    height: 240px !important;
    width: 100%;
    padding: 12px;
}

/* News */
.news-item {
    padding: 14px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
}

.news-image {
    width: 70px;
    height: 65px;
    object-fit: cover;
    border-radius: 10px;
    background: #2d3748;
}

.news-content h4 {
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.news-content p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Buttons */
.btn-refresh {
    background: var(--accent-primary);
    border: none;
    padding: 10px 20px;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: center;
}

footer{
    width: 100%;
    padding: 32px 64px;
    background-color: #000;
}

.footer-links{
    max-width: 1350px;
    margin: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 0 3rem;
}

.footer-links a{
    font-size: 14px;
    color: #fff;
}

.footer-links p{
    font-size: 11px;
    color: #fff;
}

/* Loading Spinner */
.loading-spinner {
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--accent-primary);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    animation: spin 0.8s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Kosova Time Display */
.kosova-time-display {
    margin-top: 12px;
    font-size: 0.75rem;
    text-align: center;
    color: var(--text-light);
}

/* Scrollbar */


/* Get In Touch Modal */
.get-in-touch {
    width: 100%;
    height: 100vh;
    position: fixed;
    top: 0;
    right: -100%;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 10000;
    transition: all 0.4s ease;
}

.get-in-touch.active {
    right: 0;
}

.get-in-touch-box {
    position: fixed;
    width: 30%;
    min-width: 300px;
    height: 100vh;
    background-color: #f5f5f5;
    right: -30%;
    padding: 2rem;
    transition: all 0.5s ease;
}

.get-in-touch-box.active {
    right: 0;
}

@media (max-width: 768px) {
    .get-in-touch-box {
        width: 80%;
        right: -80%;
    }
}

/* Dashboard responsive */
@media (max-width: 1000px) {
    .dashboard-container {
        grid-template-columns: 1fr;
    }
    
    .map-container {
        height: 400px;
    }
}

@media (max-width: 640px) {
    .dashboard-container {
        padding: 0 16px;
    }
    
    .map-container {
        height: 350px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .btn-control span {
        display: none;
    }
    
    .btn-control i {
        margin: 0;
    }
}

.news-footer{
    display: none;
}

.nav-right-hamburger{
    display: flex;
    flex-direction: column;
    align-items: end;
    gap: 6px;
    cursor: pointer;
}

.nav-right-hamburger span{
    width: 30px;
    height: 1.5px;
    background-color: #f5f5f5;
    transition: all 0.4s ease-in-out;
}

.nav-right-hamburger span:nth-child(1){
    width: 15px;
    height: 1.6px;
}

.nav-right-hamburger span:nth-child(2){
    width: 25px;
}

.nav-right-hamburger:hover  span:nth-child(1), .nav-right-hamburger:hover span:nth-child(2){
    width: 30px;
}


.get-in-touch-box-text img{
    width: 150px;
    object-fit: cover;
    margin-top: 25px;
    margin-bottom: 18px;
}

.get-in-touch-box-text p{
    color: #323232;
    font-size: 14px;
    line-height: 21px;
}

.get-in-touch-box-text h2{
    color: #141414;
    font-size: 22px;
    margin: 18px 0;
}

.get-in-touch-box-text-boxs{
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.get-in-touch-box-text-box{
    display: flex;
    align-items: center;
    gap: 20px;
}

.get-in-touch-box-text-box button{
    border: 1.5px solid #323232;
    color: #323232;
    background-color: transparent;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 11px;
}

.get-in-touch-box-text input{
    border: none;
    outline: none;
    border-bottom: 1px solid #32323224;
    color: #323232;
    background-color: transparent;
    padding-bottom: 10px;
    width: 250px;
}

.get-in-touch.active{
    right: 0;
}

.get-in-touch-box.active{
    right: 0;
}

.get-in-touch-box-close{
    display: flex;
    justify-content: end;
}

#closeGetInTouch{
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid #141414;
    color: #141414;
    background-color: transparent;
    cursor: pointer;
}

#closeGetInTouch i{
    transition: all 0.4s ease-in-out;
}

#closeGetInTouch:hover  i{
    transform: rotate(360deg);
}