:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-main: #ffffff;
    --text-muted: #e2e8f0;
    --accent-color: #a78bfa;
    --success-color: #4ade80;
    --error-color: #f87171;
    --font-family: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-family);
}

body {
    background-color: #0f172a;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
    color: var(--text-main);
}

/* Background Animations */
#shader-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
    background: #000;
    /* Fallback */
}

/* Removed old blob styles as they are replaced by the shader */


/* Navbar */
.navbar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 1.25rem;
    color: white;
}

.logo svg {
    color: var(--accent-color);
}

.hamburger {
    display: none;
    /* Hidden on desktop */
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: white;
}

@media (max-width: 600px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }

    .nav-links {
        gap: 20px;
    }
}

/* Main Container */
.container {
    width: 100%;
    max-width: 500px;
    padding: 20px;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    text-align: center;
}

header h1 {
    font-weight: 600;
    font-size: 2rem;
    margin-bottom: 8px;
    background: linear-gradient(to right, #fff, #cbd5e1);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: var(--text-muted);
    margin-bottom: 32px;
    font-weight: 300;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    opacity: 0;
    /* Start invisible */
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Hero Section Specifics */
.hero-section h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(to right, #fff, #a78bfa);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-section p {
    font-size: 1.1rem;
    max-width: 80%;
    margin: 0 auto 30px auto;
    color: var(--text-muted);
}


/* Upload Area */
.upload-area {
    border: 2px dashed var(--glass-border);
    border-radius: 16px;
    padding: 40px 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.02);
}

.upload-area:hover,
.upload-area.dragover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-color);
}

.icon-container {
    color: var(--accent-color);
    margin-bottom: 16px;
}

.upload-area h3 {
    margin-bottom: 8px;
    font-weight: 400;
}

.upload-area p {
    color: var(--text-muted);
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.browse-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 8px 24px;
    border-radius: 99px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.browse-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* File List */
.file-list {
    margin-top: 24px;
    max-height: 150px;
    overflow-y: auto;
    text-align: left;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.file-name {
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80%;
}

.remove-file {
    color: var(--error-color);
    cursor: pointer;
    font-weight: bold;
    padding: 4px;
}

/* Actions */
.actions {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.url-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    padding: 12px 16px;
    border-radius: 12px;
    color: white;
    outline: none;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.url-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.url-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.2);
}

.upload-btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: none;
    background: var(--primary-gradient);
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.upload-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

.upload-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px rgba(102, 126, 234, 0.5);
}

.text-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: underline;
    padding: 5px;
    transition: color 0.2s;
}

.text-btn:hover {
    color: var(--accent-color);
}

/* Status Messages */
.status-message {
    margin-top: 16px;
    font-size: 0.9rem;
    padding: 10px;
    border-radius: 8px;
}

.status-message.success {
    background: rgba(74, 222, 128, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(74, 222, 128, 0.2);
}

.status-message.error {
    background: rgba(248, 113, 113, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(248, 113, 113, 0.2);
}

.hidden {
    display: none !important;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Loader */
.loader {
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
    position: absolute;
    right: 20px;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    white-space: nowrap;
    border-width: 0;
}

/* Gallery Styles */
.gallery-container {
    width: 100%;
    max-width: 1200px;
    padding: 20px;
    padding-top: 100px;
    margin: 0 auto;
    align-self: flex-start;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.gallery-header h2 {
    font-size: 2rem;
    font-weight: 600;
}

/* MASONRY LAYOUT */
.gallery-grid {
    column-count: 3;
    column-gap: 20px;
}

@media (max-width: 900px) {
    .gallery-grid {
        column-count: 2;
    }
}

@media (max-width: 600px) {
    .gallery-grid {
        column-count: 1;
    }
}

.photo-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s;
    break-inside: avoid;
    /* Prevents splitting across columns */
    margin-bottom: 20px;
    /* Space between items vertically */
    display: inline-block;
    /* Helps with break-inside in some browsers */
    width: 100%;
}

.photo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.img-wrapper {
    width: 100%;
    height: auto;
    display: block;
    background: rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.img-wrapper img {
    width: 100%;
    height: auto;
    max-height: 350px;
    display: block;
    object-fit: cover;
    transition: transform 0.5s;
}

.photo-card:hover .img-wrapper img {
    transform: scale(1.1);
}

.photo-info {
    padding: 12px;
    text-align: center;
}

.download-link {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}

.download-link:hover {
    text-decoration: underline;
}


/* Landing Page Styles */
.landing-container {
    max-width: 900px;
}

.role-selection {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin-top: 40px;
    flex-wrap: wrap;
}

.role-card {
    flex: 1;
    min-width: 280px;
    background: rgba(255, 255, 255, 0.05);
    /* Slightly lighter glass */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px 20px;
    text-align: center;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.role-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.role-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.role-card:hover .role-icon {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.2);
}

.role-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.role-card p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Mobile Responsiveness Improvements */
@media (max-width: 600px) {

    /* Fix Body Layout: Prevent navbar from being squished by body flex-center */
    body {
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        padding-top: 0;
    }

    /* Navbar Tweaks */
    .navbar {
        position: relative;
        padding: 15px 20px;
        background: rgba(15, 23, 42, 0.95);
        display: flex;
        /* Ensure flex is active */
        flex-direction: row;
        /* Explicitly set horizontal layout */
        justify-content: space-between;
        /* Push items to edges (Logo Left, Hamburger Right) */
        align-items: center;
        /* Vertically center */
    }

    /* Hamburger Menu Button */
    .hamburger {
        display: block;
        background: none;
        border: none;
        color: white;
        cursor: pointer;
        z-index: 101;
    }

    .nav-links {
        display: none;
        /* Hidden by default on mobile */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(15, 23, 42, 0.98);
        flex-direction: column;
        gap: 0;
        padding: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        z-index: 100;
    }

    .nav-links.active {
        display: flex;
        /* Show when active */
    }

    .nav-links a {
        padding: 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        font-size: 1.1rem;
        width: 100%;
        text-align: center;
    }

    /* Container & Layout */
    .container {
        padding: 15px;
        max-width: 100%;
    }

    header h1 {
        font-size: 1.75rem;
    }

    .hero-section h1 {
        font-size: 2.2rem;
    }

    /* Buttons & Inputs (Touch Friendly) */
    .url-input,
    .upload-btn,
    .browse-btn {
        min-height: 48px;
        /* Standard touch target size */
        font-size: 1rem;
    }

    /* Search Results View */
    #results-container .gallery-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    #back-to-gallery-btn {
        width: 100%;
        text-align: center;
    }
}

/* Gallery Grid Mobile Tweaks */
@media (max-width: 480px) {
    .gallery-grid {
        column-count: 1;
        /* Single column for very small screens */
        column-gap: 0;
    }

    .photo-card {
        margin-bottom: 15px;
    }

    .gallery-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
        /* Full width buttons */
    }

    .gallery-header button {
        width: 100%;
        justify-content: center;
    }
}

/* Camera Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    /* High z-index to cover everything */
    backdrop-filter: blur(5px);
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal.hidden {
    display: none;
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    max-width: 95%;
    width: 500px;
}

.camera-container {
    width: 100%;
    margin-top: 15px;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    position: relative;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#camera-stream {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scaleX(-1);
    /* Mirror the selfie view */
}

/* =========================================
   Landing Page Styles (Added via UI/UX Pro Max)
   ========================================= */

.landing-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 20px 60px;
}

/* Custom Popup Modal */
.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.custom-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.custom-modal-content {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: 24px;
    padding: 40px 36px 32px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow:
        0 0 40px rgba(34, 211, 238, 0.08),
        0 25px 60px -12px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transform: translateY(30px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.custom-modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #22d3ee, #a78bfa, transparent);
    animation: modalShine 3s ease-in-out infinite;
}

@keyframes modalShine {

    0%,
    100% {
        transform: translateX(-30%);
    }

    50% {
        transform: translateX(30%);
    }
}

.custom-modal.active .custom-modal-content {
    transform: translateY(0) scale(1);
}

/* Modal Icon */
.modal-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.15), rgba(167, 139, 250, 0.15));
    border: 1px solid rgba(34, 211, 238, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: #22d3ee;
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.2);
    }

    50% {
        box-shadow: 0 0 20px 8px rgba(34, 211, 238, 0.1);
    }
}

.custom-modal h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: white;
    letter-spacing: -0.01em;
}

.custom-modal p {
    color: rgba(148, 163, 184, 0.9);
    margin-bottom: 20px;
    line-height: 1.6;
    font-size: 0.92rem;
}

/* Modal Features List */
.modal-features {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 24px;
    text-align: left;
}

.modal-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    color: rgba(226, 232, 240, 0.9);
    font-size: 0.88rem;
    font-weight: 400;
}

.modal-feature-item+.modal-feature-item {
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.modal-feature-item svg {
    flex-shrink: 0;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.modal-btn {
    padding: 12px 28px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    letter-spacing: 0.01em;
}

.modal-btn.primary {
    background: linear-gradient(135deg, #22d3ee, #06b6d4);
    color: #0f172a;
    box-shadow: 0 4px 15px rgba(34, 211, 238, 0.3);
    width: 100%;
}

.modal-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(34, 211, 238, 0.4);
}

.modal-btn.primary:active {
    transform: translateY(0);
}

.modal-btn.secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.modal-dismiss {
    font-size: 0.75rem !important;
    color: rgba(100, 116, 139, 0.6) !important;
    margin-top: 16px;
    margin-bottom: 0 !important;
}


.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    background: linear-gradient(to right, #fff, #a78bfa);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.landing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 48px;
}

.landing-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* Subtle border */
    border-radius: 24px;
    padding: 32px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.landing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.landing-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

.landing-card:hover::before {
    opacity: 1;
}

.landing-icon {
    width: 56px;
    height: 56px;
    background: rgba(167, 139, 250, 0.1);
    /* Primary color low opacity */
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: var(--accent-color);
    transition: transform 0.3s ease, background 0.3s ease;
}

.landing-card:hover .landing-icon {
    transform: scale(1.1) rotate(5deg);
    background: var(--accent-color);
    color: white;
}

.landing-icon svg {
    width: 28px;
    height: 28px;
}

.landing-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    margin-bottom: 8px;
}

.landing-card p {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.text-center {
    text-align: center;
}

.mb-12 {
    margin-bottom: 48px;
}

.mt-12 {
    margin-top: 48px;
}

.pt-8 {
    padding-top: 32px;
}

.border-t {
    border-top-width: 1px;
}

.border-white\/10 {
    border-color: rgba(255, 255, 255, 0.1);
}

.text-slate-400 {
    color: #94a3b8;
}

.text-sm {
    font-size: 0.875rem;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .landing-container {
        padding-top: 80px;
    }

    .landing-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   Hero Section Styles
   ========================================= */

.hero-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 60px;
    min-height: 50vh;
}

.hero-left {
    flex: 1;
    max-width: 600px;
}

.hero-right {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    height: 400px;
}

/* Typography Overrides for Hero */
.hero-section .hero-title {
    text-align: left;
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero-section .hero-subtitle {
    text-align: left;
    margin: 0 0 32px 0;
    max-width: 90%;
}

/* CTA Buttons */
.hero-cta-group {
    display: flex;
    gap: 16px;
}

.cta-button {
    padding: 14px 32px;
    border-radius: 99px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.cta-button.primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 10px 20px -5px rgba(102, 126, 234, 0.4);
}

.cta-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(102, 126, 234, 0.6);
}

.cta-button.secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.cta-button.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: white;
}

/* Animated Visuals */
/* Animated Visuals */
.hero-visual {
    position: relative;
    width: 450px;
    /* Increased from 300px */
    height: 550px;
    /* Increased from 300px */
    perspective: 1000px;
    /* Adds depth */
}

.floating-card {
    position: absolute;
    width: 220px;
    /* Increased from 140px */
    height: 300px;
    /* Increased from 140px */
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    border: 6px solid rgba(255, 255, 255, 0.8);
    /* Thicker clean border */
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    /* Soft, deep shadow */
    overflow: hidden;
    transition: transform 0.5s ease;
}

.hero-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 3s ease;
}

/* Hover effect for cards */
.hero-visual:hover .hero-card-img {
    transform: scale(1.1);
}

.card-1 {
    top: 40px;
    left: 0;
    z-index: 1;
    transform: rotate(-12deg);
    animation: float-1 8s ease-in-out infinite;
}

.card-2 {
    bottom: 60px;
    right: 0;
    z-index: 2;
    transform: rotate(8deg);
    animation: float-2 9s ease-in-out infinite 0.5s;
}

.card-3 {
    top: 50%;
    left: 50%;
    width: 260px;
    /* Center card larger */
    height: 350px;
    z-index: 3;
    /* Centered styling */
    transform: translate(-50%, -50%) rotate(-2deg);
    animation: float-3 7s ease-in-out infinite 1s;
    border-color: white;
    box-shadow: 0 35px 60px -15px rgba(0, 0, 0, 0.6);
}

/* Complex Floating Animations */
@keyframes float-1 {

    0%,
    100% {
        transform: translateY(0) rotate(-12deg);
    }

    50% {
        transform: translateY(-20px) rotate(-10deg);
    }
}

@keyframes float-2 {

    0%,
    100% {
        transform: translateY(0) rotate(8deg);
    }

    50% {
        transform: translateY(-25px) rotate(12deg);
    }
}

@keyframes move {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(50px, -50px) scale(1.1);
    }
}

/* =========================================
   Glassy Pricing Page Styles
   ========================================= */

/* Background Shader Canvas */
#pricing-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background-color: #111827;
    /* Fallback bg */
}

/* Pricing Page Container */
.pricing-page-container {
    padding: 4rem 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.pricing-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 800px;
}

.pricing-header h1 {
    font-size: 3rem;
    font-weight: 200;
    /* extralight */
    line-height: 1.2;
    letter-spacing: -0.03em;
    background: linear-gradient(to right, #0ea5e9, #a855f7, #3b82f6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 1rem;
}

.pricing-header p {
    font-size: 1.125rem;
    color: #e2e8f0;
    opacity: 0.8;
}

/* Glassy Pricing Cards */
.pricing-flex-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 2rem;
    width: 100%;
    max-width: 1024px;
}

@media (min-width: 768px) {
    .pricing-flex-container {
        flex-direction: row;
        align-items: center;
    }
}

.glassy-card {
    background: rgba(255, 255, 255, 0.05);
    /* very subtle white tint */
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 2rem;
    flex: 1;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.glassy-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
}

.glassy-card.popular {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(34, 211, 238, 0.3);
    /* cyan ring */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 10;
}

.popular-badge {
    position: absolute;
    top: -1rem;
    right: 1rem;
    background-color: #22d3ee;
    /* cyan-400 */
    color: #0f172a;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}

.plan-name {
    font-size: 3rem;
    font-weight: 200;
    color: white;
    margin-bottom: 0.25rem;
}

.plan-desc {
    font-size: 1rem;
    color: #94a3b8;
    margin-bottom: 1.5rem;
    height: 3rem;
    /* fix height for alignment */
}

.plan-price-container {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.plan-price {
    font-size: 3rem;
    font-weight: 200;
    color: white;
}

.plan-period {
    font-size: 0.875rem;
    color: #94a3b8;
}

.card-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    margin-bottom: 1.5rem;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    color: #e2e8f0;
    font-size: 0.875rem;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.check-icon {
    color: #22d3ee;
    /* cyan-400 */
    flex-shrink: 0;
}

/* Ripple Button */
.ripple-btn {
    position: relative;
    overflow: hidden;
    border: none;
    padding: 0.75rem 0;
    width: 100%;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    isolation: isolate;
    margin-top: auto;
}

.ripple-btn.primary {
    background-color: #22d3ee;
    color: #0f172a;
    --button-ripple-color: rgba(255, 255, 255, 0.4);
}

.ripple-btn.primary:hover {
    background-color: #67e8f9;
    /* cyan-300 */
}

.ripple-btn.secondary {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    --button-ripple-color: rgba(255, 255, 255, 0.2);
}

.ripple-btn.secondary:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

@keyframes ripple-anim {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Animations from React components */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    opacity: 0;
    /* Start hidden */
    animation: fadeUp 0.8s ease-out forwards;
}


/* Mobile Hero Responsiveness */
@media (max-width: 900px) {
    .hero-section {
        flex-direction: column;
        text-align: center;
        margin-top: 20px;
        gap: 20px;
        min-height: auto;
        margin-bottom: 40px;
    }

    .hero-left {
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-section .hero-title {
        text-align: center;
        font-size: 2.5rem;
    }

    .hero-section .hero-subtitle {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-cta-group {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero-right {
        height: 250px;
        width: 100%;
        overflow: hidden;
        display: flex;
        justify-content: center;
    }

    .hero-visual {
        transform: scale(0.5);
        margin-top: -80px;
    }

    .animated-card {
        margin-bottom: 40px;
    }

    .landing-container {
        padding-top: 80px;
    }
}

/* =========================================
   Animated Border Card Component
   ========================================= */

.animated-card {
    position: relative;
    width: 100%;
    max-width: 42rem;
    /* max-w-2xl */
    background-color: #111827;
    /* bg-gray-900 */
    border: 1px solid #1f2937;
    /* border-gray-800 */
    border-radius: 1rem;
    /* rounded-2xl */
    padding: 2rem;
    /* p-8 */
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    /* shadow-2xl */
    margin: 0 auto 60px;
}

@media (min-width: 768px) {
    .animated-card {
        padding: 3rem;
        /* md:p-12 */
    }
}

/* Border Containers */
.border-anim {
    position: absolute;
    overflow: hidden;
}

.border-anim-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Specific Border Positioning */
.border-top {
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    /* h-0.5 */
}

.border-right {
    top: 0;
    right: 0;
    width: 2px;
    /* w-0.5 */
    height: 100%;
}

.border-bottom {
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    /* h-0.5 */
}

.border-left {
    top: 0;
    left: 0;
    width: 2px;
    /* w-0.5 */
    height: 100%;
}

/* Gradients */
.gradient-x-orange {
    background: linear-gradient(to right, transparent, rgba(249, 115, 22, 0.5), transparent);
}

.gradient-y-purple {
    background: linear-gradient(to bottom, transparent, rgba(168, 85, 247, 0.5), transparent);
}

/* Content Styling */
.card-content {
    position: relative;
    z-index: 10;
    text-align: center;
}

.card-title {
    font-size: 1.875rem;
    /* text-3xl */
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: white;
}

@media (min-width: 768px) {
    .card-title {
        font-size: 2.25rem;
        /* md:text-4xl */
    }
}

.gradient-text {
    background: linear-gradient(to right, #fb923c, #a855f7);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.card-description {
    color: #9ca3af;
    /* text-gray-400 */
    max-width: 36rem;
    /* max-w-xl */
    margin: 0 auto 2rem auto;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .feature-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.feature-card-item {
    background-color: rgba(31, 41, 55, 0.5);
    /* bg-gray-800/50 */
    backdrop-filter: blur(4px);
    border-radius: 0.75rem;
    /* rounded-xl */
    padding: 1rem;
    border: 1px solid #374151;
    /* border-gray-700 */
    transition: all 0.3s;
}

.feature-card-item:hover {
    border-color: rgba(249, 115, 22, 0.3);
    /* hover:border-orange-500/30 */
}

.feature-inner {
    display: flex;
    align-items: center;
    text-align: left;
}

.feature-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    background: linear-gradient(to right, rgba(249, 115, 22, 0.2), rgba(168, 85, 247, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    color: #fb923c;
    /* text-orange-400 */
    font-weight: 600;
}

.feature-text h3 {
    font-weight: 500;
    color: white;
    font-size: 1rem;
    margin-bottom: 2px;
}

.feature-text p {
    font-size: 0.875rem;
    /* text-sm */
    color: #9ca3af;
    /* text-gray-400 */
    margin: 0;
}

/* Button */
.explore-btn {
    margin-top: 2rem;
    background: linear-gradient(to right, #ea580c, #9333ea);
    color: white;
    font-weight: 500;
    padding: 0.75rem 2rem;
    border-radius: 0.75rem;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.explore-btn:hover {
    background: linear-gradient(to right, #f97316, #a855f7);
    transform: translateY(-4px);
}

/* Decorative Elements */
.decor-dot {
    position: absolute;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 9999px;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.decor-dot.orange {
    top: 1rem;
    right: 1rem;
    background-color: #f97316;
}

.decor-dot.purple {
    bottom: 1rem;
    left: 1rem;
    background-color: #a855f7;
}

.decor-blur {
    position: absolute;
    width: 10rem;
    height: 10rem;
    border-radius: 9999px;
    filter: blur(24px);
    /* blur-xl */
    opacity: 0.1;
    z-index: 0;
}

.decor-blur.orange {
    top: -5rem;
    right: -5rem;
    background-color: #f97316;
}

.decor-blur.purple {
    bottom: -5rem;
    left: -5rem;
    background-color: #a855f7;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: .5;
    }
}

/* Mobile Input Validation Styles */
input[type="tel"] {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Ensure inputs in flex containers have consistent height/styling */
#auth-mobile,
#customer-phone {
    box-sizing: border-box;
}

/* =========================================
   Performance & Accessibility Optimizations
   ========================================= */

/* GPU Acceleration Hints */
.floating-card {
    will-change: transform;
}

.photo-card,
.landing-card,
.cta-button,
.glassy-card {
    will-change: transform;
}

/* Layout Containment for animated containers */
.animated-card {
    contain: layout style paint;
}

.hero-visual {
    contain: layout style;
}

/* Faster Mobile Taps (removes 300ms delay) */
.cta-button,
.upload-btn,
.browse-btn,
.ripple-btn,
.modal-btn,
.landing-card,
nav a {
    touch-action: manipulation;
}

/* Accessibility: Reduce Motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .floating-card,
    .photo-card,
    .landing-card,
    .cta-button,
    .glassy-card {
        will-change: auto;
    }

    .animate-fade-up {
        opacity: 1;
    }

    .hero-card-img {
        transition: none;
    }

    #shader-background,
    #pricing-canvas {
        display: none;
    }
}