:root {
    --primary-hue: 260;
    /* Deep Purple */
    --accent-hue: 330;
    /* Pinkish */

    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --card-border: rgba(255, 255, 255, 0.1);
    --sidebar-bg: rgba(15, 23, 42, 0.95);

    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: hsl(var(--accent-hue), 90%, 60%);
    --primary: hsl(var(--primary-hue), 80%, 65%);
    --primary-dark: hsl(var(--primary-hue), 80%, 50%);

    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --header-height: 70px;
}

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

h1,
h2,
h3,
.logo h1,
.total-amount {
    font-family: 'Cinzel', serif;
    /* Dramatic font for headings */
    letter-spacing: 0.5px;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    padding-bottom: 120px;
    /* Space for total float */
}

/* Background Animation */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: drift 20s infinite alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: var(--primary);
    animation-duration: 25s;
}

.blob-2 {
    bottom: 20%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: var(--accent);
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: 30%;
    width: 300px;
    height: 300px;
    background: #4f46e5;
    animation-duration: 30s;
    opacity: 0.3;
}

@keyframes drift {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(30px, 50px);
    }
}

/* Header */
.app-header {
    height: var(--header-height);
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--card-border);
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    padding: 0 2rem;
}

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

.logo h1 {
    font-size: 2.5rem;
    /* Enlarged */
    font-weight: 700;
    background: linear-gradient(to right, #fff, #a5b4fc);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
    /* Decorative Glow */
    position: relative;
    padding-bottom: 0.2rem;
}

/* Decorative underline/element */
.logo h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
    box-shadow: 0 0 10px var(--accent);
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.main-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary);
}

.btn-profile {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-main);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.btn-profile:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Layout */
.main-layout {
    display: flex;
    max-width: 1200px;
    margin: 2rem auto;
    gap: 2rem;
    padding: 0 1.5rem;
}

.sidebar {
    width: 250px;
    flex-shrink: 0;
    position: sticky;
    top: calc(var(--header-height) + 2rem);
    height: fit-content;
}

.sidebar .quick-access {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar h3 {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.sidebar-btn {
    width: 100%;
    text-align: left;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--text-main);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-btn:hover {
    background: var(--primary);
}

/* Calendar Widget */
.calendar-widget {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1rem;
    margin-top: 1rem;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.cal-nav-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 0 0.5rem;
    transition: var(--transition);
}

.cal-nav-btn:hover {
    color: var(--primary);
    transform: scale(1.2);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    text-align: center;
    font-size: 0.75rem;
}

.cal-day {
    padding: 4px;
    border-radius: 4px;
    color: var(--text-muted);
}

.cal-day.today {
    background: var(--primary);
    color: white;
    font-weight: bold;
}

.cal-day:hover {
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

.app-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 800px;
    /* Limit width for readability */
}

/* Grid Utilities */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Cards */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--glass-shadow);
    border-color: rgba(255, 255, 255, 0.2);
}

h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: -0.5rem;
    margin-bottom: 1rem;
}

/* Inputs */
.input-group {
    margin-bottom: 1rem;
}

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

input,
select,
textarea {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    color: white;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

.currency-input {
    position: relative;
    display: flex;
    align-items: center;
}

.currency-symbol {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    pointer-events: none;
}

/* Date Input Styling */
.date-wrapper {
    position: relative;
    width: 100%;
}

.date-visual {
    width: 100%;
    padding-right: 2.5rem;
}

.date-real {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 0;
    overflow: hidden;
    border: none;
    padding: 0;
    margin: 0;
    opacity: 0;
}

.calendar-icon {
    position: absolute;
    right: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    z-index: 10;
    font-size: 1.1rem;
    opacity: 0.8;
    transition: var(--transition);
}

.calendar-icon:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

input::-webkit-calendar-picker-indicator {
    display: none;
    /* Hide native icon since we use ours and opacity tricks */
}

.currency-input input {
    padding-left: 2.5rem;
}

textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.5;
}

/* Transport Selector */
.transport-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.transport-option {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 1rem 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.transport-option:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.transport-option.active {
    background: var(--primary);
    border-color: var(--accent);
    color: white;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.transport-icon {
    font-size: 1.75rem;
}

.transport-option span {
    font-size: 0.85rem;
    font-weight: 500;
}

/* Accommodation */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.btn-add {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-main);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-add:hover {
    background: var(--primary);
}

.accommodation-item {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    position: relative;
    border: 1px solid var(--card-border);
    animation: slideInRight 0.3s ease-out;
}

.accommodation-item .btn-remove {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: transparent;
    border: none;
    color: #ff4757;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.7;
    transition: var(--transition);
}

.accommodation-item .btn-remove:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Itinerary / Timeline */
.timeline-container {
    position: relative;
    padding-left: 2rem;
    margin-top: 1.5rem;
}

.timeline-line {
    position: absolute;
    left: 10px;
    /* Center of marker roughly */
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 0;
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    z-index: 1;
}

.timeline-marker {
    position: absolute;
    left: -2.65rem;
    /* Adjust based on padding/line */
    top: 0;
    width: 30px;
    height: 30px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
    border: 2px solid var(--bg-dark);
}

.timeline-content {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
    transition: var(--transition);
}

.timeline-content:hover {
    background: rgba(255, 255, 255, 0.05);
}

.btn-remove-day {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.btn-remove-day:hover {
    color: #ff4757;
}

/* Todo & Grid */
.todo-section .row {
    display: flex;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary);
    border: none;
    padding: 0 1.5rem;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.todo-list {
    list-style: none;
    margin-top: 1rem;
}

.todo-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.todo-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.todo-item.completed {
    opacity: 0.5;
}

.todo-item.completed span {
    text-decoration: line-through;
}

.checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-muted);
    border-radius: 6px;
    display: grid;
    place-items: center;
    transition: var(--transition);
}

.todo-item.completed .checkbox {
    background: var(--accent);
    border-color: var(--accent);
}

.checkbox::after {
    content: '✓';
    color: white;
    font-size: 12px;
    opacity: 0;
    transform: scale(0);
    transition: var(--transition);
}

.todo-item.completed .checkbox::after {
    opacity: 1;
    transform: scale(1);
}

/* Currency Converter */
.conversion-result {
    text-align: center;
    margin-top: 1rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 12px;
}

#conversion-display {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

/* Total Float */
.total-float {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1rem 2rem;
    border-radius: 100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 100;
    transition: var(--transition);
}

.total-content {
    display: flex;
    flex-direction: column;
}

.total-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.total-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.per-person {
    font-size: 0.9rem;
    color: var(--accent);
    text-align: right;
    font-weight: 500;
}

/* Footer */
.app-footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--card-border);
    margin-top: 2rem;
    background: rgba(15, 23, 42, 0.6);
}

.footer-links {
    margin-top: 0.5rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
}

/* Animations */
.fade-in {
    opacity: 0;
    animation: fadeIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.fade-in-up {
    opacity: 0;
    transform: translate(-50%, 20px);
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards 1s;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

.delay-5 {
    animation-delay: 0.5s;
}

.delay-6 {
    animation-delay: 0.6s;
}

.delay-7 {
    animation-delay: 0.7s;
}

.delay-8 {
    animation-delay: 0.8s;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

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

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

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

/* Responsive */
@media (max-width: 900px) {
    .main-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        position: relative;
        top: 0;
    }
}

@media (max-width: 600px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .transport-selector {
        grid-template-columns: repeat(2, 1fr);
    }

    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .main-nav ul {
        gap: 1rem;
        font-size: 0.85rem;
    }
}

/* Print / PDF Export Styles */
@media print {
    body {
        background: white;
        color: black;
        padding: 0;
    }

    .background-blobs,
    .sidebar,
    .app-header nav,
    .btn-profile,
    .btn-add,
    .btn-remove,
    .btn-remove-day,
    .btn-primary,
    .total-float,
    .app-footer,
    #new-todo,
    .checkbox,
    .transport-option:not(.active),
    .input-group button,
    button {
        display: none !important;
    }

    .app-header {
        position: static;
        background: none;
        border: none;
        padding: 0;
        margin-bottom: 2rem;
        text-align: center;
    }

    .logo h1 {
        font-size: 3rem;
        background: none;
        color: black;
        -webkit-text-fill-color: black;
        text-shadow: none;
    }

    .main-layout {
        display: block;
        margin: 0;
        padding: 0;
    }

    .app-container {
        max-width: 100%;
        margin: 0;
    }

    .card {
        background: none;
        border: 1px solid #ddd;
        border-radius: 0;
        box-shadow: none;
        page-break-inside: avoid;
        margin-bottom: 2rem;
        color: black;
    }

    h2 {
        color: black;
        border-bottom: 1px solid #eee;
        padding-bottom: 0.5rem;
    }

    input,
    select,
    textarea {
        background: none !important;
        border: none !important;
        color: black !important;
        padding: 0 !important;
        width: auto;
        font-weight: 600;
        resize: none;
    }

    /* Expand textareas for print */
    textarea {
        display: block;
        width: 100%;
        height: auto;
        white-space: pre-wrap;
    }

    .input-group label {
        color: #666;
        font-size: 0.8rem;
        text-transform: uppercase;
        margin-bottom: 0px;
    }

    .transport-selector {
        display: none;
    }

    .transport-input-row {
        margin-top: 1rem;
        border: 1px solid #eee;
        padding: 1rem;
    }

    .accommodation-item,
    .timeline-item {
        background: none;
        border: 1px solid #eee;
        color: black;
        page-break-inside: avoid;
    }

    .timeline-marker {
        border-color: white;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .currency-symbol {
        font-weight: bold;
        position: static;
        margin-right: 2px;
    }

    .currency-input input {
        padding-left: 0 !important;
    }

    .currency-input {
        display: flex;
        align-items: center;
    }

    /* Show Total at bottom of doc */
    .app-container::after {
        content: "Total Estimated Cost: " attr(data-total-print);
        display: block;
        font-size: 2rem;
        font-weight: bold;
        margin-top: 2rem;
        text-align: right;
        border-top: 2px solid black;
        padding-top: 1rem;
        font-family: 'Cinzel', serif;
    }
}