/* ============================================
   Fly Webapp - Liquid Glass iOS 26 Design
   Premium Glassmorphism UI
   ============================================ */

:root {
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-shadow: rgba(0, 0, 0, 0.25);
    --glass-blur: 40px;

    --primary: #007AFF;
    --primary-light: #5AC8FA;
    --secondary: #5856D6;
    --success: #34C759;
    --accent-1: #FF2D55;
    --accent-2: #AF52DE;
    --accent-3: #00D4AA;

    --text-primary: rgba(255, 255, 255, 0.95);
    --text-secondary: rgba(255, 255, 255, 0.65);
    --text-tertiary: rgba(255, 255, 255, 0.45);

    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 20px;
    --spacing-lg: 32px;
    --spacing-xl: 48px;

    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 28px;
    --radius-xl: 36px;

    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* Hide scrollbars globally while maintaining scroll functionality */
::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

/* For Firefox */
html {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* iOS 26 Safari edge-to-edge background - NETFLIX APPROACH */
html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Full viewport coverage */
    height: 100%;
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    /* Safari iOS small viewport height */
    margin: 0;
    padding: 0;
    /* Solid background to prevent any gaps */
    background-color: #0f0f2d;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    /* Match html dimensions exactly */
    height: 100%;
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    /* Safari iOS small viewport height */
    margin: 0;
    /* Safe area padding to extend background into notch/home indicator areas */
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    /* Full background coverage - moved from html */
    background-color: #0f0f2d;
    color: var(--text-primary);
    overflow-x: hidden;
    overflow-y: scroll;
    position: relative;
    scrollbar-width: none;
    -ms-overflow-style: none;
    /* Safari-specific fixes */
    -webkit-overflow-scrolling: touch;
}


body::-webkit-scrollbar {
    display: none;
}

/* ============================================
   Animated Background Orbs
   ============================================ */

.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.15;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.orb-2 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, var(--accent-2) 0%, transparent 70%);
    top: 60%;
    right: 20%;
    animation-delay: -5s;
    animation-duration: 25s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--accent-3) 0%, transparent 70%);
    top: 30%;
    left: 15%;
    animation-delay: -10s;
    animation-duration: 22s;
}

.orb-4 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, var(--accent-1) 0%, transparent 70%);
    top: 20%;
    right: 10%;
    animation-delay: -15s;
    animation-duration: 28s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(30px, -30px) scale(1.05);
    }

    50% {
        transform: translate(-20px, 20px) scale(0.95);
    }

    75% {
        transform: translate(-30px, -20px) scale(1.02);
    }
}

/* ============================================
   Glass Card Effect
   ============================================ */

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow:
        0 8px 32px var(--glass-shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.3) 50%,
            transparent 100%);
}

/* ============================================
   Container & Layout
   ============================================ */

.container {
    position: relative;
    z-index: 1;
    max-width: 480px;
    margin: 0 auto;
    padding: var(--spacing-lg) var(--spacing-md);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

/* ============================================
   Header
   ============================================ */

.header {
    text-align: center;
    padding: var(--spacing-xl) 0 var(--spacing-lg);
    animation: fadeInDown 0.8s ease-out;
}

.header .app-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto var(--spacing-md);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 10px 40px rgba(88, 86, 214, 0.5),
        0 0 60px rgba(175, 82, 222, 0.3);
    animation: pulse 3s ease-in-out infinite;
    overflow: hidden;
}

.header .app-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-xs);
}

.title .version {
    font-size: 1.2rem;
    /* Made bigger */
    font-weight: 500;
    /* Slightly bolder */
    color: #8E8E93;
    /* Changed to grey color */
    -webkit-text-fill-color: #8E8E93;
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
    vertical-align: middle;
    display: inline-block;
    opacity: 1;
    /* Full opacity for better visibility */
}

.subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: 0.02em;
    margin: var(--spacing-xs) 0 0 0;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 10px 40px rgba(88, 86, 214, 0.5), 0 0 60px rgba(175, 82, 222, 0.3);
    }

    50% {
        transform: scale(1.02);
        box-shadow: 0 15px 50px rgba(88, 86, 214, 0.6), 0 0 80px rgba(175, 82, 222, 0.4);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

/* ============================================
   Steps Container
   ============================================ */

.steps-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}

/* ============================================
   Step Card
   ============================================ */

.step-card {
    padding: var(--spacing-lg);
    transition: var(--transition-smooth);
    animation: fadeInUp 0.8s ease-out backwards;
}

.step-card:nth-child(1) {
    animation-delay: 0.2s;
}

.step-card:nth-child(3) {
    animation-delay: 0.4s;
}

.step-card:hover {
    transform: translateY(-1px);
    box-shadow:
        0 8px 30px var(--glass-shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.step-card:hover + .connection-line {
    height: 40px;
    transform: translateY(-4px);
}

.step-card:nth-child(2):hover ~ .connection-line:last-child {
    height: 40px;
    transform: translateY(-4px);
}

.step-card.completed {
    border-color: rgba(52, 199, 89, 0.3);
}

.step-card.completed::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(52, 199, 89, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

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

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

/* ============================================
   Step Header
   ============================================ */

.step-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.step-number {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(0, 122, 255, 0.3);
}

.step-card.completed .step-number {
    background: linear-gradient(135deg, var(--success) 0%, #2fb350 100%);
    box-shadow: 0 4px 15px rgba(52, 199, 89, 0.3);
}

.step-info {
    flex: 1;
}

.step-info h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.step-info p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.step-status {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.step-status svg {
    width: 100%;
    height: 100%;
    color: var(--text-tertiary);
    transition: var(--transition-smooth);
}

.step-status .icon-complete {
    color: var(--success);
    animation: scaleIn 0.4s var(--transition-bounce);
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }

    to {
        transform: scale(1);
    }
}

/* ============================================
   Step Content
   ============================================ */

.step-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-xs);
}

.file-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex: 1;
}

.file-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.file-icon svg {
    width: 24px;
    height: 24px;
    color: var(--primary-light);
}

.file-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.file-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

.file-size {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* ============================================
   Download Button
   ============================================ */

.download-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 10px var(--spacing-md);
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(0, 122, 255, 0.3);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

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

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

.download-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.4);
}

.download-btn:active {
    transform: scale(0.98);
}

.download-btn.downloaded {
    background: linear-gradient(135deg, var(--success) 0%, #2fb350 100%);
    box-shadow: 0 4px 15px rgba(52, 199, 89, 0.3);
}

.btn-icon svg {
    width: 18px;
    height: 18px;
}

/* ============================================
   Step Instruction
   ============================================ */

.step-instruction {
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(0, 122, 255, 0.08);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary);
    margin-bottom: 0;
}

.step-instruction p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.step-instruction strong {
    color: var(--text-primary);
}

/* ============================================
   Connection Line
   ============================================ */

.connection-line {
    width: 3px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 auto;
    border-radius: 3px;
    position: relative;
    overflow: hidden;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.3s forwards;
    transition: height 0.3s ease, transform 0.3s ease;
}

.connection-line:hover {
    height: 40px;
    transform: translateY(-4px);
}

.line-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    transition: height 0.6s ease-out;
    opacity: 0;
}

.line-progress.active {
    height: 100%;
    opacity: 1;
}

/* ============================================
   Social Links and Footer Layout
   ============================================ */

.social-footer-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-xs);
    margin: 0;
    padding: var(--spacing-xs) 0;
    transition: transform 0.3s ease;
}

.social-footer-wrapper:hover {
    transform: translateY(-1px);
}



.social-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: var(--transition-smooth);
    color: var(--text-secondary);
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    color: var(--text-primary);
    /* Removed transform to prevent zooming */
}

.social-icon {
    width: 28px;
    height: 28px;
}

/* ============================================
   Important Note
   ============================================ */

.note-connector {
    width: 3px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 auto;
    border-radius: 3px;
    position: relative;
    overflow: hidden;
    z-index: 2;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.5s forwards;
}

.note-connector-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    transition: height 0.6s ease-out;
    opacity: 0;
}

.note-connector-line.active {
    height: 100%;
    opacity: 1;
}

.note-container {
    margin: 0 auto;
    padding: var(--spacing-sm) var(--spacing-md);
    max-width: 500px;
    animation: fadeInUp 0.8s ease-out 0.5s backwards;
    border-left: 3px solid var(--accent-1);
}

.note-content {
    text-align: center;
}

.note-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.note-content strong {
    color: var(--accent-1);
}

/* ============================================
   Footer
   ============================================ */

.footer {
    margin: 0;
    padding: var(--spacing-sm) var(--spacing-md);
    animation: fadeInUp 0.8s ease-out 0.6s backwards;
    width: fit-content;
    flex-shrink: 0;
    margin-top: -2px !important;
}

.footer-content {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: var(--spacing-xs);
}

.footer-text {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    line-height: 1;
    vertical-align: baseline;
}

.footer-brand {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-light);
    text-decoration: none;
    transition: var(--transition-fast);
    line-height: 1;
    vertical-align: baseline;
}

.footer-brand:hover {
    color: var(--primary);
}

/* Flip V letters */
.flip-v {
    display: inline-block;
    position: relative;
    line-height: 1;
    vertical-align: baseline;
}

.flip-v::before {
    content: "V";
    display: block;
    transform: scaleY(-1);
    -webkit-transform: scaleY(-1);
    -moz-transform: scaleY(-1);
    -ms-transform: scaleY(-1);
    line-height: 1;
}

/* ============================================
   Modal
   ============================================ */

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
    padding: var(--spacing-md);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    max-width: 320px;
    width: 100%;
    padding: var(--spacing-lg);
    text-align: center;
    transform: scale(0.9) translateY(20px);
    transition: var(--transition-bounce);
}

.modal.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--spacing-md);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-icon.success {
    background: linear-gradient(135deg, rgba(52, 199, 89, 0.2) 0%, rgba(52, 199, 89, 0.1) 100%);
}

.modal-icon svg {
    width: 36px;
    height: 36px;
    color: var(--success);
}

.modal-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
}

.modal-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
}

.modal-btn {
    width: 100%;
    padding: var(--spacing-md);
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.modal-btn:hover {
    transform: scale(1.02);
}

.modal-btn:active {
    transform: scale(0.98);
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 480px) {
    :root {
        --spacing-lg: 24px;
        --spacing-xl: 36px;
    }

    .title {
        font-size: 2rem;
    }

    .header .app-icon {
        width: 70px;
        height: 70px;
    }

    .header .app-icon svg {
        width: 38px;
        height: 38px;
    }

    .step-content {
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .download-btn {
        width: 100%;
        justify-content: center;
        padding: 10px var(--spacing-md);
    }

    .gradient-orb {
        opacity: 0.4;
    }

    .orb-1 {
        width: 250px;
        height: 250px;
    }

    .orb-2 {
        width: 200px;
        height: 200px;
    }

    .orb-3 {
        width: 180px;
        height: 180px;
    }

    .orb-4 {
        width: 150px;
        height: 150px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .gradient-orb,
    .header .app-icon {
        animation: none;
    }

    * {
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   Dark Mode Enhancements (default is dark)
   ============================================ */

@supports (backdrop-filter: blur(40px)) {
    .glass-card {
        background: rgba(255, 255, 255, 0.06);
    }
}

/* Safari-specific fixes */
@supports (-webkit-touch-callout: none) {
    .glass-card {
        background: rgba(30, 30, 50, 0.85);
    }
}
/* ============================================
   Adjustments for Hidden Note Section
   ============================================ */

/* Reduce spacing after steps container */
.steps-container {
    margin-bottom: 0;
}

/* Move social footer closer to steps */
.social-footer-wrapper {
    margin-top: -4px !important;
    padding-top: 4px !important;
    padding-bottom: 8px !important;
}
