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

        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            padding: 20px;
        }

        .container {
            max-width: 900px;
            margin: 0 auto;
        }

        header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            color: white;
            margin-bottom: 40px;
            flex-wrap: wrap;
            gap: 20px;
        }

        .header-title {
            flex: 1;
        }

        .header-title h1 {
            font-size: 2.5em;
            margin-bottom: 10px;
        }

        .login-bar {
        
        #login-inputs {
            display: flex;
            flex-wrap: wrap;
            gap: 15px 10px;
            align-items: center;
        }
            display: flex;
            align-items: center;
            gap: 20px 10px;
            background: rgba(255, 255, 255, 0.1);
            padding: 10px 15px;
            border-radius: 8px;
            flex-wrap: wrap;
        }

        .login-bar input {
            padding: 6px 10px;
            border: 1px solid rgba(255, 255, 255, 0.3);
            border-radius: 4px;
            background: rgba(255, 255, 255, 0.9);
            font-size: 14px;
            width: 120px;
        }

        .login-bar button {
            padding: 6px 12px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 14px;
        }

        .login-bar .btn-login {
            background: #4CAF50;
            color: white;
        }

        .login-bar .btn-login:hover {
            background: #45a049;
        }

        .login-bar .btn-logout {
            background: #dc3545;
            color: white;
        }

        .login-bar .btn-logout:hover {
            background: #c82333;
        }

        .login-bar a {
            color: white;
            text-decoration: underline;
            font-size: 14px;
        }

        .login-bar .user-status {
            color: white;
            font-size: 14px;
        }

        .login-bar .user-status strong {
            color: #90EE90;
        }

        header p {
            font-size: 1.1em;
            opacity: 0.9;
        }

        .card {
            background: white;
            border-radius: 12px;
            padding: 30px;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
            margin-bottom: 30px;
        }

        .card h2 {
            color: #333;
            margin-bottom: 25px;
            font-size: 1.5em;
            border-bottom: 2px solid #667eea;
            padding-bottom: 10px;
        }

        /* Auth styles */
        .auth-form {
            max-width: 400px;
            margin: 0 auto;
        }

        .form-group {
            margin-bottom: 20px;
        }

        .form-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: 600;
            color: #333;
        }

        .form-group input {
            width: 100%;
            padding: 12px;
            border: 2px solid #ddd;
            border-radius: 6px;
            font-size: 1em;
            transition: border-color 0.3s;
        }

        .form-group input:focus {
            outline: none;
            border-color: #667eea;
        }

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

        .date-input-wrapper input[type="text"] {
            flex: 1;
            padding-right: 40px;
        }

        .calendar-icon {
            position: absolute;
            right: 0;
            top: 0;
            bottom: 0;
            width: 44px;
            cursor: pointer;
            font-size: 1.2em;
            color: #666;
            user-select: none;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 1;
            pointer-events: none; /* Let clicks pass through to the date input */
        }

        .calendar-icon:hover {
            color: #667eea;
        }

        .date-input-wrapper input[type="date"] {
            position: absolute;
            right: 0;
            top: 0;
            width: 44px;
            height: 100%;
            opacity: 0;
            cursor: pointer;
            z-index: 2;
        }

        /* Ensure calendar icon shows pointer but date input captures clicks */
        .date-input-wrapper input[type="date"]::-webkit-calendar-picker-indicator {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            width: 100%;
            height: 100%;
            cursor: pointer;
            background: transparent;
        }

        .auth-toggle {
            text-align: center;
            margin-top: 20px;
        }

        .auth-toggle a {
            color: #667eea;
            cursor: pointer;
            text-decoration: underline;
        }

        /* Weight styles */
        .weight-control {
            margin-bottom: 30px;
            padding: 20px;
            background: #f8f9fa;
            border-radius: 8px;
            border-left: 4px solid #667eea;
        }

        .weight-control label {
            display: block;
            margin-bottom: 8px;
            font-weight: 600;
            color: #333;
        }

        .weight-control .description {
            font-size: 0.9em;
            color: #666;
            margin-bottom: 12px;
            display: block;
        }

        .slider-container {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        input[type="range"] {
            flex: 1;
            height: 6px;
            border-radius: 3px;
            background: #ddd;
            outline: none;
            -webkit-appearance: none;
            appearance: none;
        }

        input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: #667eea;
            cursor: pointer;
            box-shadow: 0 2px 5px rgba(102, 126, 234, 0.4);
        }

        input[type="range"]::-moz-range-thumb {
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: #667eea;
            cursor: pointer;
            border: none;
            box-shadow: 0 2px 5px rgba(102, 126, 234, 0.4);
        }

        .weight-value {
            min-width: 60px;
            text-align: right;
            font-weight: 600;
            color: #667eea;
            font-size: 1.1em;
        }

        /* Dual range slider styles */
        .dual-range-container {
            position: relative;
            width: 100%;
            height: 30px;
            margin: 10px 0;
        }

        .dual-range-container input[type="range"] {
            position: absolute;
            width: 100%;
            pointer-events: none;
            -webkit-appearance: none;
            appearance: none;
            height: 6px;
            background: transparent;
            top: 50%;
            transform: translateY(-50%);
        }

        .dual-range-container input[type="range"]::-webkit-slider-thumb {
            pointer-events: auto;
            -webkit-appearance: none;
            appearance: none;
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: #667eea;
            cursor: pointer;
            box-shadow: 0 2px 5px rgba(102, 126, 234, 0.4);
        }

        .dual-range-container input[type="range"]::-moz-range-thumb {
            pointer-events: auto;
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: #667eea;
            cursor: pointer;
            border: none;
        }

        .dual-range-track {
            position: absolute;
            width: 100%;
            height: 6px;
            background: #ddd;
            border-radius: 3px;
            top: 50%;
            transform: translateY(-50%);
        }

        .dual-range-highlight {
            position: absolute;
            height: 6px;
            background: #667eea;
            border-radius: 3px;
            top: 50%;
            transform: translateY(-50%);
        }

        .dual-range-highlight-end {
            position: absolute;
            height: 6px;
            background: #667eea;
            border-radius: 3px;
            top: 50%;
            transform: translateY(-50%);
            display: none;
        }

        .range-values {
            display: flex;
            justify-content: space-between;
            margin-top: 5px;
            font-size: 0.85em;
            color: #666;
        }

        .dual-range-wrapper {
            padding-bottom: 25px; /* Space for floating labels */
        }

        .range-thumb-label {
            position: absolute;
            bottom: -22px;
            transform: translateX(-50%);
            font-size: 0.8em;
            font-weight: 500;
            color: #667eea;
            background: #f8f9ff;
            padding: 2px 6px;
            border-radius: 4px;
            white-space: nowrap;
            pointer-events: none;
            z-index: 10;
            border: 1px solid rgba(102, 126, 234, 0.2);
        }

        .range-label {
            font-size: 0.85em;
            color: #888;
            margin-bottom: 5px;
        }

        .remove-weight-btn {
            background: none;
            border: none;
            color: #999;
            font-size: 1.5em;
            cursor: pointer;
            padding: 0 8px;
            line-height: 1;
            transition: color 0.2s;
        }

        .remove-weight-btn:hover {
            color: #ef4444;
        }

        .add-weight-container select {
            background: white;
        }

        .auto-save-status {
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 10px;
            margin-top: 15px;
            border-radius: 6px;
            font-size: 0.9em;
            transition: all 0.3s ease;
        }

        .auto-save-status.saving {
            background: #fef3c7;
            color: #92400e;
        }

        .auto-save-status.saved {
            background: #d1fae5;
            color: #065f46;
        }

        .auto-save-status.error {
            background: #fee2e2;
            color: #991b1b;
        }

        .auto-save-spinner {
            display: inline-block;
            width: 14px;
            height: 14px;
            border: 2px solid #92400e;
            border-top-color: transparent;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
            margin-right: 8px;
        }

        .tooltip-trigger {
            display: inline-block;
            width: 16px;
            height: 16px;
            background: #667eea;
            color: white;
            border-radius: 50%;
            text-align: center;
            font-size: 11px;
            line-height: 16px;
            cursor: help;
            margin-left: 5px;
        }

        .tooltip {
            position: relative;
            display: inline-block;
        }

        .tooltip .tooltip-text {
            visibility: hidden;
            width: 250px;
            background-color: #333;
            color: #fff;
            text-align: left;
            border-radius: 6px;
            padding: 10px;
            position: absolute;
            z-index: 1;
            bottom: 125%;
            left: 50%;
            margin-left: -125px;
            opacity: 0;
            transition: opacity 0.3s;
            font-size: 0.85em;
            font-weight: normal;
        }

        .tooltip .tooltip-text::after {
            content: "";
            position: absolute;
            top: 100%;
            left: 50%;
            margin-left: -5px;
            border-width: 5px;
            border-style: solid;
            border-color: #333 transparent transparent transparent;
        }

        .tooltip:hover .tooltip-text {
            visibility: visible;
            opacity: 1;
        }

        .btn-preset {
            padding: 8px 16px;
            border: 2px solid #667eea;
            border-radius: 20px;
            background: white;
            color: #667eea;
            font-weight: 600;
            font-size: 0.9em;
            cursor: pointer;
            transition: all 0.2s;
            margin: 4px;
        }

        .btn-preset:hover {
            background: #667eea;
            color: white;
        }

        /* Footer styles */
        .footer {
            background: rgba(0, 0, 0, 0.2);
            color: rgba(255, 255, 255, 0.9);
            padding: 30px 20px;
            margin-top: 40px;
            border-radius: 12px 12px 0 0;
        }

        .footer-content {
            max-width: 900px;
            margin: 0 auto;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 30px;
        }

        .footer-section h4 {
            font-size: 1em;
            margin-bottom: 10px;
            color: white;
        }

        .footer-section p, .footer-section a {
            font-size: 0.9em;
            color: rgba(255, 255, 255, 0.8);
            margin: 5px 0;
            text-decoration: none;
        }

        .footer-section a:hover {
            color: white;
            text-decoration: underline;
        }

        .footer-bottom {
            max-width: 900px;
            margin: 20px auto 0;
            padding-top: 20px;
            border-top: 1px solid rgba(255, 255, 255, 0.2);
            text-align: center;
            font-size: 0.85em;
            color: rgba(255, 255, 255, 0.7);
        }

        .weight-section {
            margin-bottom: 15px;
        }

        /* Button feedback animations */
        .btn-loading {
            position: relative;
            pointer-events: none;
            opacity: 0.8;
        }

        .btn-loading::after {
            content: '';
            position: absolute;
            width: 16px;
            height: 16px;
            top: 50%;
            left: 50%;
            margin-top: -8px;
            margin-left: -8px;
            border: 2px solid transparent;
            border-top-color: white;
            border-radius: 50%;
            animation: btn-spin 0.8s linear infinite;
        }

        @keyframes btn-spin {
            to { transform: rotate(360deg); }
        }

        .btn-success-flash {
            animation: success-flash 0.5s ease;
        }

        @keyframes success-flash {
            0% { transform: scale(1); }
            50% { transform: scale(1.05); background: #059669; }
            100% { transform: scale(1); }
        }

        .btn-error-flash {
            animation: error-flash 0.5s ease;
        }

        @keyframes error-flash {
            0%, 100% { transform: translateX(0); }
            20%, 60% { transform: translateX(-5px); }
            40%, 80% { transform: translateX(5px); }
        }

        /* Toast notification */
        .toast {
            position: fixed;
            top: 20px;
            right: 20px;
            padding: 15px 25px;
            border-radius: 8px;
            color: white;
            font-weight: 500;
            z-index: 1000;
            transform: translateX(120%);
            transition: transform 0.3s ease;
            box-shadow: 0 4px 15px rgba(0,0,0,0.2);
        }

        .toast.show {
            transform: translateX(0);
        }

        .toast.success {
            background: linear-gradient(135deg, #10b981, #059669);
        }

        .toast.error {
            background: linear-gradient(135deg, #ef4444, #dc2626);
        }

        .button-group {
            display: flex;
            gap: 20px 10px;
            margin-top: 30px;
            flex-wrap: wrap;
        }

        button {
            padding: 12px 24px;
            border: none;
            border-radius: 6px;
            font-size: 1em;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .btn-primary {
            background: #667eea;
            color: white;
            flex: 1;
            min-width: 150px;
        }

        .btn-primary:hover {
            background: #5568d3;
            box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
        }

        .btn-secondary {
            background: #e0e7ff;
            color: #667eea;
        }

        .btn-secondary:hover {
            background: #c7d2fd;
        }

        .btn-success {
            background: #10b981;
            color: white;
        }

        .btn-success:hover:not(:disabled) {
            background: #059669;
            box-shadow: 0 5px 15px rgba(16, 185, 129, 0.4);
        }

        .btn-success:disabled {
            background: #9ca3af;
            cursor: not-allowed;
            opacity: 0.7;
        }

        .search-btn-wrapper {
            position: relative;
            display: inline-block;
        }

        .search-btn-tooltip {
            visibility: hidden;
            opacity: 0;
            position: absolute;
            bottom: 100%;
            left: 50%;
            transform: translateX(-50%);
            background: #374151;
            color: white;
            padding: 6px 10px;
            border-radius: 6px;
            font-size: 12px;
            white-space: nowrap;
            margin-bottom: 8px;
            transition: opacity 0.2s, visibility 0.2s;
            z-index: 1000;
        }

        .search-btn-tooltip::after {
            content: '';
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%);
            border: 6px solid transparent;
            border-top-color: #374151;
        }

        .search-btn-wrapper:hover .search-btn-tooltip {
            visibility: visible;
            opacity: 1;
        }

        .search-btn-wrapper:has(button:not(:disabled)) .search-btn-tooltip {
            display: none;
        }

        .btn-danger {
            background: #ef4444;
            color: white;
        }

        .btn-danger:hover {
            background: #dc2626;
        }

        .message {
            padding: 15px 20px;
            border-radius: 6px;
            margin-bottom: 20px;
            display: none;
        }

        .message.show {
            display: block;
        }

        .message.success {
            background: #d1fae5;
            color: #065f46;
            border-left: 4px solid #10b981;
        }

        .message.error {
            background: #fee2e2;
            color: #7f1d1d;
            border-left: 4px solid #ef4444;
        }

        .presets {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            gap: 20px 10px;
            margin-top: 20px;
        }

        .preset-btn {
            padding: 10px 15px;
            font-size: 0.9em;
        }

        .user-info {
            text-align: right;
            color: #666;
            margin-bottom: 20px;
        }

        .user-info strong {
            color: #333;
        }

        .hidden {
            display: none !important;
        }

        /* Search form styles */
        .search-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 20px;
            max-width: 900px;
            margin: 0 auto;
        }

        @media (max-width: 800px) {
            .search-grid {
                grid-template-columns: repeat(2, 1fr);
            }
        }

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

        .search-grid .form-group {
            margin-bottom: 0;
        }

        .search-grid input {
            width: 100%;
            padding: 12px;
            border: 2px solid #ddd;
            border-radius: 6px;
            font-size: 1em;
        }

        .search-grid input:focus {
            outline: none;
            border-color: #667eea;
        }

        /* Slider styles */
        .slider {
            width: 100%;
            height: 8px;
            -webkit-appearance: none;
            appearance: none;
            background: #ddd;
            border-radius: 4px;
            outline: none;
        }

        .slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 20px;
            height: 20px;
            background: #667eea;
            border-radius: 50%;
            cursor: pointer;
        }

        .slider::-moz-range-thumb {
            width: 20px;
            height: 20px;
            background: #667eea;
            border-radius: 50%;
            cursor: pointer;
            border: none;
        }

        /* Dual range slider */
        .dual-range-container {
            position: relative;
            height: 30px;
            width: 100%;
        }

        .dual-range {
            position: absolute;
            width: 100%;
            height: 8px;
            -webkit-appearance: none;
            appearance: none;
            background: transparent;
            pointer-events: none;
            top: 10px;
        }

        .dual-range::-webkit-slider-thumb {
            -webkit-appearance: none;
            appearance: none;
            width: 20px;
            height: 20px;
            background: #667eea;
            border-radius: 50%;
            cursor: pointer;
            pointer-events: auto;
            position: relative;
            z-index: 2;
        }

        .dual-range::-moz-range-thumb {
            width: 20px;
            height: 20px;
            background: #667eea;
            border-radius: 50%;
            cursor: pointer;
            pointer-events: auto;
            border: none;
        }

        .dual-range-container::before {
            content: '';
            position: absolute;
            top: 10px;
            left: 0;
            right: 0;
            height: 8px;
            background: #ddd;
            border-radius: 4px;
        }

        /* Results styles */
        .results-container {
            margin-top: 20px;
        }

        .trip-card {
            background: #f8f9fa;
            border-radius: 8px;
            padding: 20px;
            margin-bottom: 15px;
            border-left: 4px solid #667eea;
        }

        .trip-card.top-pick {
            border-left-color: #10b981;
            background: #f0fdf4;
        }

        .trip-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
            flex-wrap: wrap;
            gap: 20px 10px;
        }

        .trip-rank {
            font-size: 1.4em;
            font-weight: 700;
            color: #667eea;
        }

        .trip-card.top-pick .trip-rank {
            color: #10b981;
        }

        .trip-score {
            background: #667eea;
            color: white;
            padding: 5px 12px;
            border-radius: 20px;
            font-weight: 600;
        }

        .trip-card.top-pick .trip-score {
            background: #10b981;
        }

        .trip-stats {
            display: flex;
            gap: 20px;
            flex-wrap: wrap;
            margin-bottom: 15px;
            font-size: 0.95em;
        }

        .trip-stat {
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .trip-stat-value {
            font-weight: 600;
            color: #333;
        }

        .flight-list {
            border-top: 1px solid #ddd;
            padding-top: 15px;
        }

        .flight-item {
            display: flex;
            align-items: center;
            padding: 10px 0;
            border-bottom: 1px dashed #ddd;
            flex-wrap: wrap;
            gap: 20px 10px;
        }

        .flight-item:last-child {
            border-bottom: none;
        }

        .flight-route {
            display: flex;
            flex-direction: column;
            min-width: 180px;
        }

        .route-codes {
            font-weight: 600;
            color: #333;
            font-size: 1em;
        }

        .route-cities {
            font-size: 0.85em;
            color: #666;
        }

        .flight-times {
            color: #666;
            font-size: 0.9em;
        }

        .flight-price {
            color: #10b981;
            font-weight: 600;
        }

        .stay-info {
            background: #e0e7ff;
            color: #4338ca;
            padding: 4px 10px;
            border-radius: 4px;
            font-size: 0.85em;
            margin-left: auto;
        }

        .autocomplete-wrapper {
            position: relative;
        }

        .autocomplete-results {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: white;
            border: 1px solid #ddd;
            border-top: none;
            border-radius: 0 0 8px 8px;
            max-height: 250px;
            overflow-y: auto;
            z-index: 1000;
            display: none;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        }

        .autocomplete-results.show {
            display: block;
        }

        .autocomplete-item {
            padding: 10px 12px;
            cursor: pointer;
            border-bottom: 1px solid #eee;
        }

        .autocomplete-item:last-child {
            border-bottom: none;
        }

        .autocomplete-item:hover,
        .autocomplete-item.selected {
            background: #f0f7ff;
        }

        .autocomplete-item .airport-code {
            font-weight: 600;
            color: #2563eb;
            font-size: 1.1em;
        }

        .autocomplete-item .airport-name {
            color: #333;
            margin-left: 8px;
        }

        .autocomplete-item .airport-location {
            display: block;
            font-size: 0.85em;
            color: #666;
            margin-top: 2px;
        }

        .autocomplete-item .item-icon {
            font-size: 1.2em;
            margin-right: 8px;
        }

        .autocomplete-country, .autocomplete-city {
            background: #f8fafc;
        }

        .autocomplete-country .airport-name,
        .autocomplete-city .airport-name {
            font-weight: 600;
            color: #1e40af;
        }

        .airport-tag .tag-icon {
            margin-right: 4px;
        }

        .airport-tag.location-tag {
            background: #fef3c7;
            color: #92400e;
        }

        .airport-tag.location-tag .tag-city {
            color: #b45309;
            font-weight: 500;
        }

        /* Tag input styles for exclude airports */
        .tag-input-container {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 6px;
            padding: 8px;
            border: 1px solid #ddd;
            border-radius: 8px;
            background: white;
            min-height: 42px;
        }

        .tags-wrapper {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
        }

        .airport-tag {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 4px 8px;
            background: #e0e7ff;
            color: #4338ca;
            border-radius: 4px;
            font-size: 0.9em;
            font-weight: 500;
        }

        .airport-tag .tag-code {
            font-weight: 600;
        }

        .airport-tag .tag-city {
            color: #6366f1;
            font-size: 0.85em;
        }

        .airport-tag .tag-remove {
            cursor: pointer;
            margin-left: 4px;
            opacity: 0.7;
            font-size: 1.1em;
        }

        .airport-tag .tag-remove:hover {
            opacity: 1;
        }

        .tag-input-container input {
            border: none;
            outline: none;
            flex: 1;
            min-width: 150px;
            padding: 4px;
        }

        .tag-input-container.compact {
            padding: 6px;
            min-height: 38px;
        }

        .tag-input-container.compact input {
            min-width: 60px;
            font-size: 0.9em;
        }

        .tag-input-container.compact .airport-tag {
            padding: 2px 6px;
            font-size: 0.85em;
        }

        /* Must visit styles */
        .must-visit-container {
            display: flex;
            flex-direction: column;
            gap: 20px 10px;
        }

        .must-visit-groups {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .must-visit-group {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 10px;
            background: #f8fafc;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
        }

        .must-visit-group .group-label {
            font-size: 0.8em;
            color: #64748b;
            font-weight: 500;
            min-width: 40px;
        }

        .must-visit-group .group-airports {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 6px;
            flex: 1;
        }

        .must-visit-group .or-separator {
            color: #94a3b8;
            font-size: 0.85em;
            font-weight: 500;
        }

        .must-visit-group .airport-tag {
            background: #dbeafe;
            color: #1d4ed8;
        }

        .must-visit-group .airport-tag .tag-city {
            color: #3b82f6;
        }

        .must-visit-group .add-or-btn {
            padding: 4px 8px;
            background: #f1f5f9;
            border: 1px dashed #cbd5e1;
            border-radius: 4px;
            color: #64748b;
            cursor: pointer;
            font-size: 0.85em;
        }

        .must-visit-group .add-or-btn:hover {
            background: #e2e8f0;
            border-color: #94a3b8;
        }

        .must-visit-group .group-remove {
            cursor: pointer;
            color: #94a3b8;
            font-size: 1.2em;
            padding: 4px;
        }

        .must-visit-group .group-remove:hover {
            color: #ef4444;
        }

        .must-visit-group .days-input-wrapper {
            display: flex;
            align-items: center;
            gap: 4px;
            margin-left: 8px;
            padding-left: 8px;
            border-left: 1px solid #e2e8f0;
        }

        .must-visit-group .days-input-wrapper label {
            font-size: 0.8em;
            color: #64748b;
            white-space: nowrap;
        }

        .must-visit-group .days-input {
            width: 50px;
            padding: 4px 6px;
            border: 1px solid #cbd5e1;
            border-radius: 4px;
            font-size: 0.85em;
            text-align: center;
        }

        .must-visit-group .days-input:focus {
            border-color: #667eea;
            outline: none;
        }

        .btn-add-group {
            padding: 8px 16px;
            background: #f0fdf4;
            border: 1px dashed #86efac;
            border-radius: 6px;
            color: #16a34a;
            cursor: pointer;
            font-size: 0.9em;
            align-self: flex-start;
        }

        .btn-add-group:hover {
            background: #dcfce7;
            border-color: #4ade80;
        }

        /* Autocomplete within must-visit */
        .must-visit-autocomplete {
            position: relative;
        }

        .must-visit-autocomplete input {
            padding: 4px 8px;
            border: 1px solid #cbd5e1;
            border-radius: 4px;
            font-size: 0.9em;
            width: 140px;
        }

        .must-visit-autocomplete .autocomplete-results {
            min-width: 250px;
        }

        .no-results {
            text-align: center;
            padding: 40px;
            color: #666;
        }

        .loading {
            text-align: center;
            padding: 40px;
        }

        .loading-spinner {
            display: inline-block;
            width: 40px;
            height: 40px;
            border: 4px solid #e0e7ff;
            border-top-color: #667eea;
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

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

        @media (max-width: 768px) {
            body {
                padding: 10px;
            }

            header {
                flex-direction: column;
                align-items: stretch;
                margin-bottom: 20px;
            }

            header h1 {
                font-size: 1.8em;
            }

            .login-bar {
                gap: 20px 10px;
                width: 100%;
                justify-content: center;
            }

            .card {
                padding: 15px;
            }

            .search-grid {
                grid-template-columns: 1fr;
            }

            .button-group {
                flex-direction: column;
                gap: 20px 10px;
            }

            .btn-primary, .btn-secondary {
                flex: 1;
                width: 100%;
            }

            .trip-card {
                margin: 10px 0;
            }

            .flight-item {
                flex-direction: column;
                align-items: flex-start;
                gap: 8px;
            }

            .tag-input-container {
                min-height: 44px; /* Touch-friendly */
            }

            input[type="text"],
            input[type="password"],
            input[type="email"],
            input[type="number"],
            select,
            button {
                min-height: 44px; /* Touch-friendly minimum */
                font-size: 16px; /* Prevents zoom on iOS */
            }

            .autocomplete-results {
                max-height: 40vh; /* Don't take up whole screen */
            }

            .theme-toggle {
            /* Made solid instead of transparent */
                bottom: 10px;
                right: 10px;
                padding: 12px;
                font-size: 0.95em;
            }
        }

        /* Dark Mode Styles */
        body.dark-mode {
            background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
        }

        body.dark-mode .card {
            background: #0f3460;
            color: #e0e0e0;
        }

        body.dark-mode header {
            color: #e0e0e0;
        }

        body.dark-mode .form-group label {
            color: #e0e0e0;
        }

        body.dark-mode input[type="text"],
        body.dark-mode input[type="password"],
        body.dark-mode input[type="email"],
        body.dark-mode input[type="number"],
        body.dark-mode select {
            background: #16213e;
            color: #e0e0e0;
            border-color: #533483;
        }

        body.dark-mode .tag-input-container {
            background: #16213e;
            border-color: #533483;
        }

        body.dark-mode .airport-tag {
            background: linear-gradient(135deg, #533483 0%, #764ba2 100%);
            color: white;
        }

        body.dark-mode .trip-card {
            background: #16213e;
            border-color: #533483;
        }

        body.dark-mode .flight-item {
            background: #0f3460;
            border-color: #533483;
        }

        body.dark-mode .loading {
            background: #16213e;
        }

        body.dark-mode .no-results {
            background: #16213e;
            color: #e0e0e0;
        }

        /* Dark mode toggle button */
        .theme-toggle {
            /* Made solid instead of transparent */
            position: fixed;
            bottom: 20px;
            right: 20px;
            background: #6366f1;
            border: 1px solid rgba(255, 255, 255, 0.3);
            color: white;
            padding: 10px 15px;
            border-radius: 25px;
            cursor: pointer;
            font-size: 0.9em;
            font-weight: 500;
            transition: all 0.3s ease;
            
            z-index: 1000;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .theme-toggle:hover {
            background: #4f46e5;
            transform: scale(1.05);
        }

        body.dark-mode .theme-toggle {
            /* Made solid instead of transparent */
            background: rgba(0, 0, 0, 0.3);
            border-color: rgba(255, 255, 255, 0.2);
        }

        body.dark-mode .theme-toggle:hover {
            background: rgba(0, 0, 0, 0.4);
        }

        /* Development Mode Toggle (positioned above theme toggle) */
        .dev-mode-toggle {
            position: fixed;
            bottom: 75px;  /* Position above theme toggle */
            right: 20px;
            background: #6b7280;
            border: 1px solid rgba(255, 255, 255, 0.3);
            color: white;
            padding: 10px 15px;
            border-radius: 25px;
            cursor: pointer;
            font-size: 0.9em;
            font-weight: 500;
            transition: all 0.3s ease;
            
            z-index: 1000;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .dev-mode-toggle:hover {
            background: #4b5563;
            transform: scale(1.05);
        }

        .dev-mode-toggle.active {
            background: #8b5cf6;
            border-color: #a78bfa;
        }

        body.dark-mode .dev-mode-toggle {
            background: #4b5563;
            border-color: #6b7280;
        }

        body.dark-mode .dev-mode-toggle:hover {
            background: rgba(0, 0, 0, 0.4);
        }

        body.dark-mode .dev-mode-toggle.active {
            background: #8b5cf6;
            border-color: #a78bfa;
        }

        /* Hide score elements by default */
        .dev-mode-only {
            display: none !important;
        }

        /* Show score elements when dev mode is active */
        body.dev-mode .dev-mode-only {
            display: inline !important;
        }

        /* Loading Indicator */
        .loading {
            text-align: center;
            padding: 60px 20px;
            color: #64748b;
        }

        .loading-spinner {
            width: 60px;
            height: 60px;
            margin: 0 auto 20px;
            border: 4px solid #e2e8f0;
            border-top-color: #667eea;
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

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

        .loading-progress {
            margin-top: 20px;
            padding: 0 40px;
        }

        .progress-bar-container {
            width: 100%;
            height: 8px;
            background: #e2e8f0;
            border-radius: 4px;
            overflow: hidden;
            margin-bottom: 12px;
        }

        .progress-bar {
            height: 100%;
            background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
            transition: width 0.3s ease;
            border-radius: 4px;
        }

        .loading-stats {
            display: flex;
            justify-content: space-between;
            font-size: 0.8em;
            color: #94a3b8;
            margin-bottom: 15px;
        }

        .loading-actions {
            margin-top: 20px;
        }

        .btn-cancel-search {
            padding: 8px 20px;
            background: #ef4444;
            color: white;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-size: 0.9em;
            font-weight: 500;
            transition: all 0.2s ease;
        }

        .btn-cancel-search:hover {
            background: #dc2626;
            transform: translateY(-1px);
        }

        body.dark-mode .loading {
            color: #94a3b8;
        }

        body.dark-mode .loading-spinner {
            border-color: #374151;
            border-top-color: #8b5cf6;
        }

        body.dark-mode .progress-bar-container {
            background: #374151;
        }

        /* Trip Visualizations Styles */
        .trip-visualizations {
            padding: 15px;
        }

        .visualizations-tabs {
            display: flex;
            gap: 8px;
            margin-bottom: 15px;
            border-bottom: 2px solid #e2e8f0;
        }

        .viz-tab {
            padding: 10px 20px;
            background: transparent;
            border: none;
            border-bottom: 3px solid transparent;
            cursor: pointer;
            font-size: 0.9em;
            font-weight: 500;
            color: #64748b;
            transition: all 0.2s ease;
        }

        .viz-tab:hover {
            color: #667eea;
            background: #f8fafc;
        }

        .viz-tab.active {
            color: #667eea;
            border-bottom-color: #667eea;
            background: white;
        }

        .visualizations-content {
            background: white;
            border-radius: 8px;
            padding: 20px;
            min-height: 400px;
        }

        .viz-panel {
            display: none;
        }

        .viz-panel.active {
            display: block;
        }

        /* Map View Styles */
        .trip-map {
            width: 100%;
            height: 450px;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        }

        .trip-map .leaflet-popup-content {
            margin: 8px 12px;
            line-height: 1.5;
        }

        /* Timeline View Styles */
        .timeline-container {
            padding: 20px 0;
        }

        .timeline-item {
            display: flex;
            gap: 15px;
            margin-bottom: 20px;
            position: relative;
        }

        .timeline-item:not(:last-child)::after {
            content: '';
            position: absolute;
            left: 18px;
            top: 40px;
            width: 2px;
            height: calc(100% + 20px);
            background: linear-gradient(to bottom, #cbd5e1, #e2e8f0);
        }

        .timeline-marker {
            flex-shrink: 0;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2em;
            background: white;
            border: 3px solid #e2e8f0;
            z-index: 1;
        }

        .timeline-flight .timeline-marker {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-color: #667eea;
        }

        .timeline-stay .timeline-marker {
            background: linear-gradient(135deg, #10b981 0%, #059669 100%);
            border-color: #10b981;
        }

        .timeline-layover .timeline-marker {
            background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
            border-color: #f59e0b;
        }

        .timeline-content {
            flex: 1;
            background: #f8fafc;
            padding: 12px 16px;
            border-radius: 8px;
            border-left: 3px solid #e2e8f0;
        }

        .timeline-flight .timeline-content {
            border-left-color: #667eea;
        }

        .timeline-stay .timeline-content {
            border-left-color: #10b981;
        }

        .timeline-layover .timeline-content {
            border-left-color: #f59e0b;
        }

        .timeline-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 6px;
            color: #1e293b;
        }

        .timeline-details {
            font-size: 0.85em;
            color: #64748b;
            margin-bottom: 4px;
        }

        .timeline-duration {
            font-size: 0.8em;
            color: #94a3b8;
            font-weight: 500;
        }

        .timeline-price {
            font-size: 0.9em;
            font-weight: 600;
            color: #667eea;
        }

        .timeline-summary {
            margin-top: 30px;
            padding: 15px;
            background: linear-gradient(135deg, #f0f9ff 0%, #e0e7ff 100%);
            border-radius: 8px;
            display: flex;
            flex-wrap: wrap;
            gap: 20px;
        }

        .summary-item {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .summary-label {
            font-size: 0.75em;
            color: #64748b;
            font-weight: 500;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .summary-value {
            font-size: 1em;
            color: #1e293b;
            font-weight: 600;
        }

        /* Price Breakdown Styles */
        .price-breakdown-container {
            padding: 10px 0;
        }

        .price-summary {
            margin-bottom: 30px;
        }

        .price-total {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 12px;
            margin-bottom: 15px;
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
        }

        .price-total .price-label {
            font-size: 1em;
            color: white;
            font-weight: 500;
        }

        .price-total .price-value {
            font-size: 2em;
            color: white;
            font-weight: 700;
        }

        .price-stats {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
            padding: 15px;
            background: #f8fafc;
            border-radius: 8px;
        }

        .stat-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .stat-label {
            font-size: 0.85em;
            color: #64748b;
        }

        .stat-value {
            font-size: 1em;
            font-weight: 600;
            color: #1e293b;
        }

        .price-chart {
            padding: 20px 0;
        }

        .price-chart h4 {
            font-size: 1em;
            color: #1e293b;
            margin-bottom: 20px;
            font-weight: 600;
        }

        .price-bar-item {
            margin-bottom: 15px;
        }

        .price-bar-label {
            display: flex;
            gap: 20px 10px;
            align-items: center;
            margin-bottom: 6px;
            font-size: 0.85em;
        }

        .flight-number {
            color: #64748b;
            font-weight: 600;
            min-width: 30px;
        }

        .flight-route {
            color: #1e293b;
            font-weight: 500;
        }

        .price-bar-wrapper {
            display: flex;
            align-items: center;
            gap: 20px 10px;
        }

        .price-bar {
            height: 32px;
            background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
            border-radius: 6px;
            transition: all 0.3s ease;
            box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
            min-width: 20px;
        }

        .price-bar.expensive {
            background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
            box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
        }

        .price-bar.cheap {
            background: linear-gradient(90deg, #10b981 0%, #059669 100%);
            box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
        }

        .price-bar:hover {
            transform: scaleY(1.1);
            box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
        }

        .price-bar-value {
            font-size: 0.85em;
            font-weight: 600;
            color: #475569;
            min-width: 60px;
        }

        /* Dark Mode Support for Visualizations */
        body.dark-mode .trip-visualizations {
            background: #1e293b;
        }

        body.dark-mode .visualizations-tabs {
            border-bottom-color: #374151;
        }

        body.dark-mode .viz-tab {
            color: #94a3b8;
        }

        body.dark-mode .viz-tab:hover {
            color: #8b5cf6;
            background: #334155;
        }

        body.dark-mode .viz-tab.active {
            color: #8b5cf6;
            border-bottom-color: #8b5cf6;
            background: #0f172a;
        }

        body.dark-mode .visualizations-content {
            background: #0f172a;
        }

        body.dark-mode .timeline-content {
            background: #1e293b;
            color: #e2e8f0;
        }

        body.dark-mode .timeline-header {
            color: #f1f5f9;
        }

        body.dark-mode .timeline-details {
            color: #94a3b8;
        }

        body.dark-mode .price-stats {
            background: #1e293b;
        }

        body.dark-mode .stat-label {
            color: #94a3b8;
        }

        body.dark-mode .stat-value {
            color: #f1f5f9;
        }

        body.dark-mode .price-chart h4 {
            color: #f1f5f9;
        }

        body.dark-mode .flight-route {
            color: #e2e8f0;
        }

        body.dark-mode .price-bar-value {
            color: #cbd5e1;
        }
