:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #ec4899;
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background: radial-gradient(circle at top right, #1e1b4b, #0f172a);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
}

header {
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--primary);
}

main {
    flex: 1;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    width: 100%;
    animation: fadeIn 0.5s ease-out forwards;
}

.glass-footer {
    padding: 2rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
    border-top: 1px solid var(--glass-border);
    margin-top: 4rem;
}

/* Base Components */
button {
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    border: none;
    background: var(--primary);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

button:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
}

button.secondary {
    background: rgba(255, 255, 255, 0.1);
}

button.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 1.25rem;
    padding: 2rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    transition: var(--transition-smooth);
}

.card:hover {
    border-color: rgba(99, 102, 241, 0.4);
}

/* Loader */
.loader-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.loader {
    width: 48px;
    height: 48px;
    border: 5px solid #FFF;
    border-bottom-color: var(--primary);
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

input,
select,
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 0.75rem;
    color: white;
    outline: none;
    transition: var(--transition-smooth);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

/* Custom Dropdown */
.custom-select {
    position: relative;
    user-select: none;
    min-width: 120px;
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 0.75rem;
    color: white;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-size: 0.875rem;
    font-weight: 500;
}

.custom-select-trigger:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.custom-select-trigger::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--text-muted);
    margin-left: 0.75rem;
    transition: transform 0.3s ease;
}

.custom-select.open .custom-select-trigger::after {
    transform: rotate(180deg);
}

.custom-options {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: #1e293b;
    border: 1px solid var(--glass-border);
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    min-width: 160px;
    overflow: hidden;
    backdrop-filter: blur(12px);
}

.custom-select.open .custom-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-option {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-main);
    font-size: 0.875rem;
}

.custom-option:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.custom-option.selected {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary);
    font-weight: 600;
}

.custom-option img {
    width: 20px;
}

/* Responsive Grid Utility */
.grid-responsive {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .grid-responsive {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    header {
        padding: 1rem;
    }

    nav {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    nav>div {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    nav>div:first-child {
        /* Logo container */
        justify-content: center;
    }

    #nav-actions {
        flex-direction: column;
        width: 100%;
    }

    #nav-actions button {
        width: 100%;
        justify-content: center;
    }

    .card {
        padding: 1.25rem;
    }

    main {
        margin: 1rem auto;
    }

    /* Adjust modal sizing to be responsive */
    #room-modal .card,
    #transport-modal .card {
        width: 95% !important;
        margin: 1rem;
        max-height: 90vh;
        overflow-y: auto;
    }
}