/* YoursTruly.ai World Mini App - Main CSS */

/* cards-custom.css */
@import url('https://fonts.googleapis.com/css2?family=DM+Mono&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Long+Cang&family=Oooh+Baby&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&display=swap');

/* Custom variables */
:root {
    --primary: #00609D;
    --secondary: #FF5A5E;
    --tertiary: #001A2E;
    --logo: #002d6e;
    --background: #EFEFEF;
    --text-light: #FFFFFF;
    --text-grey: #999999;

    --primary-200: #99d8ff;
    --primary-300: #66c4ff;
    --primary-400: #33b1ff;
    --primary-500: #009dff;
    --primary-600: #007ecc;
    --primary-700: #005e99;
    --primary-800: #003f66;
    --secondary-200: #ff999b;
    --secondary-300: #ff6669;
    --secondary-400: #ff3336;
    --secondary-500: #ff0004;
    --secondary-600: #cc0003;
    --secondary-700: #990003;
    --secondary-800: #660002;
    --tertiary-200: #99d3ff;
    --tertiary-300: #66bdff;
    --tertiary-400: #33a7ff;
    --tertiary-500: #0091ff;
    --tertiary-600: #0074cc;
    --tertiary-700: #005799;
    --tertiary-800: #003a66;

    --font-family: 'Space Grotesk', system-ui, -apple-system, "Segoe UI", "Ubuntu", "Cantarell", "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    --font-family-decorative: 'Oooh Baby', cursive;
    --font-family-numeric: 'DM Mono', monospace;
    --font-family-handwritten: 'Long Cang', cursive;
    --border-width: 12px;
    --border-color: #E0E0E0;
    --spacing: 1rem;

    /* Sizes and Spacing */
    --header-height: 60px;
    --footer-height: 72px; /* Optimized to 72px - perfect height */
    --container-padding: 16px;
    --border-radius: 8px;
}

/* Base Styles */
* {
    box-sizing: border-box;
}

html,
body {
    font-family: var(--font-family);
    color: var(--text-light);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    height: 100%;
}

body {
    background: linear-gradient(to bottom, #00609D, #00609D, #001A2E);
    /* Default gradient for all pages except hero */
    /* Prevent bounce scroll on iOS */
    position: fixed;
    width: 100%;
    overflow: hidden;
    /* NO scrolling at all */
    -webkit-overflow-scrolling: touch;
}

/* Override ONLY for hero page - make it black */
[data-page="home"] body,
body:has(.hero-page),
body:has(.world-app-layout) {
    background: #000000 !important;
}

/* Container */
.container {
    padding: 8px var(--container-padding);
    max-width: 480px;
    margin: 0 auto;
    padding-bottom: calc(var(--footer-height) + 20px);
    background: transparent;
    /* Transparent to let page gradient show through */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* CHANGED: flex-start instead of center to allow natural flow */
    min-height: 100vh;
    overflow: hidden;
    /* Prevent any container scrolling */
}

/* Override container background for gradient pages - make transparent so gradient shows behind */
[data-page="create"] .container,
[data-page="collection"] .container,
[data-page="profile"] .container {
    background: transparent !important;
    /* Keep max-width: 480px for content - gradient background will show on sides */
}

/* Keep hero page container black */
[data-page="home"] .container {
    background: #000000 !important;
}

/* Removed problematic grid centering that was affecting all payment steps */

/* Delete Confirmation Modal */
.delete-confirmation-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}

.delete-confirmation-modal .modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.delete-confirmation-content {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    max-width: 320px;
    margin: 0 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    color: white;
    position: relative;
    z-index: 1;
}

.delete-confirmation-content .delete-icon {
    width: 64px;
    height: 64px;
    background: rgba(239, 68, 68, 0.2);
    border: 2px solid #ef4444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    font-size: 24px;
    color: #ef4444;
}

.delete-confirmation-content h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: white;
}

.delete-confirmation-content p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.delete-confirmation-content .delete-warning {
    color: rgba(239, 68, 68, 0.8);
    font-size: 12px;
    margin-bottom: 24px;
}

.delete-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.delete-cancel-btn {
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.delete-cancel-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.delete-confirm-btn {
    padding: 12px 20px;
    background: #ef4444;
    border: 1px solid #ef4444;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.delete-confirm-btn:hover {
    background: #dc2626;
    border-color: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

/* Typography */
h1 {
    font-size: 1.8rem;
    margin: 0.5em 0;
}

h2 {
    font-size: 1.4rem;
    margin: 0.5em 0;
}

p {
    margin: 0.5em 0;
    color: var(--light-text);
}

/* =================================================================
    END - Custom Variables & Base Styles 
   ================================================================= */



/* =================================================================
    START - Bottom Navigation
   ================================================================= */
.bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 72px; /* Optimized to 72px - perfect height */
    background: rgba(0, 26, 46, 0.95);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav .tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    height: 100%;
    padding: 10px 0; /* Increased from 8px to 10px for better spacing */
    transition: color 0.2s;
}

.bottom-nav .tab.active {
    color: var(--secondary);
    font-weight: 700;
}

.bottom-nav .tab i {
    font-size: 1.6rem;
    margin-bottom: 4px; /* Increased from 2px to 4px for better spacing */
}

.bottom-nav .tab span {
    font-size: 0.8rem;
    margin-top: 4px; /* Increased from 2px to 4px for better spacing */
}

/* =================================================================
    END - Bottom Navigation
   ================================================================= */



/* =================================================================
    START - World App specific layout modifications
   ================================================================= */
.world-app-container body,
.world-app-body {
    background: linear-gradient(to bottom, #00609D, #00609D, #001A2E) !important;
    color: var(--text-light);
    /* Optimize for the World App container */
    max-width: 100%;
    overflow-x: hidden;
    min-height: 100vh;
    /* Override the padding-top from custom.css */
    padding-top: 0 !important;
}

/* Override for non-hero pages - apply gradient background with full height and coverage */
body:has(.create-page).world-app-body,
body:has(.collection-layout).world-app-body,
body:has(.profile-container).world-app-body {
    background: linear-gradient(to bottom, #00609D, #00609D, #001A2E) !important;
    min-height: 100vh !important;
    min-height: -webkit-fill-available !important;
    height: 100% !important;
    width: 100vw !important;
    position: fixed !important;
}

/* Also apply to html element with full height */
html:has(.create-page),
html:has(.collection-layout),
html:has(.profile-container) {
    background: linear-gradient(to bottom, #00609D, #00609D, #001A2E) !important;
    min-height: 100vh !important;
    min-height: -webkit-fill-available !important;
    height: 100% !important;
    width: 100vw !important;
    overflow-x: hidden !important;
}

/* Remove duplicate gradient from pseudo-element - body already has it */
body:has(.create-page).world-app-body::before,
body:has(.collection-layout).world-app-body::before,
body:has(.profile-container).world-app-body::before {
    display: none;
    /* Not needed - body gradient is enough */
}

/* World App viewport - apply gradient for all non-hero pages */
html.world-app-container {
    background: linear-gradient(to bottom, #00609D, #00609D, #001A2E) !important;
    color: var(--text-light);
    min-height: 100vh;
    /* Extend background to cover viewport edges */
    position: relative;
    margin: 0 !important;
    padding: 0 !important;
}

/* Pseudo-element to extend gradient BEYOND viewport edges to cover border seam */
.world-app-container::before {
    content: '';
    position: fixed;
    top: -100px;
    left: -100px;
    right: -100px;
    bottom: -100px;
    width: calc(100vw + 200px);
    height: calc(100vh + 200px);
    background: linear-gradient(to bottom, #00609D, #00609D, #001A2E);
    z-index: -1;
    pointer-events: none;
}

/* Override ONLY for hero page - make it black */
html.world-app-container:has(.hero-page),
html.world-app-container:has(.world-app-layout),
html.world-app-container[data-page="home"],
body[data-page="home"] .world-app-container,
[data-page="home"].world-app-body {
    background-color: #000000 !important;
    background-image: none !important;
}

/* Override pseudo-element for hero page too */
.world-app-container:has(.hero-page)::before,
.world-app-container:has(.world-app-layout)::before,
body[data-page="home"] .world-app-container::before,
[data-page="home"].world-app-body .world-app-container::before {
    background-color: #000000 !important;
    background-image: none !important;
}

/* Ensure main container is transparent to let body gradient show through */
.world-app-container main {
    background: transparent;
    min-height: 100vh;
}

/* Override ONLY for hero page main - make it black */
.world-app-container:has(.hero-page) main,
.world-app-container:has(.world-app-layout) main,
body[data-page="home"] .world-app-container main,
[data-page="home"] main {
    background-color: #000000 !important;
    background-image: none !important;
}

/* World App specific color */
.world-app-container h1,
.world-app-container h2,
.world-app-container h3,
.world-app-container h4,
.world-app-container h5,
.world-app-container h6,
.world-app-container p,
.world-app-container span {
    color: var(--text-light);
}


/* Elements to hide in World App */
.world-app-container .desktop-only,
.world-app-container header,
.world-app-container #home-footer {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
}

/* Elements to show only in World App */
.world-app-only {
    display: none;
}

.world-app-container .world-app-only {
    display: block;
}

/* World App specific header styling */
.world-app-container header {
    background-color: var(--primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* World App specific button styling */
.world-app-container button.primary {
    background-color: var(--primary);
}

/* World App specific hero section */
.world-app-container .hero-message {
    background-color: var(--primary);
}

/* Responsive image sizing for World App */
.world-app-container img {
    max-width: 100%;
    height: auto;
}

/* Main container for World App layout - FIXED LAYOUT */
.world-app-layout {
    padding: 0;
    /* NO padding to maximize space */
    max-width: 100%;
    box-sizing: border-box;
    text-align: center;
    background: #000000;
    color: var(--text-light);
    min-height: 100vh;
    /* Use min-height instead of fixed height */
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
    /* Only hide horizontal overflow */
}

/* Show the World App layout when in World App environment */
.world-app-container .world-app-layout {
    display: block;
}

/* Content wrapper - AGGRESSIVE MOVE UP */
.world-app-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    height: auto;
    /* Let content determine height instead of fixed height */
    padding: 0;
    /* NO padding at all */
    gap: 0;
    /* NO gap between title and animation */
    text-align: center;
    overflow: visible;
    /* Allow content to flow naturally */
    /* REMOVED max-height constraint that was limiting content */
}

/* Remove conflicting video centering styles */
#hero-video {
    /* Let inline styles handle centering */
}

/* Hearts Touched Social Proof Section */
.hearts-touched-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.5rem 0;
    /* Reduced padding to sit closer to button */
    margin: 0 auto;
    /* No margin to sit tight */
    max-width: 300px;
    position: relative;
    z-index: 250;
    /* Above everything including video */
}

.hearts-counter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 2rem;
    padding: 0.75rem 1.25rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.hearts-counter:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

.heart-icon {
    font-size: 1.2rem;
    animation: heartBeat 2s ease-in-out infinite;
    filter: drop-shadow(0 0 8px rgba(255, 100, 100, 0.6));
}

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

.counter-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.5px;
}

#hearts-count {
    font-weight: 700;
    color: #ffffff;
    font-size: 1rem;
}

/* Logo styling */
.world-app-logo {
    width: 70px;
    height: 70px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.app-logo-image {
    width: 100%;
    height: 100%;
    background-image: url('../assets/images/logo.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

/* Title group container */
.world-app-title-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.2rem;
    /* Reduced gap within title group */
    flex-shrink: 0;
    margin-top: 0;
    /* No top margin to maximize video space */
    margin-bottom: 0;
    /* No bottom margin either */
    position: relative;
    z-index: 100;
    /* Ensure title stays above video */
}

/* Title styling */
.world-app-title {
    font-size: 1.85rem;
    font-weight: bold;
    margin: 0;
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

/* Decorative font for YoursTruly */
.world-app-text-decorative {
    font-family: var(--font-family-decorative);
    font-weight: 900;
    font-size: 1.3em;
    text-shadow: 0.5px 0 0 currentColor, -0.5px 0 0 currentColor, 0 0.5px 0 currentColor, 0 -0.5px 0 currentColor;
    -webkit-text-stroke: 0.5px currentColor;
}

/* Hero Animation Container - Clean */
.hero-animation-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 350px;
    margin: 1rem 0 1rem 0;
    overflow: visible;
    z-index: 1;
    border-radius: 12px;
    background: transparent;
}

/* Hero Animation Video - WebM Direct from R2 */
.hero-animation-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 12px;
    background: none !important;
    /* Remove any default video player backgrounds */
    background-color: transparent !important;
    /* World App WebView specific fixes */
    -webkit-background-clip: padding-box;
    background-clip: padding-box;
    /* Remove any box shadows or borders */
    box-shadow: none !important;
    border: none !important;
    outline: none !important;
}


/* Subtitle styling */
.world-app-subtitle {
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.1;
    opacity: 0.9;
    max-width: 320px;
    flex-shrink: 0;
}

/* Features group container */
.world-app-features-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* Intro header */
.world-app-intro-header {
    font-size: 1.15rem;
    margin: 0;
    font-weight: bold;
    letter-spacing: -0.01em;
    flex-shrink: 0;
}

/* Features container */
.world-app-features {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    border-radius: 18px;
    padding: 1.25rem;
    margin: 0;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    flex-shrink: 1;
    min-height: 0;
}

/* Add background image with reduced opacity using pseudo-element */
.world-app-features::after {
    content: '';
    position: absolute;
    top: auto;
    right: -10px;
    /* Shifted slightly left */
    bottom: 0;
    /* Position at bottom */
    width: 40%;
    /* Reduced width */
    height: 100%;
    /* Full height */
    background-image: url('../assets/images/card_hero.png');
    background-position: center bottom;
    /* Centered horizontally, bottom aligned */
    background-repeat: no-repeat;
    background-size: contain;
    opacity: 0.3;
    /* Reduced opacity */
    z-index: 1;
}

/* Ensure content appears above the background image */
.world-app-features .world-app-feature-item {
    position: relative;
    z-index: 2;
}

/* Individual feature item */
.world-app-feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    text-align: left;
}

.world-app-feature-item:last-child {
    margin-bottom: 0;
}

.world-app-feature-icon {
    flex: 0 0 32px;
    height: 32px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
}

.world-app-feature-icon i {
    font-size: 1rem;
}

.world-app-feature-text {
    flex: 1;
    font-size: 0.85rem;
    line-height: 1.35;
    font-weight: 400;
}

/* Customer count section */
.world-app-customer-count {
    margin: 0 0 1.5rem 0;
    /* Increased for better visual balance */
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    color: var(--text-light);
    font-weight: 500;
    flex-shrink: 0;
}

.world-app-customer-count i {
    color: var(--secondary);
    font-size: 1.2rem;
    filter: drop-shadow(0 0 8px rgba(255, 90, 94, 0.4));
    animation: heartbeat 2s ease-in-out infinite;
}

@keyframes heartbeat {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 8px rgba(255, 90, 94, 0.4));
    }

    14% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 12px rgba(255, 90, 94, 0.6));
    }

    28% {
        transform: scale(1);
        filter: drop-shadow(0 0 8px rgba(255, 90, 94, 0.4));
    }

    42% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 12px rgba(255, 90, 94, 0.6));
    }

    70% {
        transform: scale(1);
        filter: drop-shadow(0 0 8px rgba(255, 90, 94, 0.4));
    }
}

.world-app-customer-count .counter-label {
    color: var(--text-light, #FFFFFF);
    font-weight: 500;
}

/* Ensure the counter styling is consistent */
.world-app-customer-count .digit-roller {
    height: 1.2rem;
    overflow: hidden;
    position: relative;
}

.world-app-customer-count .digit-strip {
    position: relative;
    text-align: center;
    width: 0.7rem;
}

.world-app-customer-count .digit-comma {
    margin: 0 0.1rem;
    display: inline-block;
}

/* Login buttons + Hearts Section - FORCE ABSOLUTE POSITIONING */
.world-app-login-buttons {
    position: absolute !important;
    bottom: 1.8rem !important;
    left: 1rem !important;
    right: 1rem !important;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: calc(100% - 2rem);
    padding: 1rem;
    background: #000000;
    z-index: 200;
    /* FORCE them exactly where we want them with absolute positioning */
}

.world-app-login-button {
    padding: clamp(0.75rem, 3vw, 1rem) clamp(1rem, 4vw, 1.5rem);
    border-radius: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border: none;
    min-height: clamp(48px, 12vw, 56px);
    width: 100%;
}

.world-app-login-button.regular {
    background: linear-gradient(135deg, #FFFFFF 0%, #F8F9FA 100%);
    color: #1a1a1a;
    gap: 0.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.world-app-login-button.regular:hover {
    background: linear-gradient(135deg, #F8F9FA 0%, #E9ECEF 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.world-app-login-button.world-id:hover {
    background: linear-gradient(135deg, #002A4E 0%, #003A6E 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 42, 78, 0.3);
}

.world-app-login-button.world-id {
    background: linear-gradient(135deg, #001A2E 0%, #002A4E 100%);
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 20px rgba(0, 26, 46, 0.2);
}

.world-id-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.world-id-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.world-app-login-button svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Large CTA variant - Makes "Make someone smile" button bigger and more prominent */
.world-app-login-button.large-cta {
    font-size: clamp(1rem, 3vw, 1.1rem);
    padding: clamp(1.1rem, 4vw, 1.4rem) clamp(1.2rem, 4.5vw, 1.8rem);
    min-height: clamp(64px, 16vw, 72px);
    font-weight: 700;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
    margin-top: 0.5rem; /* Equal spacing from hearts counter above */
    margin-bottom: 0.5rem; /* Equal spacing to how it works link below */
}

.world-app-login-button.large-cta:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
}

/* How it works text link - Underlined, below main CTA */
.how-it-works-link {
    display: block;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: underline;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    padding: 0.75rem;
    cursor: pointer;
    transition: color 0.3s ease;
    margin-top: 0.25rem;
}

.how-it-works-link:hover {
    color: rgba(255, 255, 255, 1);
    text-decoration: underline;
}

/* Mobile responsiveness for World App layout */
@media (max-height: 700px) {
    .world-app-layout {
        padding: 1.5rem 1.5rem 0;
        gap: clamp(0.75rem, 2vh, 1rem);
    }

    .world-app-content {
        gap: clamp(0.75rem, 2vh, 1rem);
    }

    .world-app-features {
        padding: clamp(0.75rem, 2.5vh, 1rem);
    }

    .world-app-title-group {
        gap: 0.25rem;
    }

    .world-app-features-group {
        gap: 0.6rem;
    }

    .world-app-title {
        font-size: clamp(1.4rem, 5vw, 1.65rem);
    }

    .world-app-subtitle {
        font-size: clamp(0.8rem, 2.2vw, 0.85rem);
    }

    .world-app-customer-count {
        margin-bottom: 1.25rem;
        /* Balanced spacing */
    }

    .world-app-login-buttons {
        gap: clamp(0.5rem, 2vh, 0.75rem);
        /* Enhanced iOS safe area for smaller screens */
        padding-bottom: max(clamp(2rem, 8vh, 4rem), env(safe-area-inset-bottom, 2rem));
        margin-bottom: max(1rem, calc(env(safe-area-inset-bottom, 0px) * 0.8));
        min-height: 90px; /* Larger touch target for smaller screens */
    }
}

@media (max-height: 600px) {
    .world-app-layout {
        padding: clamp(0.75rem, 2vh, 1rem) 1.5rem 0;
        gap: clamp(0.5rem, 1.5vh, 0.75rem);
    }

    .world-app-content {
        gap: clamp(0.5rem, 1.5vh, 0.75rem);
    }

    .world-app-logo {
        width: clamp(50px, 12vw, 60px);
        height: clamp(50px, 12vw, 60px);
    }

    .world-app-title-group {
        gap: 0.2rem;
    }

    .world-app-features-group {
        gap: clamp(0.4rem, 1.2vh, 0.5rem);
    }

    .world-app-title {
        font-size: clamp(1.3rem, 4.5vw, 1.5rem);
    }

    .world-app-subtitle {
        font-size: clamp(0.75rem, 2vw, 0.8rem);
        line-height: 1.2;
    }

    .world-app-intro-header {
        font-size: clamp(0.9rem, 2.5vw, 1rem);
    }

    .world-app-features {
        padding: clamp(0.6rem, 2vh, 0.85rem);
    }

    .world-app-feature-text {
        font-size: clamp(0.75rem, 2vw, 0.8rem);
        line-height: 1.3;
    }

    .world-app-customer-count {
        font-size: clamp(0.8rem, 2.2vw, 0.85rem);
        margin-bottom: 1rem;
        /* Balanced spacing for smaller screens */
    }

    .world-app-login-buttons {
        gap: clamp(0.5rem, 1.5vh, 0.75rem);
        /* iOS safe area for medium screens */
        padding-bottom: max(clamp(1.8rem, 7vh, 3.5rem), env(safe-area-inset-bottom, 1.8rem));
        margin-bottom: max(0.8rem, calc(env(safe-area-inset-bottom, 0px) * 0.7));
        min-height: 85px;
    }

    .world-app-login-button {
        padding: clamp(0.7rem, 2.2vw, 0.85rem) clamp(1rem, 3vw, 1.25rem);
        font-size: clamp(0.85rem, 2.3vw, 0.95rem);
        min-height: clamp(44px, 10vw, 50px);
    }
}

@media (max-height: 500px) {
    .world-app-layout {
        padding: clamp(0.5rem, 1.5vh, 0.75rem) clamp(1rem, 3vw, 1.25rem) 0;
        gap: clamp(0.25rem, 1vh, 0.5rem);
    }

    .world-app-content {
        gap: clamp(0.25rem, 1vh, 0.5rem);
    }

    .world-app-logo {
        width: clamp(40px, 10vw, 50px);
        height: clamp(40px, 10vw, 50px);
    }

    .world-app-title-group {
        gap: 0.15rem;
    }

    .world-app-features-group {
        gap: clamp(0.3rem, 1vh, 0.4rem);
    }

    .world-app-title {
        font-size: clamp(1.2rem, 4vw, 1.35rem);
    }

    .world-app-subtitle {
        font-size: clamp(0.7rem, 1.8vw, 0.75rem);
    }

    .world-app-intro-header {
        font-size: clamp(0.85rem, 2.2vw, 0.95rem);
    }

    .world-app-features {
        padding: clamp(0.5rem, 1.5vh, 0.75rem);
    }

    .world-app-feature-item {
        margin-bottom: clamp(0.25rem, 1vh, 0.5rem);
    }

    .world-app-feature-text {
        font-size: clamp(0.7rem, 1.8vw, 0.75rem);
        line-height: 1.25;
    }

    .world-app-customer-count {
        font-size: clamp(0.75rem, 2vw, 0.8rem);
        margin-bottom: 0.75rem;
        /* Compact but balanced spacing */
    }

    .world-app-login-buttons {
        gap: clamp(0.25rem, 1vh, 0.5rem);
        /* iOS safe area for small screens */
        padding-bottom: max(clamp(1.5rem, 6vh, 3rem), env(safe-area-inset-bottom, 1.5rem));
        margin-bottom: max(0.6rem, calc(env(safe-area-inset-bottom, 0px) * 0.6));
        min-height: 75px;
    }

    .world-app-login-button {
        padding: clamp(0.6rem, 2vw, 0.75rem) clamp(0.8rem, 2.5vw, 1rem);
        font-size: clamp(0.8rem, 2.1vw, 0.9rem);
        min-height: clamp(40px, 9vw, 44px);
    }
}

@media (max-height: 400px) {
    .world-app-layout {
        padding: clamp(0.25rem, 1vh, 0.5rem) clamp(0.75rem, 2.5vw, 1rem) 0;
        gap: clamp(0.1rem, 0.5vh, 0.25rem);
    }

    .world-app-content {
        gap: clamp(0.1rem, 0.5vh, 0.25rem);
    }

    .world-app-logo {
        width: clamp(32px, 8vw, 40px);
        height: clamp(32px, 8vw, 40px);
    }

    .world-app-title-group {
        gap: 0.1rem;
    }

    .world-app-features-group {
        gap: clamp(0.2rem, 0.8vh, 0.3rem);
    }

    .world-app-title {
        font-size: clamp(1.1rem, 3.5vw, 1.2rem);
    }

    .world-app-subtitle {
        font-size: clamp(0.65rem, 1.6vw, 0.7rem);
    }

    .world-app-intro-header {
        font-size: clamp(0.8rem, 2vw, 0.85rem);
    }

    .world-app-features {
        padding: clamp(0.25rem, 1vh, 0.5rem);
    }

    .world-app-feature-item {
        margin-bottom: clamp(0.1rem, 0.5vh, 0.25rem);
    }

    .world-app-feature-text {
        font-size: clamp(0.65rem, 1.6vw, 0.7rem);
        line-height: 1.2;
    }

    .world-app-customer-count {
        font-size: clamp(0.7rem, 1.8vw, 0.75rem);
        margin-bottom: 0.5rem;
        /* Minimal but sufficient spacing */
    }

    .world-app-login-buttons {
        gap: clamp(0.1rem, 0.5vh, 0.25rem);
        /* iOS safe area for very small screens - critical */
        padding-bottom: max(clamp(1.2rem, 5vh, 2.5rem), env(safe-area-inset-bottom, 1.2rem));
        margin-bottom: max(0.4rem, calc(env(safe-area-inset-bottom, 0px) * 0.5));
        min-height: 70px;
    }

    .world-app-login-button {
        padding: clamp(0.5rem, 1.8vw, 0.65rem) clamp(0.6rem, 2vw, 0.85rem);
        font-size: clamp(0.75rem, 1.9vw, 0.85rem);
        min-height: clamp(36px, 8vw, 40px);
    }
}

/* =================================================================
    END - World App specific styles
   ================================================================= */



/* =================================================================
    START - User Menu Panel - Login/Signup Forms
   ================================================================= */
.user-menu-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--background);
    z-index: 1000;
    padding: 1.5rem;
    overflow-y: auto;
    transition: transform 0.3s ease;
    -webkit-overflow-scrolling: touch;
    /* Smoother scrolling on iOS */
    overscroll-behavior: none;
    /* Prevent scroll bounce */
}

/* Close panel button */
.user-menu-panel .close-panel {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--tertiary);
    cursor: pointer;
    z-index: 10;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 40px;
    height: 40px;
}

.user-menu-panel .close-panel:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Form inputs with status indicators */
.user-menu-panel label {
    position: relative;
    margin-bottom: 1.2rem;
    display: block;
}

.user-menu-panel input {
    padding-right: 40px;
    /* Space for the status icon */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Input status indicator */
.input-status {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #ccc;
    opacity: 0;
    /* Hidden by default */
    transition: opacity 0.3s ease, color 0.3s ease;
}

/* Show status icon when input is valid */
.user-menu-panel input:valid+.input-status {
    opacity: 1;
    color: #4CAF50;
    /* Green for valid */
}

/* Error state for inputs */
.user-menu-panel input.input-error {
    border-color: var(--secondary);
    box-shadow: 0 0 0 1px var(--secondary);
}

.user-menu-panel input.input-error+.input-status {
    opacity: 1;
    color: var(--secondary);
}

.user-menu-panel input.input-error+.input-status .fa-check {
    display: none;
}

.user-menu-panel input.input-error+.input-status:before {
    content: '\f071';
    /* FontAwesome exclamation triangle */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
}

/* Error message styling */
.error-message {
    background-color: rgba(255, 90, 94, 0.1);
    color: var(--secondary);
    border-radius: 4px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    text-align: left;
    display: none;
    /* Hidden by default */
}

/* Loading state for submit buttons */
.submit-button {
    position: relative;
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-button:hover {
    background-color: var(--primary-700);
}

.submit-button:disabled {
    background-color: var(--text-grey);
    cursor: not-allowed;
}

.loading-spinner {
    margin-left: 0.5rem;
}

/* Responsive adjustments for form grid */
@media (max-width: 480px) {
    .user-menu-panel .grid {
        display: block;
        /* Stack on small mobile screens */
    }

    .user-menu-panel h3 {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
    }

    .user-menu-panel label {
        margin-bottom: 1rem;
    }
}

/* =================================================================
   END - User Menu Panel - Login/Signup Forms
   ================================================================= */



/* =================================================================
   CREATE CARD PAGE STYLES - COMPLETE REDESIGN
   Mobile-first, viewport-optimized, premium UI matching landing page
   ================================================================= */

/* Create Page Specific Styles */
.create-page {
    padding: 40px 0 90px 0; /* Reduced top padding to pull UI up for better spacing */
    max-width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: transparent;
    /* Transparent - let body gradient show through */
}

/* Override black background on create page for World App */
body:has(.create-page).world-app-body,
.world-app-container:has(.create-page),
.world-app-container:has(.create-page) main {
    background: linear-gradient(to bottom, #00609D, #00609D, #001A2E) !important;
}

/* Fallback for browsers without :has() support - target create page directly */
[data-page="create"] body.world-app-body,
[data-page="create"] .world-app-container,
[data-page="create"] .world-app-container main,
[data-page="create"].world-app-body,
[data-page="create"].world-app-container {
    background: linear-gradient(to bottom, var(--primary), var(--primary), var(--tertiary)) !important;
}

/* Layout for card creation page */
.card-create-section {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 16px;
    background: transparent;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    padding: 0.75rem 1rem;
    box-sizing: border-box;
}

/* Main content container - optimized for viewport */
.card-create-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.8rem;
    overflow: hidden;
    justify-content: center;
    min-height: 0;
    padding-top: 0.5rem;
    background: transparent;
}

/* Header section - compact */
.card-create-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-light);
    margin: 0;
    text-align: center;
    font-family: var(--font-family);
    line-height: 1.1;
    flex-shrink: 0;
}

.card-create-subtitle {
    font-size: 0.8rem;
    color: var(--text-light);
    opacity: 0.8;
    text-align: center;
    margin: 0;
    font-family: var(--font-family);
    font-weight: 400;
    flex-shrink: 0;
}

/* Model selector header - streamlined */
.model-header {
    background: rgba(0, 25, 45, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 12px 12px 0 0;
    padding: 0.5rem 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.model-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.model-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
}

.model-details {
    display: flex;
    flex-direction: column;
}

.model-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.7rem;
    margin: 0;
    font-family: var(--font-family);
}

.model-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-light);
    margin: 0;
    font-family: var(--font-family);
}

.model-selector-button {
    background: #4A9EFF;
    border: none;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 0 8px rgba(74, 158, 255, 0.4);
}

.model-selector-button:hover {
    background: #3A8EEF;
    box-shadow: 0 0 12px rgba(74, 158, 255, 0.6);
    transform: translateY(-1px);
}

.model-selector-button i {
    color: var(--text-light);
    font-size: 0.6rem;
    line-height: 0.4rem;
}

/* Card preview container - optimized size */
.card-preview-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    /*height: 280px; commented out to respect aspect ratio of card preview */
    flex-shrink: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Card preview area - responsive */
.card-preview {
    background: rgba(196, 196, 196, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex: 1;
    min-height: 0;
}

.preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
    padding: 1rem;
}

.magic-icon-container {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.preview-icon {
    font-size: 1.2rem;
    color: var(--text-light);
}

.preview-placeholder p {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-light);
    margin: 0;
    opacity: 0.8;
    font-family: var(--font-family);
}

/* Progress Bar for Image Generation */
.loading-progress-container {
    width: 100%;
    max-width: 200px;
    margin: 0.5rem 0;
    display: none;
    /* Hidden by default */
}

.loading-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.loading-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary), #ff6b9d, var(--secondary));
    background-size: 200% 100%;
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease;
    animation: progressShimmer 2s ease-in-out infinite;
}

/* Shimmer effect for progress bar */
@keyframes progressShimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* Show progress container when loading */
.image-preview-area.loading .loading-progress-container {
    display: block;
}

.preview-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

/* Action buttons - compact design */
.preview-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(0, 25, 45, 0.9);
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.action-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.2rem;
}

.reset-button {
    background: rgba(255, 90, 94, 0.2);
    color: var(--secondary);
    border: 1px solid rgba(255, 90, 94, 0.3);
}

.reset-button:hover {
    background: rgba(255, 90, 94, 0.3);
    transform: scale(1.05);
}

.accept-button {
    background: rgba(90, 255, 161, 0.2);
    color: #5affA1;
    border: 1px solid rgba(90, 255, 161, 0.3);
}

.accept-button:hover {
    background: rgba(90, 255, 161, 0.3);
    transform: scale(1.05);
}

/* Upload button - streamlined */
.upload-image-button {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 0.6rem;
    margin: 0 0.75rem 0.75rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-family);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.upload-image-button:hover {
    background: rgba(20, 20, 20, 0.9);
    transform: translateY(-1px);
}

.upload-image-button i {
    font-size: 1rem;
}

/* Prompt input container - compact */
.prompt-container {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    transition: opacity 0.18s cubic-bezier(0.4, 0, 0.2, 1), transform 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(255, 90, 94, 0.5);
    animation: pinkPulse 2s ease-in-out infinite;
}

/* Remove pulse when user focuses on main prompt */
.prompt-container:focus-within {
    animation: none;
    border: 2px solid rgba(255, 90, 94, 0.6);
    box-shadow: 0 0 0 0 rgba(255, 90, 94, 0);
}

.prompt-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.5rem;
    font-size: 0.9rem;
    color: var(--tertiary);
    resize: none;
    min-height: 20px;
    max-height: 60px;
    font-family: var(--font-family);
    line-height: 1.4;
}

.prompt-input:focus {
    outline: none;
}

.prompt-input::placeholder {
    color: rgba(0, 26, 46, 0.6);
}

.prompt-submit-button {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    background: var(--tertiary);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.prompt-submit-button:hover {
    background: var(--primary);
    transform: scale(1.05);
}

.prompt-submit-button i {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

/* Loading state for prompt submit button */
.prompt-submit-button.loading {
    pointer-events: none;
    opacity: 0.8;
}

.prompt-submit-button.loading i {
    animation: spin 1s linear infinite;
}

/* Spinning animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Add Your Note Button - Premium Pink Design */
.add-note-button {
    width: 100%;
    background: linear-gradient(135deg, var(--secondary) 0%, #ff4d6d 100%);
    border: none;
    border-radius: 12px;
    padding: 0.75rem;
    color: var(--text-light);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-family);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 20px rgba(255, 90, 94, 0.3);
    flex-shrink: 0;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.add-note-button.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.add-note-button:hover {
    background: linear-gradient(135deg, #ff4d6d 0%, var(--secondary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 90, 94, 0.4);
}

.add-note-button i {
    font-size: 1rem;
}

/* Hide prompt container when image is accepted */
.prompt-container.hidden {
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
    margin: 0;
    padding: 0;
    height: 0;
    overflow: hidden;
}

/* States for user journey flow */
.card-create-content.image-generated .preview-placeholder {
    display: none;
}

.card-create-content.image-accepted .prompt-container {
    display: none;
}

.card-create-content.image-accepted .add-note-button {
    display: flex;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .card-create-section {
        padding: 0.75rem 1rem;
    }

    .card-create-title {
        font-size: 1.3rem;
    }

    .card-create-subtitle {
        font-size: 0.8rem;
    }

    .model-header {
        padding: 0.5rem 0.75rem;
    }

    .preview-actions {
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .action-button {
        width: 44px;
        height: 44px;
    }

    .upload-image-button {
        margin: 0 0.75rem 0.75rem;
        padding: 0.6rem;
        font-size: 0.85rem;
    }

    .prompt-container {
        padding: 0.6rem;
    }

    .add-note-button {
        padding: 0.875rem;
        font-size: 0.95rem;
    }
}

/* Animation for smooth transitions */
.card-create-content * {
    transition: all 0.3s ease;
}

/* =================================================================
   CREATE PAGE STEP INDICATORS - START
   Step indicators for the create image page
   ================================================================= */

.create-steps-header {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 0.6rem;
    padding: 0 1rem;
}

.create-step-one,
.create-step-two,
.create-step-confirm {
    font-size: 1rem;
    color: var(--text-light);
    opacity: 0.9;
    margin: 0;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-family: var(--font-family);
    line-height: 1.4;
}

.create-step-one::before {
    content: "1";
    width: 26px;
    height: 26px;
    background: #FF4A4E;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(255, 74, 78, 0.35);
    line-height: 1;
}

.create-step-two::before {
    content: "2";
    width: 26px;
    height: 26px;
    background: #FF4A4E;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(255, 74, 78, 0.35);
    line-height: 1;
}

.create-step-confirm::before {
    content: "3";
    width: 26px;
    height: 26px;
    background: #FF4A4E;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(255, 74, 78, 0.35);
    line-height: 1;
}

/* Mobile responsive */
@media (max-width: 600px) {
    .create-steps-header {
        padding: 0 0.5rem;
        margin-bottom: 0.3rem;
        gap: 0.2rem;
    }

    .create-step-one,
    .create-step-two,
    .create-step-confirm {
        font-size: 0.9rem;
        gap: 0.5rem;
    }
}

/* Create page specific mobile app layout */
@media (max-width: 600px) {
    [data-page="create"] .create-page {
        min-height: auto !important;
        padding-bottom: 20px !important;
    }

    [data-page="create"] .container {
        padding-top: 4px;
        justify-content: center;
        padding-bottom: calc(var(--footer-height) + 80px);
        background: transparent !important;
        min-height: auto !important;
        height: auto !important;
    }

    [data-page="create"] .card-create-content {
        justify-content: flex-end;
        gap: 0.6rem;
        padding-bottom: 1rem;
    }

    [data-page="create"] .glass-card-container {
        margin-bottom: 0.8rem;
    }

    /* Compact glass card container elements */
    [data-page="create"] .model-selector {
        padding: 0.6rem 0.8rem;
        margin-bottom: 0;
    }

    [data-page="create"] .image-preview-area {
        min-height: 200px;
        margin-bottom: 0;
    }

    [data-page="create"] .upload-btn {
        margin-top: 0.8rem !important;
        margin-bottom: 0 !important;
        padding: 12px 16px !important;
    }

    [data-page="create"] .prompt-container {
        margin-bottom: 12px !important;
        margin-top: 0.5rem;
    }

    /* Reduce step header spacing further */
    [data-page="create"] .create-steps-header {
        margin-bottom: 0.4rem;
        padding: 0 0.5rem;
    }

    /* Fix action buttons spacing from image preview */
    [data-page="create"] .action-buttons {
        margin-top: 1rem !important;
        margin-bottom: 0.8rem !important;
    }
}

/* Conditional layout fix for confirm step only */
.create-steps-header:has(.create-step-confirm)+* .card-create-content {
    justify-content: flex-start;
    gap: 1rem;
}

/* Alternative fallback for browsers without :has() support */
.card-create-content.confirm-step-active {
    justify-content: flex-start;
    gap: 1rem;
}

/* Move glass container up slightly on confirm step to eliminate extra space */
.card-create-content.confirm-step-active .glass-card-container {
    margin-top: -1rem;
}

/* Smooth transitions for page switching */
.card-create-content {
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.add-your-note-section {
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
    padding-top: 3.5rem !important;
    padding-bottom: 6rem;
}

/* Smooth button transitions */
.accept-btn {
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

/* =================================================================
   CREATE PAGE STEP INDICATORS - END
   ================================================================= */

/* =================================================================
   CREATE CARD PAGE STYLES - END
   ================================================================= */



/* =================================================================
   CREATE PAGE - ADD YOUR NOTE SECTION STYLES - START
   Specific styles for the add-your-note-section in create.html
   ================================================================= */

.add-your-note-section .note-section-content {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    padding: 0;
}

.add-your-note-section .note-section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-light);
    margin: 0;
    text-align: left;
}

.add-your-note-section .note-section-subtitle {
    font-size: 1rem;
    color: var(--text-light);
    opacity: 0.8;
    margin: 0;
    text-align: left;
    padding-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.add-your-note-section .note-section-subtitle::before {
    content: "1";
    width: 26px;
    height: 26px;
    background: #FF4A4E;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(255, 74, 78, 0.35);
    line-height: 1;
}

/* Step 2 instruction line */
.add-your-note-section .note-step-two {
    font-size: 1rem;
    color: var(--text-light);
    opacity: 0.8;
    margin: 0.5rem 0 0.7rem 0;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.add-your-note-section .note-step-two::before {
    content: "2";
    width: 26px;
    height: 26px;
    background: #FF4A4E;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(255, 74, 78, 0.35);
    line-height: 1;
}

/* Note Editor Container */
.add-your-note-section .note-editor-container {
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    overflow: hidden;
    background: var(--tertiary);
}

.add-your-note-section .note-editor-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--tertiary);
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.add-your-note-section .note-editor-header i {
    font-size: 1.5rem;
    color: var(--text-light);
}

.add-your-note-section .note-editor-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.add-your-note-section .note-editor-label {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-light);
}

.add-your-note-section .note-editor-subtitle {
    font-size: 0.9rem;
    color: var(--text-light);
    opacity: 0.7;
}

.add-your-note-section .note-editor-content {
    background: var(--text-light);
    padding: 0.75rem;
    height: 230px;
    max-height: 230px;
    overflow-y: auto;
    border-radius: 0;
}

.add-your-note-section .note-text-area {
    width: 100%;
    height: 100%;
    color: var(--tertiary);
    font-size: 1rem;
    line-height: 1.5;
    outline: none;
    resize: none;
    overflow-y: auto;
    border: none;
    background: transparent;
    text-align: left;
    padding: 0 0.75rem;
}

.add-your-note-section .note-text-area::placeholder {
    color: var(--tertiary);
    opacity: 0.4;
}

.add-your-note-section .note-character-counter {
    background: #000;
    color: var(--text-light);
    padding: 0.75rem 1rem;
    text-align: center;
    font-size: 0.9rem;
    font-family: var(--font-family-numeric);
}

/* Enhanced pink pulse animation with smooth rounded glow */
@keyframes pinkPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 90, 94, 0.6);
    }

    50% {
        box-shadow: 0 0 20px 8px rgba(255, 90, 94, 0.2);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 90, 94, 0);
    }
}

/* Note Prompt Input */
.add-your-note-section .note-prompt-container {
    position: relative;
    background-color: white;
    border-radius: 20px;
    padding: 1rem;
    margin: 0.3rem 0 0.3rem 0;
    height: 90px;
    display: flex;
    align-items: center;
    border: 2px solid rgba(255, 90, 94, 0.5);
    animation: pinkPulse 2s ease-in-out infinite;
    transition: all 0.3s ease;
}

/* Remove pulse when user focuses */
.add-your-note-section .note-prompt-container:focus-within {
    animation: none;
    border: 2px solid rgba(255, 90, 94, 0.6);
    box-shadow: 0 0 0 0 rgba(255, 90, 94, 0);
}

.add-your-note-section .note-prompt-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.5rem;
    font-size: 1rem;
    color: var(--tertiary);
    resize: none;
    height: 60px;
    overflow-y: auto;
    vertical-align: top;
    line-height: 1.4;
}

.add-your-note-section .note-prompt-input:focus {
    outline: none;
}

.add-your-note-section .note-prompt-input::placeholder {
    color: var(--tertiary);
    opacity: 0.6;
}

.add-your-note-section .note-prompt-submit-button {
    width: 33px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: var(--secondary);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.09);
    transition: all 0.2s ease;
}

.add-your-note-section .note-prompt-submit-button:hover {
    background: #ff4d6d;
    transform: scale(1.05);
}

/* Add Mailing Info Button - Premium Pink Design (matches Add your note button) */
.add-your-note-section .add-mailing-info-button {
    width: 100%;
    background: #FF5A5E;
    border: none;
    border-radius: 12px;
    padding: 1.7rem 0;
    color: var(--text-light);
    font-size: 1.35rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-family);
    display: none;
    /* Hidden by default */
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    box-shadow: 0 4px 20px rgba(255, 90, 94, 0.3);
    flex-shrink: 0;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    margin: 0.3rem auto 0.7rem auto;
}

.add-your-note-section .add-mailing-info-button.show {
    display: flex;
    /* Show when 'show' class is added */
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.add-your-note-section .add-mailing-info-button:hover {
    background: #ff4d6d;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 90, 94, 0.4);
}

.add-your-note-section .add-mailing-info-button i {
    font-size: 1rem;
}

/* Mobile responsive spacing for add-your-note-section */
@media (max-width: 600px) {
    .add-your-note-section {
        gap: 0.5rem;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        padding-bottom: 1rem !important;
        /* padding-top is preserved from base styles (7.5rem) */
    }

    .add-your-note-section .note-section-content {
        gap: 0.5rem;
    }

    .add-your-note-section .note-editor-content {
        height: 205px;
        max-height: 205px;
    }

    .add-your-note-section .note-prompt-container {
        margin: 0.2rem 0 0.2rem 0;
    }

    .add-your-note-section .add-mailing-info-button {
        padding: 1.4rem 0;
        font-size: 1.08rem;
        margin: 0.2rem auto 0.5rem auto;
    }
}

/* Removed - both flows now use the same base .add-your-note-section styles */

/* =================================================================
   CREATE PAGE - ADD YOUR NOTE SECTION STYLES - END
   ================================================================= */



/* Mailing Info Section Styles */
.mailing-info-section {
    padding: 0.5rem 1rem 8rem 1rem;
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 1rem;
}

.info-form {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1rem 1rem 1.1rem 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.form-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-light);
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.form-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 8px;
    padding: 0.75rem;
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.2);
}

.form-input::placeholder {
    color: var(--text-light);
    opacity: 0.7;
}

/* Email input container with help icon */
.email-input-container {
    position: relative;
    margin-bottom: 0.75rem;
}

.email-help-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    opacity: 0.6;
    font-size: 0.9rem;
    cursor: pointer;
    z-index: 2;
    transition: opacity 0.2s ease;
}

.email-help-icon:hover {
    opacity: 1;
}

.email-input-with-icon {
    padding-left: 2.5rem;
    margin-bottom: 0;
}

/* Email help tooltip */
.email-help-tooltip {
    position: absolute;
    top: -80px;
    left: 0;
    right: 0;
    background: rgba(0, 26, 46, 0.95);
    border-radius: 8px;
    padding: 12px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tooltip-content p {
    margin: 0;
    color: var(--text-light);
    font-size: 0.85rem;
    line-height: 1.4;
}

.tooltip-content p:first-child {
    font-weight: 600;
    margin-bottom: 4px;
}

.tooltip-close-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    z-index: 1001;
}

.tooltip-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.tooltip-close-btn i {
    font-size: 0.7rem;
    color: var(--text-light);
    opacity: 0.8;
}

.tooltip-close-btn:hover i {
    opacity: 1;
}

.tooltip-arrow {
    position: absolute;
    bottom: -6px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid rgba(0, 26, 46, 0.95);
}

.select-container {
    position: relative;
    margin-bottom: 0.75rem;
}

.form-select {
    width: 100%;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 8px;
    padding: 0.75rem;
    color: var(--text-light);
    font-size: 1rem;
    appearance: none;
    cursor: pointer;
}

.select-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    opacity: 0.7;
    pointer-events: none;
}

.form-message {
    color: var(--text-light);
    opacity: 0.8;
    text-align: center;
    margin: 0.75rem 0;
    font-size: 0.9rem;
}

.autofill-button,
.next-step-button,
.contact-book-button,
.save-contact-button,
.preview-card-button {
    width: 100%;
    background: rgba(255, 255, 255, 0.18);
    border: none;
    border-radius: 12px;
    padding: 1rem;
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.next-step-button {
    background: var(--primary-500);
    font-weight: 600;
    margin-top: auto;
}

.autofill-button:hover,
.contact-book-button:hover,
.save-contact-button:hover,
.preview-card-button:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: translateY(-2px) scale(1.02);
}

.next-step-button:hover {
    background: var(--primary-600);
    transform: translateY(-2px);
}

/* Prominent pink button for Preview Card */
.preview-card-button.prominent-pink {
    width: 100%;
    background: var(--secondary);
    border: none;
    border-radius: 12px;
    padding: 1rem;
    color: var(--text-light);
    font-size: 1rem;
    font-weight: 600;
    margin-top: 0.25rem;
    margin-bottom: 0;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: 0 2px 8px rgba(255, 90, 94, 0.08);
}

.preview-card-button.prominent-pink:hover {
    background: var(--secondary-400);
    transform: translateY(-2px) scale(1.03);
}

.preview-card-btn-container {
    margin-top: -0.25rem;
    display: flex;
    justify-content: center;
}

/* Recipient info action buttons spacing - Show contact buttons */
.recipient-form .contact-book-button {
    display: flex !important;
    margin-bottom: 0.75rem;
}

.recipient-form .save-contact-button {
    display: flex !important;
    margin-bottom: 0.75rem;
}

.preview-card-button.prominent-pink {
    margin-bottom: 0;
    margin-top: 0.25rem;
}

@media (max-width: 600px) {
    .mailing-info-section {
        padding: 0.5rem 1rem 6rem 1rem;
        padding-top: 0.5rem;
        min-height: 100vh;
    }

    .recipient-form .contact-book-button {
        display: flex !important;
        margin-bottom: 0.75rem;
    }

    .recipient-form .save-contact-button {
        display: flex !important;
        margin-bottom: 0.75rem;
    }

    .preview-card-button.prominent-pink {
        margin-bottom: 0;
        margin-top: 0.25rem;
    }
}

/* =================================================================
   CREATE CARD PAGE STYLES - END
   ================================================================= */

/* Final Step Page Styles */
.final-step-section {
    max-width: 440px;
    width: 100%;
    margin: 0 auto 0 auto;
    padding-top: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.final-step-title,
.final-step-subtitle {
    display: none;
}

.card-preview-container {
    width: 100%;
    background: #0a2236;
    border-radius: 0;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    margin-bottom: 1.2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.10);
    overflow: visible;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 0;
    box-sizing: border-box;
    line-height: 0;
    font-size: 0;
}

.preview-header {
    background: #001A2E;
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 1.2rem 1.2rem 1rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    overflow: hidden;
    z-index: 10;
    justify-content: flex-start;
    box-shadow: none;
    margin-bottom: 0;
    width: 100%;
    box-sizing: border-box;
}

.preview-header>* {
    background: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.preview-header i {
    color: #fff;
    font-size: 1.5rem;
    margin-right: 0.7rem;
}

.preview-system {
    background: transparent;
    color: #fff;
    border-radius: 0;
    margin: 0;
    padding: 0;
    text-align: center;
    font-size: 0;
    line-height: 0;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 7/5;
    min-height: 160px;
    box-shadow: none;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    padding: 0;
    overflow: hidden;
}

.confirmation-message {
    color: var(--text-light);
    opacity: 0.9;
    font-size: 1.08rem;
    margin: 1.2rem 0 0.7rem 0;
    text-align: center;
}

.info-confirmation {
    width: 100%;
    margin-bottom: 1.1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
}

.confirmation-dropdown-button {
    width: 100%;
    max-width: 420px;
    background: #001A2E;
    color: #fff;
    font-weight: 600;
    font-size: 1.08rem;
    border: none;
    border-radius: 16px;
    padding: 1.05rem 0;
    margin: 0.7rem auto 0 auto;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
}

.confirmation-dropdown-button i,
.confirmation-dropdown-button svg {
    color: #fff !important;
}

.confirmation-dropdown-button:hover {
    background: #003f66;
    color: #fff;
}

.modify-info-button {
    width: 100%;
    max-width: 420px;
    font-size: 1.08rem;
    border-radius: 16px;
    padding: 1.05rem 0;
    margin: 0.7rem auto 0 auto;
}

.modify-info-button:hover {
    background: var(--primary-200);
    color: var(--primary-800);
}

.send-final-button {
    width: 100%;
    max-width: 420px;
    background: var(--secondary);
    color: #fff;
    font-weight: 700;
    font-size: 1.35rem;
    border: none;
    border-radius: 28px;
    padding: 1.7rem 0;
    margin: 2.2rem auto 1.2rem auto;
    box-shadow: 0 2px 12px rgba(255, 90, 94, 0.13);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
}

.send-final-button:hover {
    background: var(--secondary-400);
    transform: translateY(-2px) scale(1.03);
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .final-step-section {
        margin: 1.2rem auto 0 auto;
    }

    .card-preview-container {
        border-radius: 0;
        border-top-left-radius: 14px;
        border-top-right-radius: 14px;
        padding-bottom: 0;
    }

    .preview-header {
        font-size: 1rem;
        padding: 0.8rem 0.7rem 0.6rem 0.7rem;
        border-top-left-radius: 14px;
        border-top-right-radius: 14px;
    }

    .preview-header i {
        font-size: 1.2rem;
        margin-right: 0.6rem;
    }

    .preview-system {
        width: 100%;
        min-height: 120px;
        font-size: 1rem;
        border-radius: 0;
    }

    .confirmation-dropdown-button {
        font-size: 0.98rem;
        border-radius: 12px;
        padding: 0.95rem 0;
        margin: 0.5rem auto 0 auto;
    }

    .send-final-button {
        font-size: 1.08rem;
        padding: 1.4rem 0;
        border-radius: 20px;
        margin: 1.2rem auto 0.7rem auto;
    }

    .info-confirmation button,
    .modify-info-button {
        font-size: 0.98rem;
        border-radius: 12px;
        padding: 0.95rem 0;
        margin: 0.5rem auto 0 auto;
    }

    .bottom-nav {
        height: 72px; /* Optimized to 72px for mobile */
    }

    .bottom-nav .tab i {
        font-size: 1.3rem;
    }
}

.final-step-section>.confirmation-message,
.final-step-section>.info-confirmation,
.final-step-section>.send-final-button {
    margin-top: 1.2rem;
}

@media (max-width: 600px) {
    .card-preview-container {
        border-radius: 0;
        border-top-left-radius: 14px;
        border-top-right-radius: 14px;
        padding-bottom: 0;
    }

    .final-step-section>.confirmation-message,
    .final-step-section>.info-confirmation,
    .final-step-section>.send-final-button {
        margin-top: 0.8rem;
    }
}

.confirmation-dropdown-button,
.modify-info-button,
.send-final-button {
    margin-top: 0.7rem;
}

.confirmation-dropdown-button {
    margin-top: 0.7rem;
}

.info-confirmation {
    margin-bottom: 0;
}

@media (max-width: 600px) {

    .confirmation-dropdown-button,
    .modify-info-button,
    .send-final-button {
        margin-top: 0.5rem;
    }

    .confirmation-dropdown-button {
        margin-top: 0.5rem;
    }
}

/* CSS-Only Flip Card Styles */
.flip-card-container {
    width: 100%;
    height: 100%;
    perspective: 1000px;
    cursor: pointer;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    margin-top: 0;
}

.flip-card-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    line-height: 0;
    font-size: 0;
}

.flip-card-container.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 0;
    overflow: hidden;
    background: #fff;
    line-height: 0;
    font-size: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flip-card-back {
    transform: rotateY(180deg);
}

.card-preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0;
    margin: 0;
    padding: 0;
    vertical-align: bottom;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(0, 0, 0, 0.1) 0%,
            rgba(0, 0, 0, 0.05) 50%,
            rgba(0, 0, 0, 0.1) 100%);
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 15px;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.flip-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    backdrop-filter: blur(10px);
    transform: translateY(10px);
    transition: transform 0.3s ease;
}

.flip-card-container:hover .flip-indicator {
    transform: translateY(0);
}

.flip-indicator i {
    font-size: 11px;
    opacity: 0.9;
}

/* Loading state for images */
.card-preview-image[src*="Loading"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .flip-indicator {
        font-size: 11px;
        padding: 6px 10px;
        gap: 4px;
    }

    .image-overlay {
        padding: 12px;
    }

    .flip-card-container {
        border-radius: 0;
    }

    .flip-card-front,
    .flip-card-back,
    .card-preview-image {
        border-radius: 0;
    }
}

/* Animation for smooth transitions */
.flip-card-container * {
    transition: all 0.3s ease;
}

/* Handwritten text overlay for card back */
.handwritten-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 248, 240, 0.95);
    padding: 20px;
    z-index: 1;
}

.handwritten-text {
    max-width: 280px;
    text-align: center;
    font-family: 'Kalam', 'Comic Sans MS', cursive;
    font-size: 14px;
    line-height: 1.6;
    color: #2c3e50;
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    transform: rotate(-1deg);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.handwritten-text p {
    margin: 0;
    font-weight: 400;
}

/* Ensure flip indicator appears above handwritten text */
.flip-card-back .image-overlay {
    z-index: 2;
}

/* Responsive adjustments for handwritten text */
@media (max-width: 600px) {
    .handwritten-overlay {
        padding: 15px;
    }

    .handwritten-text {
        max-width: 240px;
        font-size: 12px;
        padding: 15px;
    }
}

/* Animation for smooth transitions */
.flip-card-container * {
    transition: all 0.3s ease;
}

/* Smooth transitions for card creation steps */
.glass-card-container {
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(0, 25, 45, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: none;
}



/* Model selector styles */
.model-selector {
    background: rgba(0, 25, 45, 0.9);
    backdrop-filter: blur(10px);
    padding: 0.6rem 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.model-dropdown-btn {
    background: #4A9EFF;
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 0 8px rgba(74, 158, 255, 0.4);
}

.model-dropdown-btn:hover {
    background: #3A8EEF;
    box-shadow: 0 0 12px rgba(74, 158, 255, 0.6);
    transform: translateY(-1px);
}

.model-dropdown-btn i {
    color: var(--text-light);
    font-size: 0.6rem;
    line-height: 0.4rem;
}

/* Disabled state for model selector button when on confirm step */
.model-dropdown-btn.disabled {
    background: rgba(74, 158, 255, 0.3);
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
    pointer-events: none;
}

.model-dropdown-btn.disabled:hover {
    background: rgba(74, 158, 255, 0.3);
    box-shadow: none;
    transform: none;
}

.model-dropdown-btn.disabled i {
    opacity: 0.5;
}

/* Image preview area */
.image-preview-area {
    background: rgba(196, 196, 196, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 240px;
    flex: 1;
}

/* World App fix: Remove bottom border-radius from image preview area */
.card-create-content.confirm-step-active .image-preview-area {
    border-radius: 0 0 0 0;
    /* Remove all rounding from image area */
}

/* World App fix: Make image aggressively fill container to eliminate bottom gap */
/* Only target the image generation preview, not the card preview */
.card-create-content.confirm-step-active .image-preview-area .preview-image {
    padding: 0;
    margin: 0;
    object-fit: cover;
    /* Ensure image covers entire container */
    object-position: center;
    /* Keep image centered when cropping */
    width: 100%;
    height: 100%;
}











.prompt-container {
    transition: opacity 0.18s cubic-bezier(0.4, 0, 0.2, 1), transform 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Additional optimizations for larger screens */
@media (min-height: 800px) and (max-width: 480px) {
    .world-app-layout {
        padding: clamp(2rem, 6vh, 3rem) 1.5rem 0;
        gap: clamp(1.5rem, 3vh, 2rem);
    }

    .world-app-content {
        gap: clamp(1.5rem, 3vh, 2rem);
    }

    .world-app-login-buttons {
        margin-top: clamp(2rem, 4vh, 3rem);
        /* Enhanced iOS safe area for larger screens */
        padding-bottom: max(clamp(2.5rem, 5vh, 4rem), env(safe-area-inset-bottom, 2.5rem));
        margin-bottom: max(clamp(1rem, 2vh, 1.5rem), calc(env(safe-area-inset-bottom, 0px) * 0.6));
        min-height: 100px; /* Generous touch target for larger screens */
    }
}

/* Ensure minimum touch targets for accessibility */
@media (max-height: 600px) {
    .world-app-login-button {
        min-height: max(44px, clamp(44px, 10vw, 50px));
        /* Ensure 44px minimum for touch */
    }
}

/* Landscape orientation optimizations - Enhanced iOS Safe Area */
@media (orientation: landscape) and (max-height: 500px) {
    .world-app-layout {
        padding: clamp(0.5rem, 2vh, 1rem) clamp(2rem, 8vw, 4rem) 0;
        /* Account for landscape safe areas */
        padding-left: max(clamp(2rem, 8vw, 4rem), env(safe-area-inset-left, 2rem));
        padding-right: max(clamp(2rem, 8vw, 4rem), env(safe-area-inset-right, 2rem));
    }

    .world-app-content {
        max-width: min(90vw, 400px);
    }

    .world-app-login-buttons {
        max-width: min(80vw, 300px);
        /* Critical landscape safe area bottom */
        padding-bottom: max(clamp(1.5rem, 8vh, 3rem), env(safe-area-inset-bottom, 1.5rem));
        margin-bottom: max(0.5rem, calc(env(safe-area-inset-bottom, 0px) * 0.5));
        min-height: 70px;
    }
}

/* =================================================================
   REMOVED CRITICAL FAILSAFE - Was forcing buttons to bottom
   ================================================================= */

/* Failsafe: Ensure button itself has minimum touch target */
.world-app-login-button {
    /* Force minimum height for accessibility */
    min-height: max(48px, 12vw, 3rem) !important;
    
    /* Ensure button stays visible */
    position: relative !important;
    z-index: 101 !important;
    
    /* Prevent any margin collapse issues */
    margin: 0 !important;
}

/* =================================================================
   EDGE CASE HANDLING: Extreme Screen Sizes & Orientations
   ================================================================= */

/* Handle very wide screens in landscape */
@media (min-width: 800px) and (orientation: landscape) {
    .world-app-login-buttons {
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Handle very tall screens */
@media (min-height: 900px) {
    .world-app-login-buttons {
        padding-bottom: max(3rem, env(safe-area-inset-bottom, 3rem)) !important;
        margin-bottom: max(1.5rem, calc(env(safe-area-inset-bottom, 0px) * 0.8)) !important;
    }
}

/* Handle iPhone SE and similar small devices */
@media (max-width: 375px) and (max-height: 667px) {
    .world-app-login-buttons {
        padding-bottom: max(1.8rem, env(safe-area-inset-bottom, 1.8rem)) !important;
        margin-bottom: max(0.8rem, calc(env(safe-area-inset-bottom, 0px) * 0.6)) !important;
        min-height: 80px !important;
    }
}

/* Handle iPhone 15 Pro Max and similar large devices */
@media (min-width: 414px) and (min-height: 896px) {
    .world-app-login-buttons {
        padding-bottom: max(2.5rem, env(safe-area-inset-bottom, 2.5rem)) !important;
        margin-bottom: max(1.2rem, calc(env(safe-area-inset-bottom, 0px) * 0.7)) !important;
        min-height: 100px !important;
    }
}

/* =================================================================
    START - Contact Selection Modal Styles
   ================================================================= */

/* Contact Selection Modal */
.contact-selection-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.contact-selection-modal .modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 26, 46, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.contact-selection-modal-content {
    position: relative;
    background: linear-gradient(135deg, rgba(0, 26, 46, 0.95) 0%, rgba(0, 96, 157, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    max-width: 420px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Modal Header */
.contact-selection-modal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-selection-modal .modal-header h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #FFFFFF;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.contact-selection-modal .modal-header h3 i {
    color: var(--secondary);
    font-size: 1.2rem;
}

.contact-selection-modal .modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.contact-selection-modal .modal-close:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.1);
}

/* Header Actions */
.contact-selection-modal .header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-selection-modal .header-actions .add-contact-btn {
    background: #FF5A5E !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 8px 16px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.contact-selection-modal .header-actions .add-contact-btn:hover {
    background: #ff3336 !important;
    transform: translateY(-1px);
}

/* Additional fallback selectors to ensure the button is pink */
.add-contact-btn {
    background: #FF5A5E !important;
    color: white !important;
    border: none !important;
    outline: none !important;
    border-radius: 8px !important;
    padding: 8px 16px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    box-shadow: none !important;
}

button.add-contact-btn {
    background: #FF5A5E !important;
    color: white !important;
    border: none !important;
    outline: none !important;
    border-radius: 8px !important;
    padding: 8px 16px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    box-shadow: none !important;
}

#contact-selection-modal .add-contact-btn {
    background: #FF5A5E !important;
    color: white !important;
    border: none !important;
    outline: none !important;
    border-radius: 8px !important;
    padding: 8px 16px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    box-shadow: none !important;
}

/* Hover states for all fallback selectors */
.add-contact-btn:hover {
    background: #ff3336 !important;
    transform: translateY(-1px) !important;
}

button.add-contact-btn:hover {
    background: #ff3336 !important;
    transform: translateY(-1px) !important;
}

#contact-selection-modal .add-contact-btn:hover {
    background: #ff3336 !important;
    transform: translateY(-1px) !important;
}

/* Contact Search */
.contact-search-container {
    padding: 16px 24px 20px;
}

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

.search-icon {
    position: absolute;
    left: 12px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    z-index: 1;
}

.contact-search-input {
    width: 100%;
    padding: 12px 45px 12px 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #FFFFFF;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s ease;
}

.contact-search-input:focus {
    border-color: var(--secondary);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 2px rgba(255, 90, 94, 0.2);
}

.contact-search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-clear-btn {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.search-clear-btn:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.1);
}

/* Contacts List */
.contacts-selection-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 24px 24px;
    max-height: 400px;
}

.contact-selection-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.contact-selection-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--secondary);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(255, 90, 94, 0.1);
}

.contact-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--secondary) 0%, #FF7A7E 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-avatar i {
    color: #FFFFFF;
    font-size: 1.2rem;
}

.contact-details {
    flex: 1;
    min-width: 0;
}

.contact-name {
    font-size: 1rem;
    font-weight: 600;
    color: #FFFFFF;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-address {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-email {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-select-arrow {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.contact-selection-item:hover .contact-select-arrow {
    color: var(--secondary);
    transform: translateX(2px);
}

/* Empty States */
.empty-contacts-state,
.no-contacts-found {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.empty-state-icon i {
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.empty-contacts-state h4,
.no-contacts-found p {
    color: #FFFFFF;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.empty-contacts-state p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin: 0 0 24px 0;
    line-height: 1.4;
}

.empty-state-action-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--secondary) 0%, #FF7A7E 100%);
    border: none;
    border-radius: 8px;
    color: #FFFFFF;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.empty-state-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 90, 94, 0.3);
}

/* Autofill Animation */
.autofill-animation {
    animation: autofillHighlight 0.6s ease;
    background: rgba(255, 90, 94, 0.1) !important;
    border-color: var(--secondary) !important;
}

@keyframes autofillHighlight {
    0% {
        background: rgba(255, 90, 94, 0.3);
        border-color: var(--secondary);
        transform: scale(1.02);
    }

    50% {
        background: rgba(255, 90, 94, 0.2);
    }

    100% {
        background: rgba(255, 90, 94, 0.1);
        transform: scale(1);
    }
}

/* Autofill Success Message */
.autofill-success-message {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: #FFFFFF;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 8px;
    animation: slideInSuccess 0.4s ease;
}

.autofill-success-message i {
    font-size: 0.9rem;
}

@keyframes slideInSuccess {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Address form styling */
.add-address-form-container {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.add-address-form-container .form-input,
.add-address-form-container .form-select {
    width: 100%;
    margin-bottom: 16px;
    padding: 12px 16px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.add-address-form-container .form-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.add-address-form-container .form-input:focus,
.add-address-form-container .form-select:focus {
    outline: none;
    border-color: var(--primary-pink);
    background: rgba(255, 255, 255, 0.08);
}

.add-address-form-container .select-container {
    position: relative;
    margin-bottom: 16px;
}

.add-address-form-container .select-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
    pointer-events: none;
    font-size: 0.9rem;
}

/* Modal footer styling */
.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    gap: 12px;
}

.modal-footer .secondary-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-footer .secondary-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.modal-footer .primary-btn {
    background: var(--primary-pink);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.modal-footer .primary-btn:hover {
    background: var(--primary-pink-dark);
    transform: translateY(-1px);
}

.modal-footer .primary-btn:active {
    transform: translateY(0);
}

/* Modal back button */
.modal-back-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-back-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

/* Address form error message */
.address-form-error {
    display: none;
    align-items: center;
    gap: 8px;
    background: var(--error-red);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 16px;
    font-size: 0.9rem;
    animation: slideInError 0.3s ease-out;
}

.address-form-error i {
    font-size: 1rem;
}

@keyframes slideInError {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Empty state secondary button */
.empty-state-secondary-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: 12px;
}

.empty-state-secondary-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    transform: translateY(-1px);
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .contact-selection-modal {
        padding: 10px;
    }

    .contact-selection-modal-content {
        max-height: 85vh;
        border-radius: 12px;
    }

    .contact-selection-modal .modal-header {
        padding: 16px 20px 12px;
    }

    .contact-search-container {
        padding: 12px 20px 16px;
    }

    .contacts-selection-list {
        padding: 0 20px 20px;
    }

    .contact-selection-item {
        padding: 12px;
        gap: 12px;
    }

    .contact-avatar {
        width: 40px;
        height: 40px;
    }

    .contact-avatar i {
        font-size: 1rem;
    }

    .contact-name {
        font-size: 0.95rem;
    }

    .contact-address {
        font-size: 0.8rem;
    }

    .contact-email {
        font-size: 0.75rem;
    }
}

/* Save Contact Messages */
.save-contact-success-message {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: #FFFFFF;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 12px;
    animation: slideInSuccess 0.4s ease;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}

.save-contact-success-message i {
    font-size: 1rem;
    color: #FFFFFF;
}

.save-contact-error-message {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    color: #FFFFFF;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 12px;
    animation: slideInError 0.4s ease;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.15);
}

.save-contact-error-message i {
    font-size: 1rem;
    color: #FFFFFF;
}

@keyframes slideInError {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsive for Save Contact Messages */
@media (max-width: 480px) {

    .save-contact-success-message,
    .save-contact-error-message {
        font-size: 0.85rem;
        padding: 10px 14px;
        margin-top: 10px;
    }

    .save-contact-success-message i,
    .save-contact-error-message i {
        font-size: 0.9rem;
    }
}

/* =================================================================
    END - Contact Selection Modal Styles
   ================================================================= */

/* =================================================================
   How to Use YoursTruly Section - New Clean Design
   ================================================================= */

.how-to-use-section {
    margin-bottom: 1rem;
    padding: 0 1rem;
}

.how-to-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-light);
    text-align: center;
    margin: 0 0 0.8rem 0;
    letter-spacing: 0.1em;
    opacity: 0.8;
    font-family: var(--font-family);
}

.how-to-steps {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.how-to-step {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.step-number {
    width: 24px;
    height: 24px;
    background: #4A9EFF;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
    font-family: var(--font-family);
    box-shadow: 0 0 8px rgba(74, 158, 255, 0.4);
}

.step-text {
    font-size: 0.85rem;
    color: var(--text-light);
    opacity: 0.9;
    line-height: 1.3;
    font-weight: 400;
    font-family: var(--font-family);
}

/* Mobile responsive for How to Use section */
@media (max-width: 600px) {
    .how-to-use-section {
        padding: 0 0.5rem;
        margin-bottom: 0.8rem;
    }

    .how-to-title {
        font-size: 0.75rem;
        margin-bottom: 0.6rem;
    }

    .how-to-step {
        padding: 0.6rem;
        gap: 0.6rem;
    }

    .step-number {
        width: 22px;
        height: 22px;
        font-size: 0.75rem;
    }

    .step-text {
        font-size: 0.8rem;
    }
}

/* =============================================
   HOW IT WORKS MODAL
   ============================================= */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: #000000;
    border-radius: 16px;
    max-width: 95%;
    width: 450px;
    max-height: 90vh; /* Increased from 85vh to show more content */
    overflow-y: auto;
    position: relative;
    padding-bottom: env(safe-area-inset-bottom, 0); /* Prevent device bottom bar overlap */
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1rem 1rem; /* Reduced horizontal padding to create more space between elements */
    border-bottom: 1px solid #333;
}

.modal-header h2 {
    color: #ffffff;
    margin: 0;
    margin-left: 0.5rem; /* Push title slightly left from edge */
    margin-right: 1rem; /* Add space between title and X button */
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    font-size: 2.2rem;
    font-weight: 300;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    margin-right: 0.5rem; /* Push X button right from edge */
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.modal-body {
    padding: 1.5rem;
    padding-bottom: max(3rem, calc(3rem + env(safe-area-inset-bottom, 0))); /* Extra bottom padding + safe area to prevent content cutoff */
}

.modal-intro {
    text-align: left;
    margin-bottom: 2.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(0, 126, 204, 0.1), rgba(0, 126, 204, 0.05));
    border-radius: 12px;
    border: 1px solid rgba(0, 126, 204, 0.2);
    position: relative;
}

.intro-headline {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.intro-tagline {
    color: #00a8ff;
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0 0 1.5rem 0;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.intro-description {
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 500;
    margin: 0 0 0.75rem 0;
    line-height: 1.5;
    opacity: 0.95;
}

.intro-highlight {
    color: #00ff88;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.intro-promise {
    color: #b3d9ff;
    font-size: 1rem;
    margin: 0;
    line-height: 1.6;
    font-weight: 400;
    opacity: 0.9;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
}

.step:last-child {
    margin-bottom: 0;
}

.step-number {
    background: #007ecc;
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.step-content h3 {
    color: #ffffff;
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.step-content p {
    color: #cccccc;
    margin: 0;
    line-height: 1.5;
}

/* Button with arrow styling */
.world-app-login-button.regular {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.button-text {
    flex: 1;
    text-align: center;
    color: #1a1a1a !important;
    font-weight: 600;
}

.button-arrow {
    position: absolute;
    right: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a !important;
    opacity: 0.8;
}