/* =====================================================
   ZEVSAFE — PREMIUM UI STYLESHEET
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

/* ── TOKENS ────────────────────────────────────────── */
:root {
    --bg:          #08091a;
    --surface:     rgba(14, 16, 36, 0.7);
    --surface-2:   rgba(22, 26, 58, 0.55);
    --border:      rgba(255,255,255,0.07);
    --border-hover:rgba(255,255,255,0.14);

    --purple:      #8b5cf6;
    --purple-light:#a78bfa;
    --purple-dark: #6d28d9;
    --purple-glow: rgba(139, 92, 246, 0.35);

    --teal:        #14b8a6;
    --teal-light:  #2dd4bf;
    --teal-dark:   #0f766e;
    --teal-glow:   rgba(20, 184, 166, 0.3);

    --text:        #f1f5f9;
    --text-2:      #94a3b8;
    --text-3:      #64748b;

    --danger:      #f43f5e;
    --warn:        #f59e0b;
    --success:     #10b981;

    --radius-xl:   24px;
    --radius-lg:   18px;
    --radius-md:   12px;
    --radius-sm:   8px;
    --radius-pill: 999px;

    --font-display:'Outfit', system-ui, sans-serif;
    --font-body:   'Inter', system-ui, sans-serif;
    --font-mono:   'Courier New', Courier, monospace;

    --shadow-card: 0 24px 64px -12px rgba(0,0,0,0.7);
    --shadow-btn:  0 8px 24px -4px;
    --transition:  0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── RESET ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing:border-box; margin:0; padding:0; }

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ── AMBIENT ORBS ───────────────────────────────────── */
.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
    animation: floatOrb 20s ease-in-out infinite;
}

.orb-1 {
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(109,40,217,0.18) 0%, transparent 70%);
    top: -10%; left: -10%;
    animation-delay: 0s;
}
.orb-2 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(20,184,166,0.14) 0%, transparent 70%);
    bottom: 5%; right: -5%;
    animation-delay: -8s;
}
.orb-3 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(139,92,246,0.1) 0%, transparent 70%);
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    animation-delay: -14s;
}

@keyframes floatOrb {
    0%, 100% { transform: translate(0,0) scale(1); }
    33%       { transform: translate(30px, -40px) scale(1.05); }
    66%       { transform: translate(-20px, 30px) scale(0.97); }
}

/* Grain texture */
.noise {
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
    opacity: 0.025;
    pointer-events: none;
    z-index: 0;
}

/* ── SHELL ──────────────────────────────────────────── */
.app-shell {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem 5rem;
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

/* ── NAVBAR ─────────────────────────────────────────── */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    /* subtle frosted bar */
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(8,9,26,0.75);
    border-bottom: 1px solid var(--border);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.brand-icon {
    font-size: 1.4rem;
    filter: drop-shadow(0 0 10px rgba(139,92,246,0.6));
}

.brand-name {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #f1f5f9, var(--purple-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.navbar-links { display: flex; align-items: center; gap: 0.6rem; }

.nav-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-2);
    text-decoration: none;
    padding: 0.45rem 1rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.04);
    transition: var(--transition);
}

.nav-pill:hover {
    color: var(--text);
    background: rgba(139,92,246,0.12);
    border-color: rgba(139,92,246,0.35);
}

.nav-pill-ghost {
    background: transparent;
    border-color: transparent;
}

.nav-pill-ghost:hover {
    background: rgba(255,255,255,0.05);
    border-color: var(--border-hover);
}

/* ── HERO ───────────────────────────────────────────── */
.hero {
    text-align: center;
    padding-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--purple-light);
    background: rgba(139,92,246,0.1);
    border: 1px solid rgba(139,92,246,0.25);
    padding: 0.4rem 1.1rem;
    border-radius: var(--radius-pill);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.badge-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--purple-light);
    animation: pulseDot 2s ease-in-out infinite;
    flex-shrink: 0;
}

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

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1.1;
    color: var(--text);
}

.gradient-text {
    background: linear-gradient(135deg, var(--purple-light) 0%, var(--teal-light) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.hero-sub {
    font-size: 1.05rem;
    color: var(--text-2);
    max-width: 560px;
    line-height: 1.7;
    font-weight: 400;
}

.hero-tech-line {
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--text-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    padding: 0.55rem 1.4rem;
    border-radius: var(--radius-pill);
    letter-spacing: 0.01em;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
    transition: var(--transition);
}

.hero-tech-line:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-hover);
    color: var(--text);
}

.light-theme .hero-tech-line {
    background: rgba(15, 23, 42, 0.03);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.light-theme .hero-tech-line:hover {
    background: rgba(15, 23, 42, 0.06);
}

/* ── VAULT CARDS ─────────────────────────────────────── */
.cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

.vault-card {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-card);
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.vault-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 32px 80px -12px rgba(0,0,0,0.8);
}

.vault-card--encrypt:hover { border-color: rgba(139,92,246,0.3); }
.vault-card--decrypt:hover { border-color: rgba(20,184,166,0.25); }

/* Inner glow behind card */
.card-glow {
    position: absolute;
    top: -60px; left: 50%;
    transform: translateX(-50%);
    width: 300px; height: 200px;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.5s ease;
    opacity: 0.4;
}

.vault-card:hover .card-glow { opacity: 0.7; }

.card-glow--purple { background: radial-gradient(circle, rgba(139,92,246,0.5), transparent 70%); }
.card-glow--teal   { background: radial-gradient(circle, rgba(20,184,166,0.45), transparent 70%); }

.card-inner {
    position: relative;
    z-index: 1;
    padding: 2.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

.card-tag {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-pill);
    align-self: flex-start;
}

.card-tag--purple {
    color: var(--purple-light);
    background: rgba(139,92,246,0.12);
    border: 1px solid rgba(139,92,246,0.25);
}

.card-tag--teal {
    color: var(--teal-light);
    background: rgba(20,184,166,0.1);
    border: 1px solid rgba(20,184,166,0.25);
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.card-desc {
    font-size: 0.88rem;
    color: var(--text-2);
    line-height: 1.6;
    margin-top: -0.6rem;
}

.card-desc code {
    background: rgba(139,92,246,0.15);
    color: var(--purple-light);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.82em;
}

/* ── DROP ZONE ─────────────────────────────────────── */
.drop-zone {
    border: 1.5px dashed rgba(255,255,255,0.12);
    border-radius: var(--radius-lg);
    padding: 2rem 1rem 1.2rem;
    cursor: pointer;
    transition: all var(--transition);
    background: rgba(255,255,255,0.02);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    user-select: none;
}

.drop-zone:hover, .drop-zone:focus {
    border-color: rgba(139,92,246,0.4);
    background: rgba(139,92,246,0.04);
    outline: none;
}

.drop-zone.drag-over {
    border-color: var(--purple);
    background: rgba(139,92,246,0.08);
    transform: scale(1.015);
}

.vault-card--decrypt .drop-zone:hover,
.vault-card--decrypt .drop-zone:focus {
    border-color: rgba(20,184,166,0.4);
    background: rgba(20,184,166,0.04);
}

.vault-card--decrypt .drop-zone.drag-over {
    border-color: var(--teal);
    background: rgba(20,184,166,0.07);
}

.drop-zone-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    pointer-events: none;
}

.drop-icon-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.25rem;
}

.drop-icon {
    font-size: 2.4rem;
    z-index: 1;
    filter: drop-shadow(0 0 8px rgba(139,92,246,0.3));
}

.drop-ring {
    position: absolute;
    width: 60px; height: 60px;
    border-radius: 50%;
    border: 1.5px solid rgba(139,92,246,0.2);
    animation: spinRing 8s linear infinite;
}

.drop-ring--teal {
    border-color: rgba(20,184,166,0.2);
}

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

.drop-primary {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
}

.drop-secondary {
    font-size: 0.75rem;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

.btn-browse {
    display: inline-block;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--purple-light);
    background: rgba(139,92,246,0.12);
    border: 1px solid rgba(139,92,246,0.3);
    padding: 0.45rem 1.1rem;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: var(--transition);
    pointer-events: auto;
}

.btn-browse:hover {
    background: rgba(139,92,246,0.22);
    border-color: rgba(139,92,246,0.5);
}

.btn-browse--teal {
    color: var(--teal-light);
    background: rgba(20,184,166,0.1);
    border-color: rgba(20,184,166,0.3);
}

.btn-browse--teal:hover {
    background: rgba(20,184,166,0.18);
    border-color: rgba(20,184,166,0.5);
}

.drop-selected {
    font-size: 0.78rem;
    color: var(--success);
    font-weight: 600;
    text-align: center;
    word-break: break-all;
    min-height: 1.1rem;
    margin-top: 0.85rem;
    padding: 0 0.5rem;
}

/* ── FORM FIELDS ────────────────────────────────────── */
.field-group {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.field-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.field-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.field-icon {
    position: absolute;
    left: 1rem;
    font-size: 0.9rem;
    pointer-events: none;
    z-index: 1;
}

.field-input {
    width: 100%;
    background: rgba(8, 9, 26, 0.7);
    border: 1px solid rgba(255,255,255,0.09);
    color: var(--text);
    padding: 0.85rem 2.8rem 0.85rem 2.6rem;
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    font-family: var(--font-body);
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
    -webkit-appearance: none;
}

.field-input::placeholder { color: var(--text-3); }

.field-input:focus {
    outline: none;
    border-color: rgba(139,92,246,0.5);
    background: rgba(14,16,36,0.9);
    box-shadow: 0 0 0 3px rgba(139,92,246,0.15), inset 0 1px 0 rgba(255,255,255,0.05);
}

.vault-card--decrypt .field-input:focus {
    border-color: rgba(20,184,166,0.5);
    box-shadow: 0 0 0 3px rgba(20,184,166,0.12), inset 0 1px 0 rgba(255,255,255,0.05);
}

.toggle-pw {
    position: absolute;
    right: 0.85rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-3);
    transition: color var(--transition), opacity var(--transition);
    opacity: 0.5;
    padding: 0.25rem;
    border-radius: 4px;
}

.toggle-pw:hover { opacity: 1; color: var(--text-2); }

/* ── STRENGTH BAR ───────────────────────────────────── */
.strength-wrap {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: -0.2rem;
}

.strength-track {
    flex: 1;
    height: 4px;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0%;
    border-radius: 10px;
    transition: width 0.4s ease, background 0.4s ease;
}

.strength-label {
    font-size: 0.72rem;
    font-weight: 700;
    min-width: 60px;
    text-align: right;
    letter-spacing: 0.03em;
}

/* ── ALERT BOX ──────────────────────────────────────── */
.alert-box {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    background: rgba(20,184,166,0.06);
    border: 1px solid rgba(20,184,166,0.18);
    border-radius: var(--radius-md);
    padding: 0.9rem 1rem;
}

.alert-icon { font-size: 1rem; flex-shrink: 0; margin-top: 0.05rem; }

.alert-box p {
    font-size: 0.8rem;
    color: var(--text-2);
    line-height: 1.6;
}

/* ── BUTTONS ────────────────────────────────────────── */
.btn {
    position: relative;
    width: 100%;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
    letter-spacing: 0.01em;
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.btn:active:not(:disabled) {
    transform: translateY(1px);
    filter: brightness(0.95);
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    filter: none;
    transform: none;
}

.btn--purple {
    background: linear-gradient(135deg, #7c3aed, #8b5cf6, #a78bfa);
    background-size: 200% 200%;
    color: #fff;
    box-shadow: 0 8px 32px -4px rgba(109,40,217,0.5);
    animation: gradientShift 4s ease infinite;
}

.btn--purple:hover:not(:disabled) {
    box-shadow: 0 12px 40px -4px rgba(109,40,217,0.65);
}

.btn--teal {
    background: linear-gradient(135deg, #0f766e, #14b8a6, #2dd4bf);
    background-size: 200% 200%;
    color: #fff;
    box-shadow: 0 8px 32px -4px rgba(15,118,110,0.45);
    animation: gradientShift 4s ease infinite;
}

.btn--teal:hover:not(:disabled) {
    box-shadow: 0 12px 40px -4px rgba(20,184,166,0.55);
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50%       { background-position: 100% 50%; }
}

/* Shimmer sweep */
.btn-shimmer {
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg,
        transparent 35%,
        rgba(255,255,255,0.18) 50%,
        transparent 65%);
    background-size: 200% 100%;
    background-position: -100% 0;
    pointer-events: none;
    transition: background-position 0.6s ease;
}

.btn:hover .btn-shimmer {
    background-position: 200% 0;
}

.btn-content {
    position: relative;
    z-index: 1;
}

/* ── PROGRESS PANEL ─────────────────────────────────── */
.progress-panel {
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid rgba(139,92,246,0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-card);
}

.progress-panel-inner {
    background: rgba(10,11,28,0.85);
    padding: 1.75rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.progress-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.progress-status {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--purple-light);
    animation: pulseDot 1.5s ease-in-out infinite;
    flex-shrink: 0;
}

.progress-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
}

.progress-pct {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--purple-light);
    letter-spacing: -0.02em;
}

.progress-track {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--purple), var(--teal));
    transition: width 0.4s cubic-bezier(0.4,0,0.2,1);
    box-shadow: 0 0 10px rgba(139,92,246,0.5);
}

.log-console {
    background: rgba(4,5,15,0.9);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: var(--radius-md);
    padding: 1rem 1.1rem;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    line-height: 1.6;
}

.log-console::-webkit-scrollbar { width: 4px; }
.log-console::-webkit-scrollbar-thumb {
    background: rgba(139,92,246,0.35);
    border-radius: 4px;
}

.log-entry  { line-height: 1.5; }
.log-info   { color: var(--text-3); }
.log-success{ color: var(--success); font-weight: 600; }
.log-error  { color: var(--danger);  font-weight: 700; }
.log-warn   { color: var(--warn); }

/* ── HOW IT WORKS ───────────────────────────────────── */
.how-section {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.section-heading {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text);
}

.how-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.how-step {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.6rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    text-align: left;
    max-width: 210px;
    transition: border-color var(--transition), transform var(--transition);
    flex: 1;
    min-width: 160px;
}

.how-step:hover {
    border-color: rgba(139,92,246,0.25);
    transform: translateY(-3px);
}

.how-num {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: -0.05em;
    background: linear-gradient(135deg, var(--purple-light), var(--teal-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    margin-bottom: 0.75rem;
}

.how-body h3 {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.how-body p {
    font-size: 0.8rem;
    color: var(--text-2);
    line-height: 1.6;
}

.how-body code {
    background: rgba(139,92,246,0.12);
    color: var(--purple-light);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-size: 0.8em;
    font-family: var(--font-mono);
}

.how-arrow {
    font-size: 1.2rem;
    color: var(--text-3);
    flex-shrink: 0;
    margin-bottom: 1.5rem;
}

/* ── FOOTER ─────────────────────────────────────────── */
.site-footer {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    border-top: 1px solid var(--border);
    padding-top: 2.5rem;
}

.footer-brand {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--purple-light), var(--teal-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.footer-tagline {
    font-size: 0.88rem;
    color: var(--text-2);
    font-weight: 500;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    color: var(--text-3);
}

.footer-links a {
    color: var(--text-3);
    text-decoration: none;
    transition: color var(--transition);
}

.footer-links a:hover { color: var(--purple-light); }

.footer-copy {
    font-size: 0.75rem;
    color: var(--text-3);
}

.footer-copy strong { color: var(--text-2); }

/* =====================================================
   DEVICE BANNER
   ===================================================== */
.device-banner {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 9999;
    background: rgba(139,92,246,0.15);
    border-bottom: 1px solid rgba(139,92,246,0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0.65rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.82rem;
    color: var(--purple-light);
    font-weight: 500;
}

.device-banner-icon { font-size: 1rem; flex-shrink: 0; }

.device-banner-close {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-3);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    flex-shrink: 0;
}

/* =====================================================
   PHONE-ONLY HIDE UTILITY
   ===================================================== */
@media (max-width: 520px) {
    .phone-hide { display: none !important; }
}

/* =====================================================
   MOBILE TABS — Segmented control (phone only)
   ===================================================== */
.mobile-tabs {
    display: none;
    width: 100%;
    background: rgba(10, 11, 26, 0.8);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-pill);
    padding: 5px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.mobile-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: var(--text-3);
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0.72rem 1rem;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: color 0.2s ease;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    position: relative;
    z-index: 1;
}

.mobile-tab--active { color: #fff; }

.mobile-tab--active::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-pill);
    background: linear-gradient(135deg, #7c3aed, #8b5cf6);
    box-shadow: 0 4px 18px rgba(109,40,217,0.5);
    z-index: -1;
    animation: tabPop 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes tabPop {
    from { transform: scale(0.9); opacity: 0.6; }
    to   { transform: scale(1);   opacity: 1; }
}

.mobile-tab-icon  { font-size: 1.05rem; }
.mobile-tab-label { letter-spacing: 0.01em; }

/* =====================================================
   MOBILE FILE BUTTON (big tap-friendly, phone only)
   ===================================================== */
.mobile-file-btn {
    display: none; /* shown by JS on mobile */
    align-items: center;
    gap: 1rem;
    background: rgba(139,92,246,0.08);
    border: 2px dashed rgba(139,92,246,0.35);
    border-radius: var(--radius-lg);
    padding: 1.2rem 1.4rem;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    text-align: left;
    -webkit-tap-highlight-color: transparent;
}

.mobile-file-btn:active {
    background: rgba(139,92,246,0.18);
    transform: scale(0.98);
}

.mobile-file-btn--teal {
    background: rgba(20,184,166,0.07);
    border-color: rgba(20,184,166,0.3);
}

.mobile-file-btn--teal:active {
    background: rgba(20,184,166,0.16);
}

.mfb-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.mfb-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.mfb-text strong {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--purple-light);
}

.mobile-file-btn--teal .mfb-text strong { color: var(--teal-light); }

.mfb-text small {
    font-size: 0.78rem;
    color: var(--text-3);
    font-weight: 400;
}

/* =====================================================
   BOTTOM NAVIGATION BAR (native app style, phone only)
   ===================================================== */
.bottom-nav {
    display: none; /* shown by JS on mobile */
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(10,11,28,0.92);
    border-top: 1px solid var(--border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0.5rem 0;
    padding-bottom: env(safe-area-inset-bottom, 0.5rem);
    display: none;
    justify-content: space-around;
    align-items: center;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    background: none;
    border: none;
    color: var(--text-3);
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    cursor: pointer;
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: color var(--transition);
    -webkit-tap-highlight-color: transparent;
    min-width: 64px;
    touch-action: manipulation;
}

.bottom-nav-item--active {
    color: var(--purple-light);
}

.bottom-nav-item:active {
    color: var(--text);
    background: rgba(255,255,255,0.06);
}

.bnav-icon { font-size: 1.4rem; line-height: 1; }
.bnav-label { letter-spacing: 0.02em; }

/* =====================================================
   RESPONSIVE — DESKTOP (820px+)
   ===================================================== */
@media (min-width: 821px) {
    /* Hide mobile-only elements on desktop */
    .mobile-tabs,
    .mobile-file-btn,
    .bottom-nav,
    .device-banner { display: none !important; }

    /* Normal two-column grid */
    .cards-grid { grid-template-columns: 1fr 1fr; }
}

/* =====================================================
   RESPONSIVE — TABLET (521px–820px)
   ===================================================== */
@media (max-width: 820px) {
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .how-steps { flex-direction: column; align-items: stretch; }
    .how-step  { max-width: 100%; }
    .how-arrow { transform: rotate(90deg); align-self: center; margin-bottom: 0; }
    .hero-title { font-size: clamp(2rem, 7vw, 2.8rem); }
}

/* =====================================================
   RESPONSIVE — PHONE (≤520px)
   ===================================================== */
@media (max-width: 520px) {
    /* Compact shell layout */
    .app-shell {
        padding: 0 0.9rem;
        padding-bottom: 3rem;
        gap: 1.5rem;
    }

    /* Hide hero text to keep top clean */
    .hero { display: none !important; }

    /* Hide desktop browse elements in drop-zones so they are clean tap-only targets */
    .btn-browse,
    .drop-secondary {
        display: none !important;
    }

    /* Compact navbar */
    .navbar { padding: 1rem 0.9rem; }
    .navbar-links .nav-pill-ghost { display: none; }
    .brand-name { font-size: 1.05rem; }

    /* Show mobile tabs */
    .mobile-tabs { display: flex; }

    /* Card adjustments */
    .card-inner { padding: 1.5rem; gap: 1.2rem; }
    .card-title { font-size: 1.35rem; }

    /* Bigger touch inputs */
    .field-input {
        padding: 1rem 2.8rem 1rem 2.6rem;
        font-size: 1rem;
        border-radius: var(--radius-md);
    }

    /* Bigger buttons */
    .btn { padding: 1.05rem 1.5rem; font-size: 1rem; }

    /* Bigger toggle */
    .toggle-pw { font-size: 1.1rem; right: 0.9rem; }

    /* Hide how section on very small phones */
    .how-section { display: none; }

    /* Compact footer */
    .site-footer { padding-top: 1.5rem; }
    .footer-links span:last-child { display: none; }

    /* Snap single panel with tab switching */
    #decrypt-section { display: none; }
    #encrypt-section { display: block; }
}

/* =====================================================
   TOUCH OPTIMIZATIONS (all touch devices)
   ===================================================== */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects that don't work on touch */
    .vault-card:hover { transform: none; }
    .btn:hover:not(:disabled) { transform: none; filter: none; }

    /* Bigger tap targets */
    .toggle-pw { padding: 0.5rem; }
    .nav-pill  { padding: 0.55rem 1.1rem; }

    /* Disable shimmer animation (perf on mobile) */
    .btn-shimmer { display: none; }

    /* Faster transitions for mobile */
    * { transition-duration: 0.15s !important; }

    /* Active states for touch */
    .btn:active:not(:disabled) {
        transform: scale(0.97) !important;
        filter: brightness(0.92) !important;
    }

    .nav-pill:active { opacity: 0.7; }
    .mobile-tab:active { opacity: 0.7; }
}

/* =====================================================
   LIGHT THEME VARIABLES
   ===================================================== */
:root.light-theme {
    --bg:          #f8fafc;
    --surface:     rgba(255, 255, 255, 0.75);
    --surface-2:   rgba(241, 245, 249, 0.85);
    --border:      rgba(15, 23, 42, 0.08);
    --border-hover:rgba(15, 23, 42, 0.16);
    --text:        #0f172a;
    --text-2:      #475569;
    --text-3:      #94a3b8;
    --shadow-card: 0 12px 32px -4px rgba(15, 23, 42, 0.08);
    --purple-light: #7c3aed;
    --teal-light:   #0d9488;
}



/* =====================================================
   PASSWORD SAVE MODAL
   ===================================================== */
.pw-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(4, 5, 15, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.25s ease;
}

.pw-modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 440px;
    box-shadow: var(--shadow-card);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: modalSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.pw-modal-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pw-modal-icon {
    font-size: 1.6rem;
    filter: drop-shadow(0 0 8px rgba(139,92,246,0.5));
}

.pw-modal-header h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text);
}

.pw-modal-warning {
    background: rgba(244, 63, 94, 0.08);
    border: 1px solid rgba(244, 63, 94, 0.2);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    font-size: 0.82rem;
    color: #fda4af;
    line-height: 1.5;
}

.light-theme .pw-modal-warning {
    background: rgba(244, 63, 94, 0.05);
    border-color: rgba(244, 63, 94, 0.15);
    color: #e11d48;
}

.pw-display-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pw-display-group label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pw-display-wrapper {
    display: flex;
    gap: 0.5rem;
}

#pw-save-display {
    flex: 1;
    background: rgba(8, 9, 26, 0.6);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-family: var(--font-mono);
    outline: none;
    letter-spacing: 0.05em;
}

.light-theme #pw-save-display {
    background: rgba(0, 0, 0, 0.02);
}

#btn-copy-pw {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    color: var(--text-2);
    border-radius: var(--radius-md);
    padding: 0.75rem 1.1rem;
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

#btn-copy-pw:hover {
    background: rgba(255,255,255,0.12);
    color: var(--text);
    border-color: var(--border-hover);
}

.light-theme #btn-copy-pw {
    background: rgba(0, 0, 0, 0.03);
}

.light-theme #btn-copy-pw:hover {
    background: rgba(0, 0, 0, 0.06);
}

.pw-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.pw-modal-btn {
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.pw-modal-btn--secondary {
    background: transparent;
    color: var(--text-2);
    border: 1px solid var(--border);
}

.pw-modal-btn--secondary:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text);
    border-color: var(--border-hover);
}

.light-theme .pw-modal-btn--secondary:hover {
    background: rgba(0,0,0,0.03);
}

.pw-modal-btn--primary {
    background: linear-gradient(135deg, #7c3aed, #8b5cf6);
    color: #fff;
    box-shadow: 0 4px 12px rgba(109,40,217,0.3);
}

.pw-modal-btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(109,40,217,0.45);
}

/* =====================================================
   SELECTED FILES WIDGET (dashboard control for uploads)
   ===================================================== */
.selected-files-widget {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    width: 100%;
    max-width: 320px;
    animation: widgetFadeIn 0.2s ease;
    z-index: 5;
    pointer-events: auto;
}

@keyframes widgetFadeIn {
    from { opacity: 0; transform: scale(0.97); }
    to { opacity: 1; transform: scale(1); }
}

.light-theme .selected-files-widget {
    background: rgba(0, 0, 0, 0.02);
}

.sf-icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 0 8px rgba(139,92,246,0.3));
    flex-shrink: 0;
}

.vault-card--decrypt .sf-icon {
    filter: drop-shadow(0 0 8px rgba(20,184,166,0.3));
}

.sf-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1;
    text-align: left;
    min-width: 0; /* allows text truncation */
}

.sf-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sf-meta {
    font-size: 0.75rem;
    color: var(--text-2);
    font-weight: 500;
}

.sf-clear-btn {
    background: none;
    border: none;
    color: var(--text-3);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    width: 24px; height: 24px;
    flex-shrink: 0;
}

.sf-clear-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--danger);
}

.light-theme .sf-clear-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

