:root {
    --pp-navy: #001c64;
    --pp-blue: #0070ba;
    --pp-cyan: #009cde;
    --pp-gold: #ffc439;
    --pp-gold-hover: #f2ba36;
    --bg-dark: #070b14;
    --card-surface: rgba(13, 21, 38, 0.86);
    --sheet-bg: #0f172a;
    --border-light: rgba(255, 255, 255, 0.14);
    --green-ok: #10b981;
    --danger-red: #ef4444;
    --text-main: #ffffff;
    --text-muted: #94a3b8;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #000;
    color: var(--text-main);
    width: 100vw;
    height: 100dvh;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

.app-shell {
    position: relative;
    width: 100%;
    max-width: 480px;
    height: 100dvh;
    background: radial-gradient(circle at 50% 18%, #003087 0%, #070b14 78%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

/* HEADER */
.pp-header {
    margin: 12px 14px 0;
    padding: 10px 14px;
    border-radius: 20px;
    background: var(--card-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 25;
}

.pp-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pp-logo {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--pp-blue), var(--pp-cyan));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
    box-shadow: 0 4px 14px rgba(0, 156, 222, 0.45);
}

.pp-title-box h1 {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.3px;
}

.pp-title-box h1 span {
    color: var(--pp-gold);
}

.pp-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-muted);
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--pp-gold);
}

.status-dot.connected {
    background: var(--green-ok);
    box-shadow: 0 0 8px var(--green-ok);
}

.pp-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wallet-pill {
    background: rgba(0, 156, 222, 0.16);
    border: 1px solid rgba(0, 156, 222, 0.4);
    padding: 6px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
    color: #e0f2fe;
}

.header-icon-btn {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    border: 1px solid var(--border-light);
    background: rgba(255, 255, 255, 0.06);
    color: white;
    font-size: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.count-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--pp-gold);
    color: #001c64;
    font-size: 10px;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 8px;
}

/* AI SENSOR PILL */
.ai-sensor-pill {
    position: absolute;
    top: 74px;
    left: 14px;
    background: var(--card-surface);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-light);
    padding: 8px 12px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 20;
}

.sensor-emoji { font-size: 20px; }
.sensor-meta { display: flex; flex-direction: column; }
.sensor-meta strong { font-size: 11px; color: #fff; }
.sensor-meta span { font-size: 10px; color: var(--text-muted); }

/* TRANSFER ALERT BANNER */
.transfer-banner {
    position: absolute;
    top: 78px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    background: linear-gradient(135deg, #003087, #0070ba);
    border: 1.5px solid var(--pp-gold);
    padding: 12px 16px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 45;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.65);
    animation: dropIn 0.35s ease-out;
}

@keyframes dropIn {
    from { transform: translate(-50%, -30px); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

.transfer-check {
    font-size: 28px;
    color: var(--pp-gold);
}

.transfer-info h4 { font-size: 14px; font-weight: 800; }
.transfer-info p { font-size: 12px; color: #e2e8f0; }

/* MAIN VIDEO CALL STAGE */
.video-viewport {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.remote-video-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remote-video-wrap video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.remote-video-wrap.mirrored video {
    transform: scaleX(-1);
}

/* LOBBY CARD */
.lobby-card {
    width: 88%;
    padding: 24px 20px;
    border-radius: 24px;
    background: var(--card-surface);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-light);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5);
}

.lobby-badge {
    background: rgba(255, 196, 57, 0.15);
    border: 1px solid rgba(255, 196, 57, 0.4);
    color: var(--pp-gold);
    font-size: 11px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.lobby-card h2 {
    font-size: 21px;
    font-weight: 800;
}

.lobby-card p {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

.room-box {
    width: 100%;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    padding: 4px 6px 4px 12px;
    margin: 4px 0;
}

.room-prefix {
    font-size: 11px;
    font-weight: 700;
    color: var(--pp-cyan);
    padding-right: 8px;
    border-right: 1px solid var(--border-light);
}

.room-box input {
    flex: 1;
    padding: 10px;
    background: transparent;
    border: none;
    color: white;
    font-size: 14px;
    font-weight: 600;
    outline: none;
}

.copy-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 16px;
    cursor: pointer;
}

.pp-btn-primary {
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, var(--pp-blue), var(--pp-cyan));
    color: white;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 112, 186, 0.4);
}

.pp-btn-secondary {
    width: 100%;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid var(--border-light);
    background: rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
}

/* LOCAL PIP VIDEO */
.local-pip {
    position: absolute;
    bottom: 94px;
    right: 14px;
    width: 100px;
    height: 145px;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid var(--pp-gold);
    background: #111;
    z-index: 15;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65);
    cursor: pointer;
    transition: all 0.25s ease;
}

.local-pip.left-side {
    right: auto;
    left: 14px;
}

.local-pip video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transform: scaleX(-1);
}

.pip-badge {
    position: absolute;
    bottom: 6px;
    left: 8px;
    background: rgba(0, 0, 0, 0.65);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 6px;
    z-index: 4;
}

/* QUICK SIDEBAR */
.quick-sidebar {
    position: absolute;
    right: 14px;
    top: 43%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 20;
}

.react-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--border-light);
    background: var(--card-surface);
    backdrop-filter: blur(10px);
    font-size: 18px;
    cursor: pointer;
}

.floating-heart {
    position: absolute;
    bottom: 90px;
    right: 25px;
    font-size: 28px;
    pointer-events: none;
    z-index: 35;
    animation: riseUp 2.2s ease-out forwards;
}

@keyframes riseUp {
    0% { transform: translateY(0) scale(0.8); opacity: 1; }
    100% { transform: translateY(-340px) translateX(-25px) scale(1.4); opacity: 0; }
}

/* BOTTOM DOCK */
.pp-bottom-dock {
    margin: 0 14px 14px;
    padding: 10px 12px;
    border-radius: 24px;
    background: var(--card-surface);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    z-index: 25;
}

.dock-circle-btn {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 1px solid var(--border-light);
    background: rgba(255, 255, 255, 0.08);
    color: white;
    font-size: 19px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.dock-circle-btn.muted {
    background: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}

.dock-circle-btn.danger {
    background: rgba(239, 68, 68, 0.22);
    border-color: rgba(239, 68, 68, 0.4);
    color: #f87171;
}

.pp-send-hero {
    flex: 1;
    height: 46px;
    border-radius: 16px;
    border: none;
    background: var(--pp-gold);
    color: var(--pp-navy);
    font-weight: 800;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(255, 196, 57, 0.4);
}

/* SHEETS & DRAWERS */
.sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    z-index: 50;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.center-popup {
    justify-content: center;
    align-items: center;
    padding: 18px;
}

.pp-sheet {
    background: var(--sheet-bg);
    border-top: 1px solid var(--border-light);
    border-radius: 28px 28px 0 0;
    padding: 14px 18px 24px;
    max-height: 84dvh;
    overflow-y: auto;
    animation: sheetUp 0.25s ease-out;
}

@keyframes sheetUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.sheet-drag-bar {
    width: 38px;
    height: 4px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    margin: 0 auto 12px;
}

.sheet-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
}

.pp-sheet-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pp-sheet-title i {
    font-size: 24px;
    color: var(--pp-cyan);
}

.pp-sheet-title h3 { font-size: 17px; font-weight: 800; }
.pp-sheet-title p { font-size: 11px; color: var(--text-muted); }

.sheet-close {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 18px;
    cursor: pointer;
}

/* PAYPAL AMOUNT DISPLAY */
.pp-amount-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-light);
    border-radius: 18px;
    padding: 10px 16px;
    margin-bottom: 12px;
}

.currency-sign {
    font-size: 26px;
    font-weight: 800;
    color: var(--pp-cyan);
}

.pp-amount-display input {
    width: 120px;
    background: transparent;
    border: none;
    color: white;
    font-size: 32px;
    font-weight: 800;
    text-align: center;
    outline: none;
}

.currency-code {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
}

.gift-chips {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.gift-chip {
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid var(--border-light);
    border-radius: 14px;
    padding: 8px 4px;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    cursor: pointer;
}

.gift-chip.active {
    background: rgba(0, 156, 222, 0.22);
    border-color: var(--pp-cyan);
}

.gift-chip span { font-size: 13px; font-weight: 800; }
.gift-chip small { font-size: 10px; color: var(--text-muted); }

.pp-note-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 0 12px;
    margin-bottom: 12px;
}

.pp-note-box i { color: var(--pp-gold); font-size: 18px; }
.pp-note-box input {
    width: 100%;
    padding: 11px 8px;
    background: transparent;
    border: none;
    color: white;
    font-size: 13px;
    outline: none;
}

.pp-gold-btn {
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    border: none;
    background: var(--pp-gold);
    color: var(--pp-navy);
    font-weight: 800;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(255, 196, 57, 0.35);
}

.sdk-divider {
    text-align: center;
    margin: 10px 0;
    font-size: 11px;
    color: var(--text-muted);
}

.paypal-sdk-box {
    min-height: 44px;
}

/* POLAROID CARD */
.polaroid-modal {
    width: 100%;
    max-width: 325px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.polaroid-card {
    background: #ffffff;
    color: #0f172a;
    padding: 12px 12px 18px;
    border-radius: 10px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
    transform: rotate(-1deg);
}

.polaroid-photo-box {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    background: #0f172a;
    border-radius: 6px;
    overflow: hidden;
}

.polaroid-photo-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pp-verified-pill {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--pp-blue);
    color: white;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.polaroid-text-area {
    margin-top: 12px;
    text-align: center;
}

#polaroid-caption {
    font-family: 'Caveat', cursive;
    font-size: 23px;
    line-height: 1.15;
    color: #0f172a;
    margin-bottom: 8px;
}

.polaroid-footer-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    border-top: 1px solid #e2e8f0;
    padding-top: 6px;
}

.polaroid-action-row {
    display: flex;
    gap: 8px;
}

/* VAULT & KEY FORM */
.vault-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.vault-item {
    background: white;
    color: #0f172a;
    padding: 6px 6px 10px;
    border-radius: 6px;
}

.vault-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 4px;
}

.vault-item p {
    font-family: 'Caveat', cursive;
    font-size: 15px;
    text-align: center;
    margin-top: 4px;
}

.empty-msg {
    grid-column: span 2;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    padding: 20px 0;
}

.key-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.key-form label {
    font-size: 12px;
    font-weight: 700;
}

.key-form input {
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    background: rgba(0, 0, 0, 0.4);
    color: white;
    font-size: 13px;
    outline: none;
}

.hidden {
    display: none !important;
}
