/* Global Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* Hide scrollbar for Chrome, Safari and Opera */
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

body::-webkit-scrollbar {
    display: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--primary);
    margin-bottom: 0.5em;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    outline: none;
    transition: var(--transition);
}

/* Utilities */
.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1rem;
}

.hidden {
    display: none !important;
}

.flex {
    display: flex;
}

.grid {
    display: grid;
}

.text-center {
    text-align: center;
}

.text-primary {
    color: var(--primary);
}

.text-danger {
    color: var(--danger);
}

.text-success {
    color: var(--success);
}

/* Buttons */
.btn {
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-full);
    font-weight: 500;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

/* Navbar */
.navbar {
    background-color: var(--bg-card);
    box-shadow: var(--shadow-sm);
    padding: 0.8rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    margin-bottom: 0;
    /* Make sure no margin bottom */
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(to right,
            var(--primary),
            var(--secondary),
            var(--accent),
            var(--primary));
    background-size: 300% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientFlow 5s linear infinite;
}

@keyframes gradientFlow {
    0% {
        background-position: 0% center;
    }

    100% {
        background-position: 300% center;
    }
}

.nav-middle {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    /* Increased gap between nav-links and search-bar */
}

.nav-links {
    display: flex;
    gap: 2rem;
    /* Spacing between 'Home' and 'Near Me' */
}

.nav-link {
    font-weight: 500;
    color: var(--text-main);
}

.nav-link.active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
}

.nav-link:hover {
    color: var(--primary);
}

.search-bar {
    background: var(--bg-body);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 400px;
    gap: 0.5rem;
    color: var(--text-muted);
}

.search-bar input {
    border: none;
    background: transparent;
    width: 100%;
    outline: none;
    font-size: 1rem;
    color: var(--text-main);
    font-family: var(--font-body);
    /* Ensure font is same */
}

.search-bar input::placeholder {
    font-family: var(--font-body);
    color: var(--text-muted);
}

.clear-search {
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
    padding: 0.2rem;
}

.clear-search:hover {
    color: var(--danger);
    transform: scale(1.1);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.lang-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    padding: 0;
    border: 2px solid var(--border);
}

.lang-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Main Layout */
main {
    flex: 1;
    padding: 0;
    /* Flush with header */
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal.hidden {
    pointer-events: none;
    opacity: 0;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: var(--shadow-lg);
    max-height: 90vh;
    overflow-y: auto;
    transition: max-width 0.3s ease;
    /* Hide scrollbar */
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.modal-content::-webkit-scrollbar {
    display: none;
}

.modal-content.modal-lg {
    max-width: 800px;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

/* Splash Screen & Loading */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #34a9db 0%, #1e70be 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    transition: opacity 0.5s ease-out, visibility 0.5s;
}

.splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-logo-container {
    width: 180px;
    height: 180px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    margin-bottom: 40px;
}

.splash-logo-container img {
    width: 120px;
    height: auto;
}

.splash-title {
    color: white;
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 5px;
    font-family: 'League Spartan', sans-serif;
    letter-spacing: -1px;
}

.splash-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 80px;
    font-family: 'Kanit', sans-serif;
    font-weight: 300;
}

.splash-loader {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.splash-loading-text {
    color: white;
    font-size: 1rem;
    font-family: 'Kanit', sans-serif;
    letter-spacing: 1px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Hero Banner Slider */
.hero-banner {
    position: relative;
    width: 100%;
    height: 450px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.banner-slider {
    width: 100%;
    height: 100%;
    position: relative;
}

.banner-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 1s ease;
    z-index: 1;
}

.banner-item.active {
    opacity: 1;
    z-index: 2;
}

.banner-top-left {
    position: absolute;
    top: 3rem;
    left: 4rem;
    color: white;
    text-align: left;
    max-width: 500px;
}

.banner-top-left h2 {
    font-size: 2.8rem;
    color: white;
    margin-bottom: 0.5rem;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

.banner-top-left p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.banner-bottom-right {
    position: absolute;
    bottom: 4rem;
    right: 4.5rem;
    color: white;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1.5rem;
}

.banner-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.2;
}

.banner-price span {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

.banner-price strong {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--accent);
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.banner-price small {
    font-size: 0.9rem;
}

.banner-bottom-right .btn-primary {
    padding: 0.6rem 1.4rem;
    font-size: 0.95rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
}

.dot.active {
    background: white;
    width: 25px;
    border-radius: var(--radius-full);
}

.btn-accent {
    background-color: var(--accent);
    color: #000;
}

.btn-accent:hover {
    background-color: #fca311;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.banner-ribbon {
    position: absolute;
    top: 40px;
    right: -100px;
    width: 350px;
    background: linear-gradient(45deg, var(--accent), #ffcc33, var(--accent));
    background-size: 200% auto;
    color: #000;
    padding: 0.6rem 0;
    text-align: center;
    transform: rotate(45deg);
    font-weight: 800;
    font-size: 1.1rem;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    font-family: var(--font-body);
    pointer-events: none;
    animation: ribbonShine 3s linear infinite, ribbonPulse 2s ease-in-out infinite;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.banner-ribbon::before {
    content: '★';
    font-size: 1.2rem;
}

@keyframes ribbonShine {
    0% {
        background-position: 0% center;
    }

    100% {
        background-position: 200% center;
    }
}

@keyframes ribbonPulse {

    0%,
    100% {
        transform: rotate(45deg) scale(1);
    }

    50% {
        transform: rotate(45deg) scale(1.05);
    }
}

/* Sections */
.section-title {
    margin-bottom: 1.5rem;
}

/* Cards */
.dorm-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border);
}

.dorm-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.dorm-img {
    height: 200px;
    width: 100%;
    object-fit: cover;
}

.dorm-info {
    padding: 1rem;
}

.dorm-price {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.2rem;
}

.dorm-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0.5rem 0;
}

.dorm-amenities {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.badge {
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    background: var(--bg-body);
    color: var(--text-muted);
}

/* Dashboard Styles */
.dashboard-grid {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
}

.sidebar {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    height: fit-content;
}

.stat-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

/* Map Containers */
#map {
    height: 400px;
    width: 100%;
    border-radius: var(--radius-md);
}

/* Dorm Detail Page */
.breadcrumb {
    font-size: 0.9rem;
    color: var(--primary);
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.dorm-detail-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2.5rem;
    align-items: start;
}

.detail-sidebar {
    position: sticky;
    top: 100px;
}

.main-detail-img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.detail-gallery {
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.detail-section {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.amenities-grid-full {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.amenity-item-full {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem;
    background: var(--bg-body);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.amenity-item-full:hover {
    background: white;
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

.amenity-item-full .icon {
    font-size: 1.8rem;
    color: var(--primary);
}

.nearby-list {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.nearby-list li {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    background: var(--bg-body);
    border-radius: var(--radius-sm);
}

/* Sidebar & Booking */
.booking-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
}

.price-header {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
    margin-bottom: 0.5rem;
}

.price-header .price {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
}

.price-header .unit {
    color: var(--text-muted);
}

.price-sub {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1rem;
}

.info-item i {
    width: 20px;
    color: var(--primary);
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.action-buttons .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.mini-map-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

@media (max-width: 1024px) {
    .dorm-detail-grid {
        grid-template-columns: 1fr;
    }

    .booking-card {
        position: static;
    }
}

/* Footer (Simple) */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
}

.form-control:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.1);
}

/* Responsiveness */
@media (max-width: 768px) {
    .navbar-content {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-middle {
        width: 100%;
    }

    .search-bar {
        max-width: 100%;
    }

    .nav-right {
        width: 100%;
        justify-content: space-between;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .hero-banner {
        height: 300px;
    }

    .banner-content h2 {
        font-size: 1.8rem;
    }
}

/* Auth Modal Enhancements */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 0.5rem 0;
    color: var(--text-muted);
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border);
}

.auth-divider:not(:empty)::before {
    margin-right: .5em;
}

.auth-divider:not(:empty)::after {
    margin-left: .5em;
}

.btn-google {
    background: white !important;
    color: #444 !important;
    border: 1px solid #ddd !important;
    width: 50px;
    height: 50px;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    padding: 0 !important;
    transition: var(--transition);
    cursor: pointer;
}

.btn-google:hover {
    background: #f8f9fa !important;
    box-shadow: var(--shadow-md);
    border-color: #ccc !important;
    transform: translateY(-2px);
}

.btn-google i {
    color: #DB4437;
    /* Google Red */
    font-size: 1.5rem;
}

/* Password Toggle */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper .form-control {
    padding-right: 2.5rem;
}

.password-toggle {
    position: absolute;
    right: 12px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
    z-index: 10;
}

.password-toggle:hover {
    color: var(--primary);
}

/* Near Me Tabs */
.tab-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0.5rem;
}

.tab-nav-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    background: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.tab-nav-btn.active {
    color: var(--primary);
}

.tab-nav-btn.active::after {
    content: '';
    position: absolute;
    bottom: -0.6rem;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary);
}

.tab-content {
    display: none;
    height: 100%;
}

.tab-content.active {
    display: block;
}

/* Map Split Layout */
.map-split-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 1.5rem;
    height: 600px;
    margin-bottom: 3rem;
}

.map-container-wrapper {
    position: relative;
    height: 100%;
}

#map {
    height: 100% !important;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.map-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    background: white;
}

#dormGridNearby {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    /* Tighter gap for better list feel */
}

/* Custom Scrollbar for Sidebar */
#dormGridNearby::-webkit-scrollbar {
    width: 6px;
}

#dormGridNearby::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

#dormGridNearby::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
    transition: var(--transition);
}

#dormGridNearby::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Compact Card for Sidebar */
.map-sidebar .dorm-card {
    display: flex;
    flex-direction: row;
    height: 125px;
    /* Fixed height to prevent squashing */
    flex-shrink: 0;
    /* CRITICAL: prevent flexbox from squishing cards */
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    background: white;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
    cursor: pointer;
    border-radius: var(--radius-md);
    width: 100%;
}

.map-sidebar .dorm-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.map-sidebar .dorm-card .img-wrapper {
    width: 125px;
    height: 125px;
    flex-shrink: 0;
    position: relative;
    background: #f0f0f0;
}

.map-sidebar .dorm-card .dorm-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.map-sidebar .dorm-card .dorm-info {
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    overflow: hidden;
    min-width: 0;
    /* Important for text truncation */
}

.map-sidebar .dorm-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 0.2rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-dark);
}

.map-sidebar .dorm-card .dorm-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.map-sidebar .dorm-card .dorm-price span {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-muted);
}

.map-sidebar .dorm-card .dorm-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.map-sidebar .dorm-card .dorm-meta i {
    color: var(--primary);
    font-size: 0.75rem;
}

/* Internal badges */
.map-sidebar .distance-badge {
    position: absolute;
    bottom: 5px;
    left: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 2;
}

.map-sidebar .promo-mini-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--accent);
    color: var(--text-dark);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    z-index: 2;
}

@media (max-width: 1024px) {
    .map-split-layout {
        grid-template-columns: 1fr;
        height: auto;
    }

    .map-container-wrapper {
        height: 400px;
    }

    .map-sidebar {
        height: 500px;
    }
}

/* Station List styling */
.station-list {
    width: 100%;
}

.station-vertical-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
    margin-top: 1rem;
    width: 100%;
}

.station-list-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.station-list-item:hover {
    border-color: var(--primary);
    background: #fcfcfc;
    transform: translateY(-2px);
}

.station-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: white;
}

.station-icon.bts {
    background: #76ac28;
}

/* BTS Green */
.station-icon.mrt {
    background: #00237c;
}

/* MRT Blue */

.station-content {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.station-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.station-type {
    font-size: 0.7rem;
    color: var(--text-muted);
}

@media (max-width: 640px) {
    .station-vertical-grid {
        grid-template-columns: 1fr;
    }
}

/* Custom Country Selector */
.country-code-wrapper {
    position: relative;
    width: 120px;
}

.country-selected-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    cursor: pointer;
    font-size: 0.9rem;
    height: 100%;
}

.country-selected-display img {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
}

.country-dropdown-list {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 200px;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    max-height: 250px;
    overflow-y: auto;
    display: none;
    padding: 5px;
}

.country-dropdown-list.show {
    display: block;
    animation: fadeInDown 0.2s ease-out;
}

.country-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.country-option:hover {
    background: #f1f5f9;
}

.country-option img {
    width: 24px;
    height: 18px;
    object-fit: cover;
    border-radius: 2px;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}