:root {
    --primary-dark: #064e3b;   /* Deep Emerald Green */
    --primary: #047857;        /* Rich Emerald */
    --primary-light: #10b981;  /* Vibrant Mint Green */
    --primary-bg: #ecfdf5;     /* Soft Mint Wash */
    --gold: #d97706;           /* Subtle Luxury Gold */
    --gold-light: #fbbf24;     /* Bright Gold Accent */
    --gold-bg: rgba(217, 119, 6, 0.08);
    --bg-outside: #e2e8f0;
    --bg-app: #fcfbf7;         /* Warm Ivory Base */
    --surface: #ffffff;
    --text-main: #0f172a;      /* Deep Slate */
    --text-muted: #475569;     /* Soft Muted Slate */
    --text-emerald: #064e3b;
    --glass-bg: rgba(255, 255, 255, 0.88);
    --glass-border: rgba(6, 78, 59, 0.1);
    --shadow-soft: 0 10px 30px -5px rgba(6, 78, 59, 0.06);
    --shadow-floating: 0 20px 45px -10px rgba(6, 78, 59, 0.12);
    --shadow-button: 0 15px 35px rgba(4, 120, 87, 0.35);
}

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

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-outside);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    -webkit-font-smoothing: antialiased;
}

#mobile-frame {
    width: 100%;
    max-width: 430px;
    height: 100vh;
    background: radial-gradient(circle at 50% 0%, #f4f8f5 0%, #fcfbf7 70%);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

@media (min-width: 480px) {
    #mobile-frame {
        height: 88vh;
        max-height: 880px;
        border-radius: 40px;
        border: 10px solid #0f172a;
        box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.4);
    }
}

/* Luxury Background Elements & Islamic Geometric Subtle Glow */
.background-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.45;
    animation: float 12s infinite ease-in-out alternate;
}

.blob-1 {
    top: -12%;
    left: -15%;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.25) 0%, rgba(251, 191, 36, 0.1) 100%);
}

.blob-2 {
    bottom: -15%;
    right: -15%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(4, 120, 87, 0.2) 0%, rgba(217, 119, 6, 0.08) 100%);
    animation-delay: -6s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(35px, 25px) scale(1.08); }
}

/* Header Section */
.app-header {
    padding: 1.5rem 1.5rem 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 10;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}

.logo-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.3), rgba(6, 78, 59, 0.1));
}

.logo {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-dark);
    letter-spacing: 2px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 4px;
}

.logo::after {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    background-color: var(--gold);
    border-radius: 50%;
}

/* Info Modal Trigger Button on Top Left */
#info-btn {
    position: absolute;
    left: 1.25rem;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-dark);
    box-shadow: var(--shadow-soft);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#info-btn:hover {
    transform: scale(1.1);
    color: var(--primary);
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(6, 78, 59, 0.15);
}

/* Favorite Modal Trigger Button */
#favorite-btn {
    position: absolute;
    right: 1.25rem;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-dark);
    box-shadow: var(--shadow-soft);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#favorite-btn:hover {
    transform: scale(1.1);
    color: var(--gold);
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(217, 119, 6, 0.2);
}

/* Layout Container */
.container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 1rem 1.25rem 2rem;
    position: relative;
    z-index: 5;
}

.content-wrapper {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Glass Floating Main Card */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1.5px solid var(--glass-border);
    border-radius: 32px;
    padding: 2.25rem 1.75rem;
    box-shadow: var(--shadow-floating);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.glass-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0.7;
}

/* Arabic Calligraphy Title */
.hero-title {
    font-family: 'Amiri', serif;
    font-size: 3.25rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 0.25rem;
    color: var(--primary-dark);
    text-shadow: 0 2px 10px rgba(6, 78, 59, 0.08);
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    letter-spacing: 0.2px;
}

/* Social Proof Badge */
.social-proof {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(4, 120, 87, 0.08);
    border: 1px solid rgba(4, 120, 87, 0.15);
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 0.78rem;
    color: var(--primary-dark);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.proof-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary);
    display: inline-block;
    animation: pulse 2s infinite;
}

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

/* Header Action Buttons */
.header-action-btn {
    background: rgba(6, 78, 59, 0.06);
    border: none;
    color: var(--text-main);
    padding: 10px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-action-btn:hover {
    background: rgba(6, 78, 59, 0.12);
    transform: translateY(-1px);
}

/* Share Toast */
.share-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-dark);
    color: white;
    padding: 10px 22px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 1000;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    opacity: 0;
    transition: opacity 0.3s;
}

.share-toast.show {
    opacity: 1;
}

/* Platform Logos */
.platforms-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 8px;
    padding: 8px 0 4px;
}

.platform-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 8px;
    background: rgba(4, 120, 87, 0.06);
    border: 1px solid rgba(4, 120, 87, 0.1);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s;
}

.platform-pill:hover {
    background: rgba(4, 120, 87, 0.12);
    color: var(--primary-dark);
    border-color: rgba(4, 120, 87, 0.2);
}

.platform-pill-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    display: inline-block;
}

/* Supported Platforms (main UI) */
.platforms-supported {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 1.5rem;
}

.ps-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-right: 2px;
}

.ps-tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: white;
}

.ps-tag.yt { background: #ff0000; }
.ps-tag.ig { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.ps-tag.tw { background: #1da1f2; }
.ps-tag.tk { background: #010101; }
.ps-tag.fb { background: #1877f2; }

/* Premium URL Input Group */
.input-group {
    display: flex;
    position: relative;
    margin-bottom: 1.25rem;
}

.input-icon-left {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

#link-input {
    width: 100%;
    height: 56px;
    padding: 0.85rem 1.25rem 0.85rem 3.1rem;
    border-radius: 999px;
    border: 1.5px solid rgba(6, 78, 59, 0.15);
    font-size: 0.95rem;
    font-family: inherit;
    font-weight: 500;
    outline: none;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-main);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

#link-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

#link-input:focus {
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15), 0 8px 20px rgba(6, 78, 59, 0.06);
}

/* Status Indicator */
.status-container {
    margin-bottom: 1.5rem;
    min-height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#app-status {
    color: var(--text-muted);
    font-size: 0.92rem;
    font-weight: 600;
    transition: color 0.3s ease;
    line-height: 1.4;
}

/* Tactile Main Action Button */
.action-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.action-btn {
    position: relative;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, #047857 0%, #059669 50%, #10b981 100%);
    color: white;
    font-family: inherit;
    cursor: pointer;
    box-shadow: var(--shadow-button);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    animation: luxury-pulse 3s infinite;
}

@keyframes luxury-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 18px rgba(5, 150, 105, 0);
        transform: scale(1.025);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(5, 150, 105, 0);
        transform: scale(1);
    }
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.35), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.action-btn:hover:not(.downloading) {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 22px 45px rgba(4, 120, 87, 0.45);
}

.action-btn:active:not(.downloading) {
    transform: scale(0.96);
}

.action-btn .btn-icon {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.action-btn.downloading {
    background: linear-gradient(135deg, #064e3b, #047857);
}

/* Spinner */
.spinner {
    position: absolute;
    width: 44px;
    height: 44px;
    border: 3.5px solid rgba(255, 255, 255, 0.25);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s infinite linear;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Available Downloads Section */
.results-panel {
    text-align: left;
    padding: 1.75rem 1.5rem;
}

.results-panel.hidden {
    display: none;
}

.results-title-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1.25rem;
}

.results-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-dark);
    letter-spacing: -0.2px;
}

.title-badge {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--gold);
    border-radius: 50%;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.download-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: #ffffff;
    border-radius: 20px;
    border: 1.5px solid rgba(6, 78, 59, 0.1);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 15px rgba(6, 78, 59, 0.03);
}

.download-option:hover {
    border-color: var(--primary);
    background: rgba(16, 185, 129, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(6, 78, 59, 0.1);
}

.opt-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.opt-quality {
    font-weight: 700;
    color: var(--primary-dark);
    font-size: 0.98rem;
}

.opt-size {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
}

.opt-icon {
    background: linear-gradient(135deg, #059669, #10b981);
    color: white;
    padding: 8px 16px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.2s;
}

.download-option:hover .opt-icon {
    transform: scale(1.05);
}

/* Footer Section */
footer {
    text-align: center;
    margin-top: auto;
    padding: 1.5rem 0 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
}

.footer-links a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.footer-sep {
    color: var(--text-muted);
    opacity: 0.4;
}

/* Modal Styles */
.modal-overlay, #support-modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content, #support-modal > div {
    background: #ffffff;
    padding: 28px 24px;
    border-radius: 28px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    border: 1.5px solid rgba(6, 78, 59, 0.12);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: modalSlide 0.3s ease-out;
}

@keyframes modalSlide {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 480px) {
    .action-btn {
        width: 145px;
        height: 145px;
    }
    
    .hero-title {
        font-size: 2.85rem;
    }
}

/* ========== PWA: Update Toast ========== */
.pwa-toast {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    animation: pwaSlideDown 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pwa-toast-content {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #064e3b;
    color: white;
    padding: 12px 16px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(6, 78, 59, 0.35);
    font-family: 'Outfit', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
}

.pwa-toast-icon {
    font-size: 1.2rem;
    animation: pwaSpin 2s linear infinite;
}

.pwa-toast-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
    transition: background 0.2s;
    font-family: 'Outfit', sans-serif;
}

.pwa-toast-btn:hover {
    background: #34d399;
}

.pwa-toast-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.pwa-toast-close:hover {
    color: white;
}

/* ========== PWA: Install Banner ========== */
.pwa-install-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9998;
    animation: pwaSlideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pwa-install-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    padding: 14px 18px;
    border-top: 2px solid rgba(4, 120, 87, 0.15);
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.12);
    font-family: 'Outfit', sans-serif;
}

.pwa-install-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pwa-install-icon {
    font-size: 1.5rem;
}

.pwa-install-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--primary-dark);
}

.pwa-install-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

.pwa-install-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pwa-install-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 18px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
    font-family: 'Outfit', sans-serif;
    box-shadow: 0 4px 12px rgba(4, 120, 87, 0.25);
}

.pwa-install-btn:hover {
    background: #059669;
}

.pwa-install-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.pwa-install-close:hover {
    color: var(--text-main);
}

/* ========== PWA: Offline Banner ========== */
.pwa-offline {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    background: #dc2626;
    color: white;
    text-align: center;
    padding: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    animation: pwaSlideDown 0.3s ease;
}

/* ========== PWA: Animations ========== */
@keyframes pwaSlideDown {
    from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes pwaSlideUp {
    from { opacity: 0; transform: translateY(100%); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pwaSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ========== PWA: Safe Area (Notch phones) ========== */
@supports (padding-top: env(safe-area-inset-top)) {
    .pwa-toast {
        top: calc(16px + env(safe-area-inset-top));
    }
    .pwa-offline {
        padding-top: calc(8px + env(safe-area-inset-top));
    }
    .pwa-install-banner {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* ========== Phase 5: Frontend Polish ========== */

/* Input Shake Animation (validation error) */
@keyframes inputShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
    20%, 40%, 60%, 80% { transform: translateX(4px); }
}

.input-shake {
    animation: inputShake 0.45s ease;
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15) !important;
}

/* Button Ripple Effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: rippleAnim 0.6s ease-out;
    pointer-events: none;
}

@keyframes rippleAnim {
    to { transform: scale(4); opacity: 0; }
}

/* Page Load Fade-in */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.glass-panel {
    animation: fadeInUp 0.5s ease-out both;
}

.main-panel {
    animation-delay: 0.1s;
}

.results-panel {
    animation: fadeInUp 0.4s ease-out both;
}

/* Results Panel Slide-in */
.results-panel.show {
    animation: slideInResults 0.35s ease-out both;
}

@keyframes slideInResults {
    from { opacity: 0; transform: translateY(12px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Better Focus Ring for Keyboard Navigation */
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 8px;
}

#link-input:focus-visible {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2), 0 8px 20px rgba(6, 78, 59, 0.06);
}

.action-btn:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 4px;
}

/* Better Download Button States */
.action-btn.loading .btn-icon {
    display: none;
}

.action-btn.loading::after {
    content: '';
    position: absolute;
    width: 44px;
    height: 44px;
    border: 3.5px solid rgba(255,255,255,0.25);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s infinite linear;
}

/* Smooth Status Transitions */
#app-status {
    transition: color 0.3s ease, transform 0.2s ease;
}

#app-status.status-error {
    color: #dc2626 !important;
    animation: inputShake 0.4s ease;
}

#app-status.status-success {
    color: #059669 !important;
}

/* Download Option Active State */
.download-option:active {
    transform: scale(0.98);
    background: rgba(16, 185, 129, 0.08);
}

/* Scrollbar Styling */
#mobile-frame::-webkit-scrollbar {
    width: 4px;
}

#mobile-frame::-webkit-scrollbar-track {
    background: transparent;
}

#mobile-frame::-webkit-scrollbar-thumb {
    background: rgba(6, 78, 59, 0.15);
    border-radius: 4px;
}

#mobile-frame::-webkit-scrollbar-thumb:hover {
    background: rgba(6, 78, 59, 0.25);
}

/* Header Action Button Positioned */
#info-btn {
    position: absolute;
    left: 1.25rem;
}

#share-btn {
    position: absolute;
    right: calc(1.25rem + 54px);
}

#favorite-btn {
    position: absolute;
    right: 1.25rem;
}

/* Platform Pills Responsive */
@media (max-width: 360px) {
    .platforms-section {
        gap: 6px;
    }
    .platform-pill {
        padding: 3px 7px;
        font-size: 0.68rem;
    }
}

/* Small Screen Polish */
@media (max-width: 380px) {
    .glass-panel {
        padding: 1.75rem 1.25rem;
        border-radius: 24px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.88rem;
    }
    
    .action-btn {
        width: 130px;
        height: 130px;
    }
    
    .social-proof {
        font-size: 0.72rem;
        padding: 4px 10px;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .action-btn {
        animation: none;
    }
    
    .proof-dot {
        animation: none;
    }
}
