:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --dark-gradient: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 100%);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --text-tertiary: rgba(255, 255, 255, 0.6);
    --surface-1: rgba(255, 255, 255, 0.05);
    --surface-2: rgba(255, 255, 255, 0.1);
    --success: #00ff87;
    --warning: #ffb347;
    --error: #ff6b6b;
    --shadow-1: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-2: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-3: 0 12px 48px rgba(0, 0, 0, 0.5);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--dark-gradient);
    min-height: 100vh;
    color: var(--text-primary);
    overflow-x: hidden;
}

/* Enhanced Background Animation */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    background: var(--accent-gradient);
    opacity: 0.1;
    animation: float 8s ease-in-out infinite;
}

.floating-shape:nth-child(1) {
    width: 60px;
    height: 60px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-shape:nth-child(2) {
    width: 40px;
    height: 40px;
    top: 60%;
    right: 15%;
    animation-delay: -2s;
}

.floating-shape:nth-child(3) {
    width: 80px;
    height: 80px;
    bottom: 30%;
    left: 20%;
    animation-delay: -4s;
}

.floating-shape:nth-child(4) {
    width: 50px;
    height: 50px;
    top: 40%;
    right: 30%;
    animation-delay: -6s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) translateX(0px); }
    25% { transform: translateY(-20px) translateX(10px); }
    50% { transform: translateY(-10px) translateX(-10px); }
    75% { transform: translateY(-15px) translateX(5px); }
}

/* Premium Header */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    backdrop-filter: blur(20px);
    background: rgba(12, 12, 12, 0.8);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.header.scrolled {
    background: rgba(12, 12, 12, 0.95);
    box-shadow: var(--shadow-1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    animation: pulse 2s ease-in-out infinite;
}

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

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-gradient);
    border-radius: 1px;
}

.cta-btn-nav {
    background: var(--primary-gradient);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-1);
    border: none;
    cursor: pointer;
}

.cta-btn-nav:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-2);
}

/* Main Container with Proper Spacing */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8rem 2rem 4rem;
    position: relative;
}

/* Enhanced Header Section */
.app-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.app-header h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #667eea 50%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.app-header p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

/* Enhanced Glass Cards */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: var(--shadow-1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.glass-card::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.5s;
}

.glass-card:hover::before {
    left: 100%;
}

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-2);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Enhanced Step Indicator */
.step-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.step-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--surface-1);
    transition: all 0.3s ease;
    position: relative;
}

.step-dot.active {
    background: var(--accent-gradient);
    box-shadow: 0 0 20px rgba(79, 172, 254, 0.5);
    transform: scale(1.3);
}

.step-dot.completed {
    background: var(--success);
    box-shadow: 0 0 15px rgba(0, 255, 135, 0.3);
}

.step-dot::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 2px;
    background: var(--surface-1);
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
}

.step-dot:last-child::after {
    display: none;
}

.step-dot.active::after,
.step-dot.completed::after {
    background: var(--accent-gradient);
}

/* Step Content Animation */
.step-content {
    display: none;
    animation: fadeInUp 0.6s ease-out;
}

.step-content.active {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced Step Headers */
.step-header {
    text-align: center;
    margin-bottom: 2rem;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: var(--primary-gradient);
    border-radius: 20px;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-2);
    animation: pulse 2s ease-in-out infinite;
}

.step-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.step-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Enhanced Upload Area */
.upload-area {
    border: 2px dashed var(--glass-border);
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    background: var(--surface-1);
    margin-bottom: 2rem;
}

.upload-area:hover {
    border-color: var(--accent-gradient);
    background: var(--surface-2);
    transform: translateY(-4px);
    box-shadow: var(--shadow-2);
}

.upload-area.dragover {
    border-color: var(--success);
    background: rgba(0, 255, 135, 0.1);
    transform: scale(1.02);
    box-shadow: var(--shadow-3);
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.upload-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.upload-subtext {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.upload-btn {
    background: var(--accent-gradient);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-sm);
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-2);
}

.upload-btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

/* Enhanced Photo Confirmation */
.photo-confirmation {
    text-align: center;
    animation: fadeInUp 0.5s ease-out;
}

.confirmation-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.preview-image {
    transition: all 0.3s ease;
    max-width: 300px;
    max-height: 300px;
    border-radius: 20px;
    box-shadow: var(--shadow-2);
    margin-bottom: 2rem;
}

.preview-image:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-3);
}

/* Enhanced AI Analysis */
.ai-analysis-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
}

.analysis-visual {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto;
}

.analysis-photo {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-2);
}

.analysis-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.analysis-scanner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent-gradient);
    box-shadow: 0 0 20px rgba(79, 172, 254, 0.8);
    animation: scanDown 3s ease-in-out infinite;
}

@keyframes scanDown {
    0%, 100% { top: 0; }
    50% { top: calc(100% - 4px); }
}

.analysis-point {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--success);
    animation: pulse 1.5s ease-in-out infinite;
}

.analysis-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 320px;
}

.analysis-step {
    color: var(--text-tertiary);
    font-size: 1rem;
    opacity: 0.5;
    transition: all 0.3s ease;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    background: var(--surface-1);
}

.analysis-step.active {
    color: var(--accent-gradient);
    opacity: 1;
    background: var(--surface-2);
    transform: translateX(12px);
    box-shadow: var(--shadow-1);
}

.analysis-step.completed {
    color: var(--success);
    opacity: 1;
}

/* Enhanced Location Input */
.location-input-container {
    position: relative;
    margin-bottom: 2rem;
}

.location-input {
    width: 100%;
    padding: 1.25rem 1.75rem;
    border: 2px solid var(--glass-border);
    border-radius: 16px;
    font-size: 1.1rem;
    background: var(--surface-1);
    color: var(--text-primary);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.location-input:focus {
    outline: none;
    border-color: var(--accent-gradient);
    background: var(--surface-2);
    box-shadow: 0 0 0 4px rgba(79, 172, 254, 0.1);
    transform: translateY(-2px);
}

.location-input::placeholder {
    color: var(--text-tertiary);
}

/* Enhanced Location Cards */
.locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.location-card {
    background: var(--surface-1);
    border: 2px solid transparent;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    height: 180px;
}

.location-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.location-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 1.5rem;
    color: white;
    text-align: center;
}

.location-card:hover .location-image {
    transform: scale(1.1);
}

.location-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2);
}

.location-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--primary-gradient);
    border-radius: 20px;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.location-card.selected::before,
.location-card:hover::before {
    opacity: 1;
}

.location-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.location-country {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Enhanced Sticky Generate Button */
.sticky-generate-btn {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(12, 12, 12, 0.98), rgba(12, 12, 12, 0.9), rgba(12, 12, 12, 0.3));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 1.5rem 2rem 2rem;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-top: 1px solid var(--glass-border);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.4);
    text-align: center;
}

.sticky-generate-btn.show {
    transform: translateY(0);
}

.btn-sticky {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    display: inline-block;
    padding: 1.25rem 2rem;
    font-size: 1.1rem;
    box-shadow: var(--shadow-2);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    background: var(--primary-gradient);
    color: var(--text-primary);
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    vertical-align: top;
}

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

.btn-sticky:hover::before {
    left: 100%;
}

.btn-sticky:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-3);
}

/* Generate Preview */
.generate-preview {
    background: var(--surface-1);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: nowrap;
}

.preview-item {
    text-align: center;
    position: relative;
}

.preview-item img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: var(--shadow-1);
    margin-bottom: 1rem;
}

.preview-item-placeholder {
    width: 140px;
    height: 140px;
    background: var(--primary-gradient);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-1);
}

.plus-icon {
    font-size: 3rem;
    color: var(--text-secondary);
    animation: pulse 2s ease-in-out infinite;
}

.preview-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

/* AI Merge Animation */
.merge-animation-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
}

.merge-images {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: nowrap;
    justify-content: center;
}

.merge-photo {
    text-align: center;
    position: relative;
}

.merge-photo img,
.destination-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: var(--shadow-1);
}

.destination-placeholder {
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.photo-label {
    margin-top: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.merge-connector {
    display: flex;
    align-items: center;
    position: relative;
    width: 100px;
}

.merge-line {
    width: 100%;
    height: 3px;
    background: var(--accent-gradient);
    position: relative;
    overflow: hidden;
}

.merge-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    animation: flowRight 2s ease-in-out infinite;
}

@keyframes flowRight {
    0% { left: -100%; }
    100% { left: 100%; }
}

.merge-particles {
    position: absolute;
    width: 100%;
    height: 16px;
    top: -8px;
}

.merge-particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--accent-gradient);
    border-radius: 50%;
    animation: particleFlow 3s ease-in-out infinite;
}

.merge-particle:nth-child(1) { animation-delay: 0s; }
.merge-particle:nth-child(2) { animation-delay: 1s; }
.merge-particle:nth-child(3) { animation-delay: 2s; }

@keyframes particleFlow {
    0% { left: 0; opacity: 0; }
    50% { opacity: 1; }
    100% { left: 100%; opacity: 0; }
}

.merge-result {
    text-align: center;
}

.result-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 20px;
    background: var(--surface-1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-1);
    border: 2px dashed var(--glass-border);
}

.generating-icon {
    font-size: 2rem;
    animation: pulse 1.5s ease-in-out infinite;
}

.generating-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.merge-progress {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 350px;
}

.merge-step {
    color: var(--text-tertiary);
    font-size: 1rem;
    opacity: 0.5;
    transition: all 0.3s ease;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    background: var(--surface-1);
}

.merge-step.active {
    color: var(--accent-gradient);
    opacity: 1;
    background: var(--surface-2);
    transform: translateX(12px);
    box-shadow: var(--shadow-1);
}

.merge-step.completed {
    color: var(--success);
    opacity: 1;
}

/* Enhanced Buttons */
.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 180px;
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--text-primary);
    box-shadow: var(--shadow-1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-2);
}

.btn-secondary {
    background: var(--surface-1);
    color: var(--text-primary);
    border: 2px solid var(--glass-border);
}

.btn-secondary:hover {
    background: var(--surface-2);
    border-color: var(--text-secondary);
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn::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;
}

.btn:hover::before {
    left: 100%;
}

/* Enhanced Messages */
.message {
    padding: 1.25rem 2rem;
    border-radius: 16px;
    margin: 1.5rem 0;
    display: none;
    font-weight: 500;
    backdrop-filter: blur(10px);
    border: 1px solid;
    animation: slideIn 0.4s ease-out;
    box-shadow: var(--shadow-1);
}

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

.error-message {
    background: rgba(255, 107, 107, 0.15);
    border-color: var(--error);
    color: var(--error);
}

.success-message {
    background: rgba(0, 255, 135, 0.15);
    border-color: var(--success);
    color: var(--success);
}

/* Enhanced Results */
.results-section {
    display: none;
    text-align: center;
    margin-top: 3rem;
}

.results-header {
    margin-bottom: 2rem;
}

.results-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.result-image {
    width: 100%;
    max-width: 600px;
    border-radius: 24px;
    box-shadow: var(--shadow-3);
    margin: 0 auto 2rem;
    transition: all 0.3s ease;
}

.result-image:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6);
}

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* Enhanced Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.feature-card {
    background: var(--surface-1);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--glass-border);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2);
    border-color: var(--glass-border);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.feature-desc {
    color: var(--text-secondary);
    line-height: 1.6;
}

.merge-photo.destination-photo {
  display: flex;
  flex-direction: column;   /* stack children vertically */
  align-items: center;      /* center horizontally */
  text-align: center;       /* ensure wrapping looks neat */
  max-width: 120px;
}

.preview-item {
  display: flex;
  flex-direction: column;   /* stack children vertically */
  align-items: center;      /* center horizontally */
  text-align: center;       /* ensure wrapping looks neat */
  max-width: 120px;
}

.preview-item .preview-label {
  white-space: nowrap;        /* prevent wrapping */
  overflow: hidden;           /* hide overflow */
  text-overflow: ellipsis;    /* add ... */
  text-align: center;
  width: 100%;
  cursor: pointer;            /* indicate hoverable */
  display: block;             /* ensure ellipsis works */
  position: relative;         /* for tooltip positioning */
}

/* Tooltip-like hover effect */
.preview-item .preview-label:hover {
  overflow: visible;
  white-space: normal;        /* allow wrapping when hovered */
  background: rgba(0,0,0,0.8); /* optional: dark background */
  color: #fff;                 /* optional: better contrast */
  padding: 0.25rem 0.5rem;     /* optional: spacing */
  border-radius: 4px;
  position: absolute;          /* float above */
  z-index: 10;
}

.merge-photo.destination-photo .photo-label {
  white-space: nowrap;        /* prevent wrapping */
  overflow: hidden;           /* hide overflow */
  text-overflow: ellipsis;    /* add ... */
  text-align: center;
  width: 100%;
  cursor: pointer;            /* indicate hoverable */
  display: block;             /* ensure ellipsis works */
  position: relative;         /* for tooltip positioning */
}

/* Tooltip-like hover effect */
.merge-photo.destination-photo .photo-label:hover {
  overflow: visible;
  white-space: normal;        /* allow wrapping when hovered */
  background: rgba(0,0,0,0.8); /* optional: dark background */
  color: #fff;                 /* optional: better contrast */
  padding: 0.25rem 0.5rem;     /* optional: spacing */
  border-radius: 4px;
  position: absolute;          /* float above */
  z-index: 10;
}

/* Hide hamburger on desktop */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--text-primary);
  cursor: pointer;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 6rem 1rem 2rem;
    }
    
      .nav-toggle {
        display: block; /* show hamburger */
      }

      .nav-links {
        display: none; /* hide by default */
        position: absolute;
        top: 100%;         /* just below header */
        right: 0;
        background: rgba(12, 12, 12, 0.95);
        border-radius: 0 0 12px 12px;
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 2rem;
        box-shadow: var(--shadow-1);
      }

      .nav-links.open {
        display: flex; /* show when toggled */
      }
    
    .app-header h1 {
        font-size: clamp(2rem, 6vw, 3rem);
    }
    
    .glass-card {
        padding: 1.5rem;
    }
    
    .analysis-visual {
        width: 250px;
        height: 250px;
    }
    
    .merge-photo img,
    .destination-placeholder {
        width: 70px;
        height: 70px;
    }
    
    .preview-item img,
    .preview-item-placeholder {
        width: 70px;
        height: 70px;
    }
    
    .sticky-generate-btn {
        padding: 1rem 1rem 1.5rem;
    }
    
    .btn-sticky {
        padding: 1rem 1.5rem;
        font-size: 1rem;
        max-width: 320px;
    }
    
    .locations-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
    
    .location-card {
        height: 160px;
    }
    
    .confirmation-buttons {
        gap: 0.5rem;
    }
    
    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
        min-width: 160px;
    }

    .merge-progress {
        min-width: 280px;
    }

    .merge-connector {
        width: 40px;
    }

    .merge-images {
        flex-wrap: nowrap;
        gap: 1rem;
    }

    .generate-preview {
        flex-wrap: nowrap;
        gap: 1rem;
    }

    .merge-photo,
    .merge-connector {
        flex-shrink: 1;   /* allow shrinking when container is tight */
        min-width: 0;     /* important: lets flexbox shrink properly */
    }

    .preview-item,
    .plus-icon {
        flex-shrink: 1;   /* allow shrinking when container is tight */
        min-width: 0;     /* important: lets flexbox shrink properly */
    }
}

/* Hide 'Take Photo' button on desktop */
@media (min-width: 768px) {
  #takePhotoBtn {
    display: none;
  }
}