/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* Force body to expand */
    overflow-x: hidden;
    position: relative;
}

/* Top Navigation */
.top-nav {
    background: oklch(39.3% 0.095 152.535);
    padding: 0.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-weight: 600;
    font-size: 1.6rem;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.nav-logo:hover {
    opacity: 0.8;
}

.nav-logo-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 6px; /* Rounded corners */
    /* Removed filter to show original colors */
}

.nav-logo i {
    font-size: 1.5rem;
    color: #4ade80;
}

.nav-buttons {
    display: flex;
    gap: 10px;
}

.nav-btn {
    background: transparent;
    color: white;
    border: none;
    padding: 6px 12px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.nav-btn:hover {
    text-decoration: underline;
}

.nav-btn.active {
    text-decoration: underline;
}

.nav-btn i {
    font-size: 0.8rem;
}

/* Main Content - Dynamic height adjustment */
.main-content {
    flex: 1;
    min-height: 100vh;
    padding-bottom: 6rem; /* Reduced padding for more flexible spacing */
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    /* Ensure content can expand */
    overflow: visible;
}

/* Home Section - Dynamic height */
.home-section {
    flex: 1;
    padding: 0; /* Remove top padding to eliminate white space */
    padding-bottom: 4rem; /* Reduced bottom padding for more flexible spacing */
    margin-bottom: 2rem;
    min-height: auto;
    height: auto;
    display: flex;
    flex-direction: column;
}

.scroll-down-prompt {
    text-align: center;
    margin: 0 auto 20px auto;
    padding: 12px 20px;
    background: oklch(44.8% 0.119 151.328);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    max-width: 400px;
    transition: all 0.3s ease;
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
}

.scroll-down-prompt h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    margin: 0;
}

/* PlantNet Attribution Tile */
.plantnet-attribution-tile {
    max-width: 600px;
    margin: 10px auto 40px auto; /* Much smaller margin to position just under hero image */
    padding: 0px 5px; /* Minimal padding to reduce card height */
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    text-align: center;
    line-height: 1;
}

.attribution-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.attribution-text {
    font-size: 1.1rem;
    color: #6b7280;
    font-weight: 500;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.2; /* Proper line height to prevent text overlap */
    padding: 0;
    flex-wrap: wrap; /* Allow text to wrap properly */
    justify-content: center; /* Center the wrapped text */
}

.plantnet-icon {
    height: 60px;
    width: 110px;
    object-fit: contain;
    vertical-align: middle;
}

.scroll-arrow {
    font-size: 1.2rem;
    color: white;
    animation: bounce 2s infinite;
    margin-left: 5px;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.homepage-upload-header {
    max-width: 700px;
    margin: 24px auto;
    padding: 20px 24px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
}

.homepage-upload-header h2 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.homepage-upload-header p {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
}

.homepage-upload-tile,
.homepage-preview-tile,
.homepage-analyzing-tile {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px 25px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    position: relative; /* Change to relative positioning */
    z-index: 1000; /* High z-index to appear above other content */
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Align content to top */
    max-height: 80vh; /* Limit height to 80% of viewport */
    overflow-y: auto; /* Add scroll if content is too tall */
    transition: all 0.3s ease; /* Smooth transitions */
}

.hero-container {
    position: relative;
    width: 100%;
    height: calc(100vh - 120px); /* Almost full viewport height minus nav and small space */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    margin-bottom: 0; /* Remove white space underneath */
    overflow: hidden; /* Ensure the scroll prompt stays within the hero container */
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%; /* Extend upwards by positioning higher */
    animation: heroScroll 20s ease-in-out infinite;
    opacity: 0.8;
}

@keyframes heroScroll {
    0%, 100% { transform: scale(1.1) translateY(0); }
    50% { transform: scale(1.1) translateY(-20px); }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    color: white;
    text-align: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 4px 8px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 40px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-btn {
    padding: 15px 30px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: white;
}

.hero-btn.primary {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    box-shadow: 0 4px 15px rgba(74, 222, 128, 0.3);
}

.hero-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 222, 128, 0.4);
}

.hero-btn.secondary {
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.5);
    backdrop-filter: blur(10px);
}

.hero-btn.secondary:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

/* Upload Section */
.upload-section {
    width: 100%;
    max-width: 700px;
    margin: 40px auto;
    padding: 0 20px;
}

.upload-container {
    background: white;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #f3f4f6;
    overflow: hidden;
}

.upload-header {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 25px 30px 20px 30px;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
}

.upload-header h2 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.upload-header p {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
}

.upload-area {
    text-align: center;
    padding: 30px 25px;
    border: 2px dashed #d1d5db;
    margin: 20px 25px;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #fafafa;
}

.upload-area:hover {
    border-color: #4ade80;
    background-color: #f0fdf4;
}

.upload-icon {
    font-size: 2rem;
    color: #9ca3af;
    margin-bottom: 15px;
}

.upload-area h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.upload-area p {
    color: #6b7280;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.upload-btn {
    background: oklch(52% 0.105 223.128);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.upload-btn:hover {
    background: #22c55e;
    transform: translateY(-1px);
}

.upload-btn i {
    font-size: 0.9rem;
}

.upload-hint {
    font-size: 0.85rem;
    color: #9ca3af;
    margin-top: 15px;
}

.upload-or {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 15px 0 10px 0;
    text-align: center;
}

.take-photo-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: block;
    align-items: center;
    gap: 8px;
    margin: 10px auto 0 auto;
    justify-content: center;
    text-align: center;
    width: fit-content;
}

.take-photo-btn:hover {
    background: #059669;
    transform: translateY(-1px);
}

.take-photo-btn i {
    font-size: 0.9rem;
}

.take-photo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 10px;
}

/* Camera Preview Tile */
.homepage-camera-tile {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin: 20px auto;
    max-width: 600px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.camera-container {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 550px;
    max-height: 650px;
    padding-bottom: 20px;
}

.camera-header {
    text-align: center;
    margin-bottom: 20px;
    padding: 20px 20px 0 20px;
}

.camera-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.camera-header p {
    color: #6b7280;
    font-size: 0.95rem;
}

.camera-preview-container {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 0 20px;
    flex: 1;
    min-height: 300px;
}

.camera-preview-container video {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
    background: #000;
}

.camera-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

.capture-photo-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.capture-photo-btn:hover {
    background: #059669;
    transform: translateY(-1px);
}

.capture-photo-btn i {
    font-size: 0.9rem;
}

.cancel-camera-btn {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: 14px 28px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

.cancel-camera-btn i {
    font-size: 0.9rem;
}

/* Image Preview */
.image-preview {
    padding: 25px;
}

/* Homepage specific image preview */
#homepageImagePreview {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 450px;
    max-height: 500px;
}

.preview-header {
    text-align: center;
    margin-bottom: 20px;
}

.preview-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 6px;
}

.preview-header p {
    color: #6b7280;
    font-size: 0.9rem;
}

.preview-image-container {
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.preview-image-container img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
    object-fit: contain;
}

.preview-actions {
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
    padding: 15px 20px;
    width: 100%;
}

.identify-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.identify-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.identify-btn i {
    font-size: 0.9rem;
}

.change-image-btn {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: 14px 28px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.change-image-btn:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
}

.change-image-btn i {
    font-size: 0.9rem;
}

/* Loading Section */
.loading-section {
    width: 100%;
    max-width: 600px;
    margin: 40px auto;
    padding: 0 20px;
    text-align: center;
}

.loading-container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
}

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

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-container h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 10px;
}

.loading-container p {
    color: #6b7280;
}

/* Results Section */
.results-section {
    width: 100%;
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.results-container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f3f4f6;
}

.results-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #374151;
}

.results-buttons {
    display: flex;
    gap: 12px;
}

.new-search-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.new-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.new-search-btn i {
    font-size: 0.8rem;
}

.go-home-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.go-home-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.go-home-btn i {
    font-size: 0.8rem;
}

.cancel-btn {
    background: oklch(44.8% 0.119 151.328);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.cancel-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(68, 119, 151, 0.3);
}

.cancel-btn i {
    font-size: 0.8rem;
}

.results-content {
    line-height: 1.8;
    color: #374151;
}

.results-content h3 {
    color: #1f2937;
    margin-bottom: 10px;
    font-weight: 600;
}

.results-content p {
    margin-bottom: 15px;
}

.results-content strong {
    color: #1f2937;
    font-weight: 600;
}

/* About Section */
.about-section {
    width: 100%;
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.about-container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
}

.about-container h2 {
    font-size: 2rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 30px;
    text-align: center;
}

.about-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1f2937;
    margin: 25px 0 10px 0;
}

.about-content p {
    color: #374151;
    line-height: 1.7;
    margin-bottom: 15px;
}

/* Contact Section */
.contact-section {
    width: 100%;
    max-width: 600px;
    margin: 40px auto;
    padding: 0 20px;
}

.contact-container {
    background: white;
    border-radius: 15px;
    padding: 50px 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid #f3f4f6;
}

.contact-container h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 40px;
    text-align: center;
}

.contact-content h3 {
    font-size: 1.4rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 25px;
    text-align: center;
}

.contact-content p {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 25px;
    text-align: center;
    font-size: 1rem;
}

.contact-content a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.contact-content a:hover {
    text-decoration: underline;
}

.email-button-container {
    text-align: center;
    margin: 40px 0;
}

.email-btn {
    background: oklch(44.8% 0.119 151.328);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.email-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.email-note {
    font-size: 0.85rem;
    color: #9ca3af;
    font-style: normal;
    margin-top: 15px;
}

/* Error Section */
.error-section {
    width: 100%;
    max-width: 600px;
    margin: 40px auto;
    padding: 0 20px;
    text-align: center;
}

.error-container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
}

.error-icon {
    font-size: 3rem;
    color: #ef4444;
    margin-bottom: 20px;
}

.error-container h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 10px;
}

.error-container p {
    color: #6b7280;
    margin-bottom: 25px;
}

.try-again-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.try-again-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

/* Footer */
.footer {
    background: oklch(39.3% 0.095 152.535);
    color: white;
    padding: 20px 0;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0;
    position: relative;
}

/* Removed separator lines */

.footer-section {
    flex: 1;
    text-align: center;
    padding: 0 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 50px;
}

.footer-section h3 {
    margin: 0 0 8px 0;
    font-size: 1.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    letter-spacing: 0.5px;
}

.footer-section h3:hover {
    opacity: 0.8;
    transform: translateY(-1px);
}

.footer-section h4 {
    margin: 0 0 12px 0;
    font-size: 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    text-align: center;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
}

.footer-links li {
    margin-bottom: 0;
}

.footer-link {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    transition: all 0.3s ease;
    padding: 2px 0;
    display: block;
}

.footer-link:hover {
    color: white;
    transform: translateX(2px);
}

.footer-section p {
    margin: 0;
    font-size: 0.8rem;
    opacity: 0.7;
    text-align: center;
    font-weight: 400;
    letter-spacing: 0.3px;
}

/* Mobile Detection */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 15px;
    }
    
    .nav-buttons {
        gap: 5px;
    }
    
    .hero-container {
        height: calc(100vh - 120px);
    }
    
    .hero-content {
        padding: 0 15px;
        text-align: center;
        width: 100%;
        max-width: 100%;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-content p {
        font-size: 1.1rem;
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .upload-container {
        margin: 20px;
    }
    
    .results-container {
        margin: 20px;
    }
    
    .results-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .footer-section {
        width: 100%;
    }
    
    .footer-links {
        justify-content: center;
    }
    
    .footer {
        padding: 8px 0;
    }
    
    .footer-section h3 {
        font-size: 1.2rem;
        margin-bottom: 3px;
    }
    
    .footer-section h4 {
        font-size: 1.1rem;
        margin-bottom: 4px;
    }
    
    .footer-section p {
        font-size: 0.7rem;
    }

    /* PlantNet Attribution Tile - Mobile */
    .plantnet-attribution-tile {
        max-width: 90%;
        margin: 10px auto 20px auto;
        padding: 0px 8px;
    }

    .attribution-text {
        font-size: 0.8rem;
        gap: 6px;
        line-height: 1.2; /* Proper line height for mobile */
        flex-wrap: wrap;
        justify-content: center;
    }

    .plantnet-icon {
        height: 40px;
        width: 40px;
    }

    /* Scroll Down Prompt - Mobile */
    .scroll-down-prompt {
        max-width: 90%;
        padding: 8px 12px;
        bottom: 10px; /* Moved lower to avoid overlapping with hero text */
    }

    .scroll-down-prompt h3 {
        font-size: 0.9rem;
    }

    /* Upload Header - Mobile */
    .homepage-upload-header {
        max-width: 92%;
        margin: 16px auto;
        padding: 14px 16px;
    }

    .homepage-upload-header h2 {
        font-size: 1.1rem;
    }

    .homepage-upload-header p {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .nav-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .nav-btn {
        font-size: 0.8rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-content p {
        font-size: 1rem;
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }
    
    .upload-area {
        padding: 30px 15px;
    }
    
    .upload-area h3 {
        font-size: 1.2rem;
    }
    
    .hero-container {
        height: calc(100vh - 140px);
    }
    
    .take-photo-btn {
        width: 100%;
        justify-content: center;
        margin-top: 15px;
        display: flex;
    }
    
    .take-photo-container {
        margin-top: 15px;
    }
    
    .camera-container {
        min-height: 500px;
        max-height: 600px;
    }
    
    .camera-preview-container {
        min-height: 250px;
    }
    
    .camera-actions {
        padding: 15px;
    }
    
    .footer {
        padding: 5px 0;
    }
    
    .footer-content {
        gap: 8px;
    }
    
    .footer-section h3 {
        font-size: 1.1rem;
        margin-bottom: 2px;
    }
    
    .footer-section h4 {
        font-size: 1rem;
        margin-bottom: 3px;
    }
    
    .footer-section p {
        font-size: 0.65rem;
    }
    
    .footer-links {
        gap: 3px 5px;
    }

    /* PlantNet Attribution Tile - Small Mobile */
    .plantnet-attribution-tile {
        max-width: 95%;
        margin: 8px auto 15px auto;
        padding: 0px 5px;
    }

    .attribution-text {
        font-size: 0.7rem;
        gap: 4px;
        line-height: 1.2; /* Proper line height for small mobile */
        flex-wrap: wrap;
        justify-content: center;
    }

    .plantnet-icon {
        height: 35px;
        width: 35px;
    }

    /* Scroll Down Prompt - Small Mobile */
    .scroll-down-prompt {
        max-width: 95%;
        padding: 6px 10px;
        bottom: 5px; /* Moved even lower on small mobile to avoid overlapping */
    }

    .scroll-down-prompt h3 {
        font-size: 0.8rem;
    }

    /* Upload Header - Small Mobile */
    .homepage-upload-header {
        max-width: 94%;
        margin: 12px auto;
        padding: 12px;
    }

    .homepage-upload-header h2 {
        font-size: 1rem;
    }

    .homepage-upload-header p {
        font-size: 0.7rem;
    }
}

/* Desktop-only restrictions */
@media (min-width: 769px) {
    .nav-btn[onclick*="takePhoto"] {
        opacity: 0.6;
        cursor: not-allowed;
    }
    
    .nav-btn[onclick*="takePhoto"]:hover {
        background: transparent;
        border-color: transparent;
    }
    
    .hero-btn[onclick*="takePhoto"] {
        opacity: 0.6;
        cursor: not-allowed;
    }
    
    .hero-btn[onclick*="takePhoto"]:hover {
        transform: none;
    }
    
    /* Reset mobile padding for desktop - keep original hero image size */
    .hero-container {
        padding-top: 0;
        height: calc(100vh - 140px);
    }
    
    .hero-content {
        padding-top: 0;
    }
}

/* Privacy Policy Section Styles */
.privacy-section {
    padding: 60px 20px;
    background: white;
    min-height: 100vh;
}

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

.privacy-content {
    line-height: 1.6;
    color: #333;
}

.privacy-content h3 {
    color: oklch(39.3% 0.095 152.535);
    margin: 30px 0 15px 0;
    font-size: 1.3rem;
}

.privacy-content p {
    margin-bottom: 15px;
}

.privacy-content ul {
    margin: 15px 0;
    padding-left: 20px;
}

.privacy-content li {
    margin-bottom: 8px;
}

.privacy-content a {
    color: oklch(44.8% 0.119 151.328);
    text-decoration: none;
}

.privacy-content a:hover {
    text-decoration: underline;
}

/* Disclaimer Section Styles */
.disclaimer-section {
    padding: 60px 20px;
    background: white;
    min-height: 100vh;
}

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

.disclaimer-content {
    line-height: 1.6;
    color: #333;
}

.disclaimer-content h3 {
    color: oklch(39.3% 0.095 152.535);
    margin: 30px 0 15px 0;
    font-size: 1.3rem;
}

.disclaimer-content p {
    margin-bottom: 15px;
}

.disclaimer-content ul {
    margin: 15px 0;
    padding-left: 20px;
}

.disclaimer-content li {
    margin-bottom: 8px;
}

.disclaimer-content a {
    color: oklch(44.8% 0.119 151.328);
    text-decoration: none;
}

.disclaimer-content a:hover {
    text-decoration: underline;
}

.disclaimer-content strong {
    color: #d32f2f;
}

.confidence-section {
    margin-top: 30px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.confidence-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 10px 0;
}

.confidence-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.confidence-fill {
    height: 100%;
    background: linear-gradient(90deg, #ef4444 0%, #f59e0b 50%, #10b981 100%);
    border-radius: 4px;
    transition: width 0.8s ease;
}

.confidence-text {
    font-size: 0.8rem;
    color: #6b7280;
    margin: 0;
    text-align: center;
} 

/* Homepage specific styles */
.choose-new-image-btn,
.take-photo-btn,
.cancel-btn,
.proceed-btn {
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    gap: 3px;
    margin: 1px;
}

.choose-new-image-btn {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.choose-new-image-btn:hover {
    background: #e5e7eb;
    color: #1f2937;
}

.take-photo-btn {
    background: #3b82f6;
    color: white;
    border: 1px solid #2563eb;
}

.take-photo-btn:hover {
    background: #2563eb;
    color: white;
}

.cancel-btn {
    background: #ef4444;
    color: white;
    border: 1px solid #dc2626;
}

.cancel-btn:hover {
    background: #dc2626;
    color: white;
}

.proceed-btn {
    background: #10b981;
    color: white;
    border: 1px solid #059669;
}

.proceed-btn:hover {
    background: #059669;
    color: white;
}

.analyzing-container {
    text-align: center;
    padding: 20px 15px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* Homepage specific analyzing container */
#homepageAnalyzingContainer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    max-height: 450px;
}

.analyzing-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #10b981;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 12px;
}

.analyzing-container h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 6px;
}

.analyzing-container p {
    color: #6b7280;
    font-size: 0.85rem;
}

.homepage-results-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 450px;
    max-height: 600px;
}

.homepage-results-container .results-header {
    background: #f9fafb;
    padding: 12px 15px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.homepage-results-container .results-content {
    padding: 12px 15px;
}

.more-info-link {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.more-info-link p {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
}

.more-info-link a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.more-info-link a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.homepage-results-container .confidence-section {
    padding: 12px 15px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    display: block !important;
    margin-bottom: 3rem; /* Reduced base margin */
    position: relative;
    z-index: 1000; /* Ensure it stays above footer */
}

/* Responsive adjustments for homepage buttons */
@media (max-width: 768px) {
    .preview-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .choose-new-image-btn,
    .take-photo-btn,
    .cancel-btn,
    .proceed-btn {
        width: 100%;
        justify-content: center;
    }
} 

/* Unable to identify styling */
.unable-to-identify {
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    margin-bottom: 1rem;
}

.unable-to-identify i {
    font-size: 3rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.unable-to-identify h3 {
    color: #495057;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.unable-to-identify p {
    color: #6c757d;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.unable-to-identify ul {
    text-align: left;
    margin: 1rem 0;
    padding-left: 2rem;
}

.unable-to-identify li {
    color: #6c757d;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.unable-to-identify strong {
    color: #495057;
}

/* Error message styling */
.error-message {
    text-align: center;
    padding: 2rem;
    background: #f8d7da;
    border-radius: 12px;
    border: 2px solid #f5c6cb;
    margin-bottom: 1rem;
}

.error-message i {
    font-size: 3rem;
    color: #721c24;
    margin-bottom: 1rem;
}

.error-message h3 {
    color: #721c24;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.error-message p {
    color: #721c24;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.try-again-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.try-again-btn:hover {
    background: #c82333;
}

.try-again-btn i {
    font-size: 1rem;
} 

/* User Image Display */
.user-image-display {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.user-plant-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* Plant Header - Keep this for the plant name display */

/* Plant Header - Keep this for the plant name display */
.plant-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.plant-info {
    flex: 1;
}

.plant-name {
    color: #2c3e50;
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.3;
}

.scientific-name {
    color: #6c757d;
    font-style: italic;
    font-size: 1.1rem;
    margin: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
}

.results-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.result-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    border-left: 4px solid #007bff;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.section-header i {
    color: #007bff;
    font-size: 1.2rem;
}

.section-header h4 {
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.section-content {
    color: #495057;
    line-height: 1.6;
}

.section-content p {
    margin: 0 0 0.5rem 0;
}

.section-content strong {
    color: #2c3e50;
    font-weight: 600;
}

.edibility-status {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.edibility-status.edible {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.edibility-status.unknown {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.identification-source {
    text-align: center;
    margin-top: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    color: #6c757d;
    font-size: 0.9rem;
}

.identification-source i {
    margin-right: 0.5rem;
    color: #007bff;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .user-image-display {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .user-plant-image {
        max-height: 250px;
    }
    
    .plant-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .plant-name {
        font-size: 1.5rem;
    }
    
    .results-grid {
        gap: 1rem;
    }
    
    .result-section {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .user-image-display {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .user-plant-image {
        max-height: 200px;
    }
    
    .plant-name {
        font-size: 1.3rem;
    }
    
    .scientific-name {
        font-size: 1rem;
    }
    
    .section-header h4 {
        font-size: 1rem;
    }
} 

/* Homepage Results Tile - Ensure dynamic expansion */
.homepage-results-tile {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px 25px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 1rem; /* Reduced margin to decrease gap with footer */
    position: relative;
    z-index: 1000;
    min-height: auto;
    height: auto;
    max-height: none;
    display: block;
    overflow: visible;
    transition: all 0.3s ease;
    /* Force proper spacing */
    transform: translateZ(0);
    /* Ensure it doesn't get cut off */
    page-break-inside: avoid;
}

.homepage-results-container {
    padding: 1rem;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    height: auto;
    min-height: auto;
    overflow: visible;
    display: block;
    padding-bottom: 2rem;
}

.homepage-results-container .results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e9ecef;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.homepage-results-container .results-content {
    min-height: 120px;
    height: auto;
    overflow: visible;
    margin-bottom: 1rem;
    max-height: none;
    display: block;
}

/* Confidence Section - Ensure it's fully visible at the bottom */
.confidence-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    border-left: 4px solid #28a745;
    height: auto;
    min-height: auto;
    overflow: visible;
    position: relative;
    bottom: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.confidence-section h3 {
    margin: 0 0 0.75rem 0;
    color: #2c3e50;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
}

.confidence-bar {
    width: 100%;
    height: 16px;
    background: #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0.5rem;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.confidence-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    border-radius: 8px;
    transition: width 0.5s ease;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.confidence-text {
    margin: 0;
    color: #495057;
    font-weight: 600;
    text-align: center;
    font-size: 0.9rem;
    padding: 0.4rem;
    background: white;
    border-radius: 6px;
    display: inline-block;
    min-width: 80px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}



.results-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
    height: auto;
    min-height: auto;
    overflow: visible;
    max-height: none;
}

.result-section {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 0.75rem;
    border-left: 3px solid #007bff;
    height: auto;
    min-height: auto;
    overflow: visible;
    max-height: none;
}

.section-header {
    margin-bottom: 0.5rem;
    height: auto;
    min-height: auto;
    overflow: visible;
}

.section-header h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 0.9rem;
    font-weight: 600;
    height: auto;
    min-height: auto;
    overflow: visible;
}

.section-content {
    color: #495057;
    line-height: 1.4;
    height: auto;
    min-height: auto;
    overflow: visible;
    max-height: none;
    font-size: 0.8rem;
}

.section-content p {
    margin-bottom: 0.4rem;
    height: auto;
    min-height: auto;
    overflow: visible;
}

.section-content strong {
    color: #2c3e50;
    font-weight: 600;
}

.plant-name {
    margin: 0 0 0.4rem 0;
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
    height: auto;
    min-height: auto;
    overflow: visible;
    max-height: none;
}

.scientific-name {
    margin: 0;
    color: #6c757d;
    font-style: italic;
    font-size: 0.8rem;
    height: auto;
    min-height: auto;
    overflow: visible;
    max-height: none;
}

.edibility-status {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.edibility-status.edible {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.edibility-status.unknown {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.identification-source {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
    color: #6c757d;
    font-size: 0.9rem;
}

.identification-source i {
    margin-right: 0.5rem;
    color: #007bff;
}

/* Responsive adjustments for better content fit */
@media (max-width: 768px) {
    .homepage-results-container {
        padding: 1.5rem;
    }
    

    
    .results-grid {
        gap: 1rem;
    }
    
    .result-section {
        padding: 1rem;
    }
    
    .confidence-section {
        padding: 1rem;
        margin-bottom: 6rem; /* Ensure space before footer on mobile */
    }
    
    .plant-name {
        font-size: 1.5rem;
    }
    
    .scientific-name {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .homepage-results-container {
        padding: 1rem;
    }
    

    
    .plant-name {
        font-size: 1.3rem;
    }
    
    .scientific-name {
        font-size: 0.9rem;
    }
    
    .section-header h4 {
        font-size: 1rem;
    }
    
    .result-section {
        padding: 0.75rem;
    }
    
    .confidence-section {
        padding: 0.75rem;
        margin-bottom: 6rem; /* Ensure space before footer on small mobile */
    }
} 

/* Force footer to stay below with dynamic spacing */
.footer {
    position: relative;
    z-index: 2;
    margin-top: 2rem; /* Further reduced margin to decrease gap */
    clear: both;
    padding-top: 2rem;
    flex-shrink: 0;
    background: oklch(39.3% 0.095 152.535);
    color: white;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    /* Ensure footer always stays at the bottom */
    min-height: 100px;
    /* Force footer to bottom */
    bottom: 0;
    width: 100%;
    /* Prevent overlap */
    transform: translateZ(0);
} 

/* Confidence Section - Ensure proper spacing from footer */
.confidence-section {
    margin-top: 2rem;
    margin-bottom: 3rem; /* Reduced base margin */
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    position: relative;
    z-index: 1000; /* Ensure it stays above footer */
}

.confidence-section h3 {
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    text-align: center;
}

.confidence-bar {
    width: 100%;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.75rem;
    position: relative;
}

.confidence-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
    border-radius: 10px;
    transition: width 0.3s ease;
    position: relative;
}

.confidence-text {
    text-align: center;
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0;
} 

/* Upload section visibility and spacing overrides */
.homepage-upload-header,
.homepage-upload-tile,
#homepageUploadTile {
  scroll-margin-top: 88px; /* keep tiles fully visible below sticky nav */
}

@media (min-width: 769px) {
  .homepage-upload-header {
    max-width: 720px;
    margin: 24px auto; /* neat vertical rhythm */
    padding: 20px 24px;
  }
  .homepage-upload-tile,
  #homepageUploadTile {
    max-width: 720px;
    margin: 20px auto;
  }
}

@media (max-width: 768px) {
  .homepage-upload-header {
    max-width: 94%;
    margin: 16px auto;
    padding: 14px 16px;
  }
  .homepage-upload-tile,
  #homepageUploadTile {
    max-width: 94%;
    margin: 16px auto;
  }
} 