:root {
    --primary-color: #4e54c8;
    --secondary-color: #8f94fb;
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

body {
    background: #f8f9fa;
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #2d3436;
}

.premium-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 1.25rem;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.premium-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px 0 rgba(31, 38, 135, 0.2);
}

.no-hover:hover {
    transform: none !important;
    box-shadow: var(--shadow) !important;
}

.compact-card {
    padding: 15px !important;
    margin-top: 15px !important;
    margin-bottom: 15px !important;
}

@media (min-width: 768px) {
    .compact-card {
        padding: 20px !important;
        margin-top: 20px !important;
        margin-bottom: 20px !important;
    }
}

.premium-input {
    border-radius: 0.75rem !important;
    padding: 0.8rem 1.5rem !important;
    font-size: 1.05rem !important;
    transition: all 0.3s ease !important;
}

.premium-input:focus {
    background: #fff !important;
    box-shadow: 0 0 0 4px rgba(78, 84, 200, 0.15) !important;
    border-color: var(--primary-color) !important;
}

.premium-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
    border: none !important;
    border-radius: 0.75rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    padding: 0.8rem 2rem !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.premium-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 20px rgba(78, 84, 200, 0.3) !important;
}

.premium-btn:active {
    transform: translateY(0) scale(0.98);
}

.premium-table thead th {
    background: rgba(0,0,0,0.02) !important;
    border-bottom: 2px solid rgba(0,0,0,0.05) !important;
    color: #636e72 !important;
    text-transform: uppercase;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    letter-spacing: 1.2px;
    padding: 1.2rem 1rem !important;
}

.premium-table tbody td {
    padding: 1.2rem 1rem !important;
    border-bottom: 1px solid rgba(0,0,0,0.03);
}

.history-table.premium-table tr.group-boundary-top td {
    border-top: 2px solid #adb5bd !important;
}

.history-table.premium-table tr.group-boundary-bottom td {
    border-bottom: 2px solid #adb5bd !important;
}

.hotel-btn {
    text-decoration: none !important;
    color: #2d3436 !important;
    font-size: 1.15rem !important;
    transition: color 0.2s ease;
    background: none;
    border: none;
    padding: 0;
    font-weight: 700;
}

.hotel-btn:hover {
    color: var(--primary-color) !important;
}

.price-tag {
    background: linear-gradient(135deg, rgba(78, 84, 200, 0.1) 0%, rgba(143, 148, 251, 0.1) 100%);
    color: var(--primary-color);
    padding: 0.5rem 1.2rem;
    border-radius: 2rem;
    border: 1px solid rgba(78, 84, 200, 0.1);
    transition: all 0.3s ease;
}

.price-tag.low {
    background: rgba(39, 174, 96, 0.15) !important;
    color: #218c4d !important;
    border-color: rgba(39, 174, 96, 0.3) !important;
}

.price-tag.high {
    background: rgba(235, 77, 75, 0.15) !important;
    color: #c0392b !important;
    border-color: rgba(235, 77, 75, 0.3) !important;
}

.price-tag.neutral {
    background: rgba(45, 52, 54, 0.1) !important;
    color: #2d3436 !important;
    border-color: rgba(45, 52, 54, 0.2) !important;
}

@media (max-width: 991.98px) {
    /* Responsive Table Transformation to Cards */
    .premium-table thead {
        display: none;
    }

    .premium-table, 
    .premium-table tbody, 
    .premium-table tr, 
    .premium-table td {
        display: block;
        width: 100%;
    }

    .premium-table tr {
        margin-bottom: 1.5rem;
        background: rgba(255, 255, 255, 0.6);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 1.5rem;
        padding: 0.25rem 0.75rem;
        box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    }

    .premium-table td {
        padding: 0.5rem 0 !important;
        text-align: center;
        border: none !important;
    }

    /* Column Specifics in Card View */
    .premium-table td:first-child {
        border-bottom: 1px solid rgba(0,0,0,0.05) !important;
        padding-bottom: 0.4rem !important;
        margin-bottom: 0.25rem;
    }

    .premium-table td:last-child {
        padding-top: 0.4rem !important;
        border-top: 1px solid rgba(0,0,0,0.05) !important;
    }

    /* Input Group stacking on very small screens */
    @media (max-width: 576px) {
        .input-group {
            flex-direction: column;
        }
        .input-group > .form-control {
            border-radius: 0.75rem !important;
            margin-bottom: 0.75rem;
            width: 100% !important;
            padding: 0.8rem 1.2rem;
        }
        .input-group > .btn {
            border-radius: 0.75rem !important;
            width: 100% !important;
            margin-left: 0 !important;
        }

        .main-title {
            font-size: 1.4rem !important;
        }
    }

    .premium-table td .d-flex {
        justify-content: center; /* Softened to allow local overrides */
    }

    .hotel-name {
        font-size: 1.1rem;
    }

    .price-tag {
        font-size: 1.1rem;
        padding: 0.6rem 1.5rem;
    }

    .mini-prices {
        justify-content: center;
        margin: 0.75rem auto;
    }

    .btn-sm {
        width: auto;
        min-width: 110px;
        white-space: nowrap;
        padding: 0.75rem 1.5rem !important;
        font-size: 1rem;
    }

    .hero-section {
        padding: 3rem 1.5rem;
    }

    .main-title {
        font-size: 1.7rem !important;
    }

    /* History Table Mobile Grid Overrides - Force Left Alignment */
    .history-table.premium-table {
        width: 100% !important;
    }

    .history-table.premium-table thead {
        display: table-header-group !important;
    }

    .history-table.premium-table tr {
        display: table-row !important;
        margin-bottom: 0 !important;
        background: transparent !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        border-bottom: 1px solid rgba(0,0,0,0.05) !important;
    }

    .history-table.premium-table td {
        display: table-cell !important;
        padding: 0.5rem 0.5rem !important;
        border-bottom: 1px solid rgba(0,0,0,0.08) !important;
        border-right: 1px solid rgba(0,0,0,0.08) !important;
        text-align: left !important;
    }

    .history-table.premium-table td:first-child {
        width: 50% !important;
        padding-left: 1rem !important;
    }

    .history-table.premium-table td:last-child {
        width: 50% !important;
        border-right: none !important;
    }

    .history-table.premium-table td .d-flex {
        justify-content: flex-start !important;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-40px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.animate-fade-in { animation: fadeIn 0.8s cubic-bezier(0.23, 1, 0.32, 1) forwards; }
.animate-slide-down { animation: slideDown 0.8s cubic-bezier(0.23, 1, 0.32, 1) forwards; }
.animate-shake { animation: shake 0.4s ease-in-out; }

.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }

.check-now-btn {
    border: none;
    background: transparent;
    padding: 0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.check-now-btn:hover {
    color: var(--primary-color) !important;
    transform: scale(1.05);
}

.rotating {
    animation: rotate 2s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.main-title {
    background: linear-gradient(135deg, #2d3436 0%, #4e54c8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
    display: inline-block;
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
    vertical-align: middle;
}

.subtitle {
    color: #636e72;
    font-weight: 400;
}

.empty-state {
    padding: 4rem 2rem;
    color: #b2bec3;
}

.empty-state i {
    font-size: 4rem;
    opacity: 0.3;
}

/* Mini Prices */
.mini-prices {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 0.25rem;
    margin-top: 0.4rem;
    justify-items: center;
    width: 100%;
}

.mini-price {
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.15rem 0.2rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    white-space: nowrap;
    width: 100%;
    overflow: hidden;
}

.price-delta-small {
    font-size: 0.65rem;
    opacity: 0.75;
    margin-left: 2px;
}

.v-hidden {
    visibility: hidden;
}

.mini-price.cheapest {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
}

.mini-price.initial {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
    padding: 0.15rem 0.4rem;
}

.mini-price.expensive {
    background: rgba(235, 77, 75, 0.1);
    color: #eb4d4b;
}

.mini-price i {
    font-size: 0.8rem;
}

/* Modal Styles */
.premium-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    opacity: 0;
    animation: fadeInModal 0.3s ease forwards;
}

.premium-modal-content {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 1.5rem;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    transform: translateY(20px);
    animation: slideUpModal 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

.premium-modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.5);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.premium-modal-header.delete-confirm-active {
    background: rgba(235, 77, 75, 0.08);
    border-bottom: 1px solid rgba(235, 77, 75, 0.2);
}

.premium-modal-body {
    padding: 1.5rem 0; /* Vertical padding only, let table span width */
    overflow-y: auto;
    flex: 1;
}

.premium-modal-body .holiday-info {
    padding: 0 2rem 1rem 2rem;
}

.premium-modal-body .table-responsive {
    margin: 0;
}

.premium-modal-body table {
    width: 100% !important;
    margin-bottom: 0;
}

.close-modal-btn,
.delete-modal-btn {
    background: rgba(0, 0, 0, 0.05);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #636e72;
}

.close-modal-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #2d3436;
    transform: rotate(90deg);
}

.delete-modal-btn:hover {
    background: rgba(235, 77, 75, 0.1);
    color: #eb4d4b;
}

@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUpModal {
    from { opacity: 0; transform: translateY(40px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* History Table Styles inside Modal */
.holiday-info .hotel-name {
    color: #2c3e50;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.url-link {
    font-size: 0.85rem;
    color: #3498db;
    text-decoration: none;
    word-break: break-all;
}

.url-link:hover {
    text-decoration: underline;
}

/* Auth Hero Buttons */
.auth-hero-buttons {
    margin-top: 0.5rem;
}

@media (min-width: 768px) {
    .auth-hero-buttons {
        position: absolute;
        top: 1.5rem;
        right: 1.5rem;
        margin-top: 0;
    }
}

/* Filter Modal Specifics */
.filter-modal {
    max-width: 500px;
}

.destination-grid {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.destination-item label:hover {
    background: rgba(78, 84, 200, 0.05);
    border-color: var(--primary-color) !important;
}

.destination-item input[type="checkbox"] {
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 0.4rem;
    cursor: pointer;
}

@media (max-width: 767.98px) {
    .btn-filter.btn-sm {
        padding: 0.4rem 0.8rem !important;
        min-width: auto !important;
        font-size: 0.75rem !important;
    }
}

@media (max-width: 576px) {
    .filter-modal {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .destination-grid {
        padding: 1.5rem !important;
    }
}