@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
    --primary: #4A90D9;
    --primary-dark: #3670B0;
    --primary-gradient: linear-gradient(135deg, #4A90D9 0%, #1a5fa8 100%);
    --accent: #f59e0b;
    --accent-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --dark: #0f172a;
    --dark-2: #1e293b;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-500: #64748b;
    --gray-700: #334155;
    --success: #10b981;
    --danger: #ef4444;
    --radius: 16px;
    --shadow: 0 4px 20px rgba(0,0,0,0.06);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--dark);
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ====== HERO ====== */
.hero {
    position: relative;
    padding: 60px 20px 40px;
    text-align: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%);
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(74,144,217,0.12) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(245,158,11,0.08) 0%, transparent 40%);
    animation: float 20s ease-in-out infinite;
}
@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-2%, 2%); }
}
.hero h1 {
    font-size: 42px;
    font-weight: 900;
    letter-spacing: -1px;
    margin-bottom: 10px;
    position: relative;
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero p {
    font-size: 16px;
    color: var(--gray-500);
    position: relative;
}

/* ====== QUERY PANEL ====== */
.container { max-width: 800px; margin: 0 auto; padding: 0 20px; }

.query-panel {
    position: relative;
    margin-top: -10px;
    background: rgba(30, 41, 59, 0.8);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow-lg);
}

/* Section blocks */
.section-block { margin-bottom: 24px; }
.section-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-500);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.loading-text { color: var(--gray-500); font-size: 13px; }

/* Button Group */
.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.btn-group .pick-btn {
    padding: 10px 20px;
    background: rgba(15, 23, 42, 0.6);
    border: 1.5px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
}
.btn-group .pick-btn:hover {
    border-color: rgba(74,144,217,0.4);
    color: #fff;
    background: rgba(74,144,217,0.1);
}
.btn-group .pick-btn.active {
    background: var(--primary-gradient);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(74,144,217,0.35);
    transform: translateY(-1px);
}

/* Day Grid */
.day-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
    gap: 8px;
}
.day-grid .pick-btn {
    padding: 10px 0;
    text-align: center;
    font-size: 14px;
    min-width: 0;
}

/* Animate day section */
#daySection {
    animation: fadeUp 0.3s ease;
}

.btn-query {
    width: 100%;
    padding: 16px 36px;
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    margin-top: 8px;
}
.btn-query:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(74,144,217,0.4);
}
.btn-query:active { transform: translateY(0); }
.btn-query.loading { pointer-events: none; opacity: 0.7; }

/* ====== RESULTS ====== */
.results { margin-top: 32px; display: none; }
.results.show { display: block; animation: fadeUp 0.5s ease; }
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Total Price Card */
.price-card {
    background: linear-gradient(135deg, rgba(74,144,217,0.15) 0%, rgba(245,158,11,0.1) 100%);
    border: 1px solid rgba(74,144,217,0.2);
    border-radius: var(--radius);
    padding: 36px;
    text-align: center;
    margin-bottom: 24px;
}
.price-card .label { font-size: 14px; color: var(--gray-500); margin-bottom: 16px; font-weight: 600; }
.price-card .price-range {
    font-size: 44px;
    font-weight: 900;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}
.price-card .unit { font-size: 14px; color: var(--gray-500); margin-top: 6px; }
.price-card .pkg-info {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 13px;
    color: var(--gray-500);
}

/* Multi-person price rows */
.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.price-row:last-child { border-bottom: none; }
.price-row .people-label {
    font-size: 15px;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    gap: 8px;
}
.price-row .people-icon {
    font-size: 18px;
}
.price-row .people-price {
    font-size: 24px;
    font-weight: 900;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.price-row .people-price.green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Breakdown */
.breakdown { display: flex; flex-direction: column; gap: 16px; padding-bottom: 40px; }

.breakdown-card {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    overflow: hidden;
}
.breakdown-header {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    cursor: pointer;
    transition: background 0.2s;
}
.breakdown-header:hover { background: rgba(255,255,255,0.03); }
.breakdown-header .title {
    font-size: 15px; font-weight: 700;
    display: flex; align-items: center; gap: 10px;
}
.breakdown-header .subtitle { text-align: center; min-width: 140px; }
.breakdown-header .subtitle { font-size: 14px; font-weight: 700; color: var(--accent); }
.breakdown-header .arrow {
    transition: transform 0.3s;
    color: var(--gray-500);
}
.breakdown-card.open .arrow { transform: rotate(180deg); }

.breakdown-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.breakdown-card.open .breakdown-body { max-height: 1000px; }
.breakdown-content {
    padding: 0 20px 18px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.detail-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 0;
    font-size: 13px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.detail-row:last-child { border-bottom: none; }
.detail-row .detail-label { color: var(--gray-500); }
.detail-row .detail-value { font-weight: 600; }
.detail-row .detail-value.highlight { color: var(--accent); }

/* ====== CUSTOM HOTEL SELECT ====== */
.hotel-select-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.hotel-select-row:last-child { border-bottom: none; }
.hotel-select-row .night-label {
    font-size: 13px;
    color: var(--gray-500);
    white-space: nowrap;
    min-width: 130px;
}
.hotel-select-row select {
    flex: 1;
    padding: 8px 12px;
    background: rgba(15, 23, 42, 0.6);
    border: 1.5px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8.825L.35 3.175l.7-.7L6 7.425l4.95-4.95.7.7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
}
.hotel-select-row select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(74,144,217,0.15);
}
.hotel-select-row .select-price {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    white-space: nowrap;
    min-width: 80px;
    text-align: right;
}
.custom-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0 4px;
    margin-top: 4px;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 13px;
}
.custom-total-row .detail-label { color: var(--gray-500); }
.custom-total-row .detail-value { font-weight: 700; color: var(--success); font-size: 14px; }

/* Custom Price Card */
.custom-price-card {
    background: linear-gradient(135deg, rgba(16,185,129,0.12) 0%, rgba(74,144,217,0.08) 100%);
    border: 1px solid rgba(16,185,129,0.25);
    margin-bottom: 24px;
}
.custom-price-card .price-range {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ====== ERROR ====== */
.error-msg {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.3);
    border-radius: 10px;
    padding: 16px 20px;
    color: #fca5a5;
    font-size: 14px;
    text-align: center;
    margin-top: 20px;
    display: none;
}
.error-msg.show { display: block; animation: fadeUp 0.3s ease; }

/* ====== FOOTER ====== */
.footer {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-500);
    font-size: 12px;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 600px) {
    .hero h1 { font-size: 28px; }
    .price-card .price-range { font-size: 32px; }
    .query-panel { padding: 20px; }
    .day-grid { grid-template-columns: repeat(7, 1fr); gap: 6px; }
    .day-grid .pick-btn { padding: 8px 0; font-size: 13px; }
}

