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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    min-height: 100vh;
}

header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #fff;
    padding: 2rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header-content {
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 300;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

header p {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.budget-summary {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 10px;
    margin: 1rem auto;
    max-width: 400px;
    backdrop-filter: blur(10px);
}

.budget-label {
    font-size: 1rem;
    opacity: 0.8;
}

.budget-amount {
    font-size: 1.8rem;
    font-weight: bold;
    color: #4CAF50;
    margin: 0 10px;
}

.budget-status {
    font-size: 0.9rem;
    color: #4CAF50;
    font-weight: bold;
}

.main-nav {
    margin-top: 2rem;
}

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

.main-nav a {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.main-nav a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

main {
    padding: 2rem;
    max-width: 1200px;
    margin: 2rem auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

section:last-of-type {
    margin-bottom: 0;
}

h2 {
    color: #1e3c72;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #667eea;
    position: relative;
    cursor: pointer;
    user-select: none;
}

h2::before {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

h3 {
    color: #2a5298;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    position: relative;
    padding-left: 1rem;
}

h3::before {
    content: '📍';
    position: absolute;
    left: 0;
    top: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

tr {
    transition: all 0.3s ease;
}

tr:nth-child(even) {
    background-color: rgba(102, 126, 234, 0.02);
}

tr:hover {
    background-color: rgba(102, 126, 234, 0.05);
    transform: scale(1.01);
}

a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

a:hover {
    color: #764ba2;
    transform: translateY(-1px);
}

a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

a:hover::after {
    width: 100%;
}

ul {
    list-style: none;
    margin-left: 0;
    padding-left: 0;
}

ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

ul li::before {
    content: '✈️';
    position: absolute;
    left: 0;
    top: 0;
}

ul ul li::before {
    content: '🎯';
}

.note {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 152, 0, 0.1) 100%);
    border-left: 4px solid #ffc107;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0 10px 10px 0;
    color: #856404;
    font-weight: 500;
}

footer {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #fff;
    margin-top: 2rem;
    border-radius: 20px 20px 0 0;
}

@media (max-width: 768px) {
    table, thead, tbody, th, td, tr {
        display: block;
    }

    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    tr {
        border: 1px solid #ccc;
        margin-bottom: 10px;
    }

    td {
        border: none;
        border-bottom: 1px solid #eee;
        position: relative;
        padding-left: 50%;
        text-align: right;
    }

    td:before {
        position: absolute;
        top: 6px;
        left: 6px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
    }

    /* Label the data */
    td:nth-of-type(1):before { content: "Trecho"; }
    td:nth-of-type(2):before { content: "Data"; }
    td:nth-of-type(3):before { content: "Companhia"; }
    td:nth-of-type(4):before { content: "Preço (BRL)"; }
    td:nth-of-type(5):before { content: "Link"; }
    td:nth-of-type(6):before { content: "Observações"; }

    td:nth-of-type(1):before { content: "Cidade"; }
    td:nth-of-type(2):before { content: "Hostel Sugerido"; }
    td:nth-of-type(3):before { content: "Noites"; }
    td:nth-of-type(4):before { content: "Preço Total (BRL)"; }
    td:nth-of-type(5):before { content: "Link"; }
    td:nth-of-type(6):before { content: "Por que este?"; }

    td:nth-of-type(1):before { content: "Categoria"; }
    td:nth-of-type(2):before { content: "Custo Real/Estimado (BRL)"; }
    td:nth-of-type(3):before { content: "Detalhes"; }
}


.collapsed .toggle-icon {
    transform: rotate(0deg);
    transition: transform 0.3s ease-in-out;
}

.collapsed > *:not(h2) {
    display: none;
}

.toggle-icon {
    display: inline-block;
    margin-left: 10px;
    transition: transform 0.3s ease-in-out;
}

section:not(.collapsed) .toggle-icon {
    transform: rotate(180deg);
}


/* Progress Bar */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 1000;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s ease;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Budget Calculator */
.budget-calculator {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 15px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.budget-calculator h4 {
    color: #1e3c72;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.calculator-inputs {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
}

.calculator-inputs label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    color: #2a5298;
}

.calculator-inputs input {
    width: 120px;
    padding: 0.5rem;
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.calculator-inputs input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.calculator-result {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    font-size: 1.2rem;
    color: #1e3c72;
}

/* Enhanced Collapsible Sections */
.toggle-icon {
    display: inline-block;
    margin-left: 10px;
    transition: transform 0.3s ease;
    font-size: 0.8em;
    opacity: 0.7;
}

/* Notification badges */
.price-update {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    margin-left: 8px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Enhanced tables with hover effects */
table {
    position: relative;
    overflow: hidden;
}

table::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

table:hover::before {
    left: 100%;
}

/* Interactive budget summary */
.budget-summary {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.budget-summary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.budget-summary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.6s;
}

.budget-summary:hover::before {
    left: 100%;
}

/* Floating action buttons */
.fab {
    position: fixed;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.fab-calculator {
    bottom: 2rem;
    right: 8rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Enhanced notes */
.note {
    position: relative;
    overflow: hidden;
}

.note::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    z-index: -1;
    border-radius: inherit;
}

/* Smooth reveal animation */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: slideInUp 0.6s ease-out;
}

/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Status indicators */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-updated { background: #4CAF50; }
.status-warning { background: #ff9800; }
.status-info { background: #2196F3; }

.collapsed .toggle-icon {
    transform: rotate(0deg);
}

.collapsed > *:not(h2) {
    display: none;
}

/* Enhanced Responsive Design */
@media (max-width: 768px) {
    .header-content h1 {
        font-size: 2rem;
    }
    
    .main-nav ul {
        gap: 1rem;
    }
    
    .main-nav a {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
    
    main {
        margin: 1rem;
        padding: 1rem;
    }
    
    section {
        padding: 1rem;
    }
    
    .budget-summary {
        max-width: 100%;
    }
    
    .budget-amount {
        font-size: 1.5rem;
    }
    
    .calculator-inputs {
        grid-template-columns: 1fr;
    }
    
    .calculator-inputs label {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .calculator-inputs input {
        width: 100%;
    }
    
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .header-content h1 {
        font-size: 1.5rem;
    }

    .header-content p {
        font-size: 1rem;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }

    th, td {
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    .fab {
        width: 48px;
        height: 48px;
        font-size: 1rem;
    }

    .fab-calculator {
        right: 6rem;
        bottom: 1.5rem;
    }

    .price-update {
        font-size: 0.65rem;
        padding: 1px 6px;
    }
}
