anycoder-80741399 / index.html
R3D3R's picture
Upload folder using huggingface_hub
21f634e verified
Raw History Blame Contribute Delete
34.8 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Fortress — Secure Password Manager</title>
<script src="https://cdn.tailwindcss.com"></script>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<script>
tailwind.config = {
darkMode: 'class',
theme: {
extend: {
fontFamily: {
sans: ['Inter', 'system-ui', 'sans-serif'],
mono: ['JetBrains Mono', 'monospace'],
},
colors: {
brand: {
50: '#f0f4ff',
100: '#dfe7ff',
200: '#c4d2ff',
300: '#9eb2ff',
400: '#7788ff',
500: '#5a62f2',
600: '#4a42e8',
700: '#3d32ce',
800: '#322ba7',
900: '#2b2883',
950: '#1a1850',
},
slate: {
850: '#151b2b',
900: '#0f172a',
950: '#070b14',
}
},
boxShadow: {
'glow-sm': '0 0 15px rgba(90, 98, 242, 0.3)',
'glow-md': '0 0 25px rgba(90, 98, 242, 0.4)',
'glow-lg': '0 0 40px rgba(90, 98, 242, 0.5)',
'card': '0 4px 24px rgba(0, 0, 0, 0.25)',
'card-hover': '0 8px 40px rgba(0, 0, 0, 0.35)',
'floating': '0 20px 60px rgba(0, 0, 0, 0.4)',
},
animation: {
'fade-in': 'fadeIn 0.4s ease-out forwards',
'slide-up': 'slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards',
'slide-in-right': 'slideInRight 0.3s ease-out forwards',
'pulse-glow': 'pulseGlow 2s ease-in-out infinite',
'spin-slow': 'spin 3s linear infinite',
'bounce-soft': 'bounceSoft 2s ease-in-out infinite',
'shimmer': 'shimmer 2s linear infinite',
'confetti': 'confettiFall 1s ease-out forwards',
},
keyframes: {
fadeIn: {
'0%': { opacity: '0' },
'100%': { opacity: '1' },
},
slideUp: {
'0%': { opacity: '0', transform: 'translateY(24px) scale(0.97)' },
'100%': { opacity: '1', transform: 'translateY(0) scale(1)' },
},
slideInRight: {
'0%': { opacity: '0', transform: 'translateX(20px)' },
'100%': { opacity: '1', transform: 'translateX(0)' },
},
pulseGlow: {
'0%, 100%': { boxShadow: '0 0 15px rgba(90, 98, 242, 0.2)' },
'50%': { boxShadow: '0 0 25px rgba(90, 98, 242, 0.5)' },
},
bounceSoft: {
'0%, 100%': { transform: 'translateY(0)' },
'50%': { transform: 'translateY(-6px)' },
},
shimmer: {
'0%': { backgroundPosition: '-200% 0' },
'100%': { backgroundPosition: '200% 0' },
},
confettiFall: {
'0%': { opacity: '1', transform: 'translateY(0) rotate(0deg)' },
'100%': { opacity: '0', transform: 'translateY(-40px) rotate(360deg)' },
},
},
}
}
}
</script>
<style>
:root {
--bg-primary: #070b14;
--bg-secondary: #0f172a;
--bg-tertiary: #151b2b;
--bg-elevated: #1a2235;
--bg-card: #131d2e;
--border-subtle: rgba(148, 163, 184, 0.08);
--border-default: rgba(148, 163, 184, 0.12);
--border-hover: rgba(148, 163, 184, 0.2);
--text-primary: #f1f5f9;
--text-secondary: #94a3b8;
--text-muted: #64748b;
--brand: #5a62f2;
--brand-soft: rgba(90, 98, 242, 0.1);
}
* {
scrollbar-width: thin;
scrollbar-color: var(--bg-elevated) var(--bg-primary);
}
*::-webkit-scrollbar {
width: 6px;
height: 6px;
}
*::-webkit-scrollbar-track {
background: var(--bg-primary);
}
*::-webkit-scrollbar-thumb {
background: var(--bg-elevated);
border-radius: 99px;
}
*::-webkit-scrollbar-thumb:hover {
background: var(--border-hover);
}
body {
font-family: 'Inter', system-ui, sans-serif;
background: var(--bg-primary);
color: var(--text-primary);
overflow: hidden;
}
/* Noise overlay */
.noise-overlay {
position: fixed;
inset: 0;
pointer-events: none;
z-index: 9999;
opacity: 0.025;
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)'/%3E%3C/svg%3E");
}
/* Background effects */
.bg-mesh {
position: fixed;
inset: 0;
pointer-events: none;
z-index: 0;
}
.bg-mesh::before {
content: '';
position: absolute;
top: -50%;
right: -30%;
width: 70%;
height: 100%;
background: radial-gradient(ellipse, rgba(90, 98, 242, 0.08) 0%, transparent 70%);
filter: blur(60px);
}
.bg-mesh::after {
content: '';
position: absolute;
bottom: -30%;
left: -20%;
width: 60%;
height: 80%;
background: radial-gradient(ellipse, rgba(244, 63, 94, 0.04) 0%, transparent 70%);
filter: blur(60px);
}
/* Glass cards */
.glass {
background: rgba(15, 23, 42, 0.6);
backdrop-filter: blur(20px);
border: 1px solid var(--border-default);
}
.glass-strong {
background: rgba(15, 23, 42, 0.85);
backdrop-filter: blur(30px) saturate(1.5);
border: 1px solid var(--border-hover);
}
.glass-card {
background: linear-gradient(145deg, rgba(26, 34, 53, 0.6), rgba(19, 29, 46, 0.5));
backdrop-filter: blur(16px);
border: 1px solid var(--border-default);
transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.glass-card:hover {
background: linear-gradient(145deg, rgba(26, 34, 53, 0.8), rgba(19, 29, 46, 0.7));
border-color: var(--border-hover);
transform: translateY(-2px);
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 1px rgba(90, 98, 242, 0.2);
}
/* Sidebar styling */
.sidebar-item {
position: relative;
transition: all 0.25s ease;
}
.sidebar-item::before {
content: '';
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%) scaleY(0);
width: 3px;
height: 60%;
border-radius: 0 4px 4px 0;
background: var(--brand);
transition: transform 0.25s ease;
}
.sidebar-item.active::before {
transform: translateY(-50%) scaleY(1);
}
.sidebar-item.active {
background: var(--brand-soft);
color: var(--brand);
}
.sidebar-item:hover:not(.active) {
background: rgba(148, 163, 184, 0.04);
color: var(--text-primary);
}
/* Password dots */
.password-dots span {
display: inline-block;
width: 6px;
height: 6px;
border-radius: 50%;
background: var(--text-muted);
margin-right: 3px;
transition: all 0.2s ease;
}
.password-dots:hover span {
background: var(--text-secondary);
width: 5px;
height: 5px;
}
/* Copy button feedback */
.copy-feedback {
animation: popCheck 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes popCheck {
0% { transform: scale(1); }
30% { transform: scale(1.4); }
50% { transform: scale(0.9); }
100% { transform: scale(1); }
}
/* Strength bar */
.strength-track {
background: rgba(148, 163, 184, 0.1);
border-radius: 99px;
overflow: hidden;
}
.strength-fill {
height: 100%;
border-radius: 99px;
transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease;
}
/* Progress ring */
.progress-ring {
transform: rotate(-90deg);
}
.progress-ring-circle {
transition: stroke-dashoffset 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
/* Modal animations */
.modal-enter {
animation: modalIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.modal-backdrop-enter {
animation: backdropIn 0.3s ease forwards;
}
@keyframes modalIn {
from { opacity: 0; transform: translateY(20px) scale(0.96); }
to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes backdropIn {
from { opacity: 0; }
to { opacity: 1; }
}
/* Input styling */
.fancy-input {
background: rgba(148, 163, 184, 0.04);
border: 1px solid var(--border-default);
transition: all 0.25s ease;
}
.fancy-input:focus {
background: rgba(148, 163, 184, 0.06);
border-color: var(--brand);
box-shadow: 0 0 0 3px var(--brand-soft);
outline: none;
}
/* Toggle switch */
.toggle-track {
transition: background-color 0.3s ease;
}
.toggle-thumb {
transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
/* Checkbox */
.check-box {
transition: all 0.2s ease;
}
.check-box.checked {
background: var(--brand);
border-color: var(--brand);
}
/* Category badges */
.cat-badge {
transition: all 0.2s ease;
}
.cat-badge:hover {
filter: brightness(1.3);
}
/* Tag */
.tag-pill {
transition: all 0.2s ease;
}
.tag-pill:hover {
filter: brightness(1.2);
}
/* Toast */
.toast {
animation: toastIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes toastIn {
from { opacity: 0; transform: translateX(30px) scale(0.9); }
to { opacity: 1; transform: translateX(0) scale(1); }
}
.toast-out {
animation: toastOut 0.3s ease forwards;
}
@keyframes toastOut {
to { opacity: 0; transform: translateX(30px) scale(0.9); }
}
/* Favicon container */
.favicon-wrap {
background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
/* Animating gradient text */
.gradient-text {
background: linear-gradient(90deg, #5a62f2, #f472b6, #5a62f2);
background-size: 200% auto;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
animation: shimmer 3s linear infinite;
}
/* Health bar */
.health-bar-fill {
transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}
/* View transition */
.view-content {
animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
/* Pin dots */
.pin-dot {
transition: all 0.2s ease;
}
.pin-dot.filled {
background: var(--brand);
border-color: var(--brand);
box-shadow: 0 0 8px rgba(90, 98, 242, 0.4);
}
/* Mobile menu */
.mobile-sidebar {
transform: translateX(-100%);
transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.mobile-sidebar.open {
transform: translateX(0);
}
/* Confetti particles */
.particle {
position: absolute;
width: 6px;
height: 6px;
border-radius: 50%;
animation: confettiFall 0.8s ease-out forwards;
}
/* Button press effect */
.btn-press:active {
transform: scale(0.96);
}
/* Tooltip */
[data-tooltip] {
position: relative;
}
[data-tooltip]::after {
content: attr(data-tooltip);
position: absolute;
bottom: calc(100% + 6px);
left: 50%;
transform: translateX(-50%) translateY(4px);
background: var(--bg-elevated);
border: 1px solid var(--border-default);
color: var(--text-primary);
padding: 4px 10px;
border-radius: 6px;
font-size: 11px;
font-weight: 500;
white-space: nowrap;
opacity: 0;
pointer-events: none;
transition: all 0.2s ease;
z-index: 100;
box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
[data-tooltip]:hover::after {
opacity: 1;
transform: translateX(-50%) translateY(0);
}
</style>
</head>
<body class="h-screen overflow-hidden">
<!-- Noise texture overlay -->
<div class="noise-overlay"></div>
<!-- Background mesh -->
<div class="bg-mesh"></div>
<!-- Toast container -->
<div id="toastContainer" class="fixed top-6 right-6 z-[2000] flex flex-col gap-3 pointer-events-none"></div>
<!-- PIN / Vault Unlock Overlay -->
<div id="vaultOverlay" class="fixed inset-0 z-[1000] glass-strong flex flex-col items-center justify-center">
<div class="text-center mb-10 animate-slide-up" style="animation-delay: 0.1s;">
<div class="w-20 h-20 rounded-2xl bg-gradient-to-br from-brand-500 to-brand-700 mx-auto mb-6 flex items-center justify-center shadow-glow-md">
<i class="fa-solid fa-shield-halved text-3xl text-white"></i>
</div>
<h1 class="text-3xl font-bold text-white mb-2 tracking-tight">Fortress</h1>
<p class="text-sm text-slate-400">Secure Password Vault</p>
</div>
<div class="text-center animate-slide-up" style="animation-delay: 0.2s;">
<p class="text-slate-400 text-sm mb-6" id="vaultSubtitle">Enter PIN to unlock your vault</p>
<div class="flex gap-4 mb-8 justify-center">
<div class="pin-dot w-4 h-4 rounded-full border-2 border-slate-600" data-index="0"></div>
<div class="pin-dot w-4 h-4 rounded-full border-2 border-slate-600" data-index="1"></div>
<div class="pin-dot w-4 h-4 rounded-full border-2 border-slate-600" data-index="2"></div>
<div class="pin-dot w-4 h-4 rounded-full border-2 border-slate-600" data-index="3"></div>
</div>
<!-- PIN keypad -->
<div class="grid grid-cols-3 gap-3 max-w-[240px] mx-auto">
<button onclick="enterPin(1)" class="w-14 h-14 rounded-xl glass hover:border-slate-400 text-lg font-semibold text-white transition-all btn-press">1</button>
<button onclick="enterPin(2)" class="w-14 h-14 rounded-xl glass hover:border-slate-400 text-lg font-semibold text-white transition-all btn-press">2</button>
<button onclick="enterPin(3)" class="w-14 h-14 rounded-xl glass hover:border-slate-400 text-lg font-semibold text-white transition-all btn-press">3</button>
<button onclick="enterPin(4)" class="w-14 h-14 rounded-xl glass hover:border-slate-400 text-lg font-semibold text-white transition-all btn-press">4</button>
<button onclick="enterPin(5)" class="w-14 h-14 rounded-xl glass hover:border-slate-400 text-lg font-semibold text-white transition-all btn-press">5</button>
<button onclick="enterPin(6)" class="w-14 h-14 rounded-xl glass hover:border-slate-400 text-lg font-semibold text-white transition-all btn-press">6</button>
<button onclick="enterPin(7)" class="w-14 h-14 rounded-xl glass hover:border-slate-400 text-lg font-semibold text-white transition-all btn-press">7</button>
<button onclick="enterPin(8)" class="w-14 h-14 rounded-xl glass hover:border-slate-400 text-lg font-semibold text-white transition-all btn-press">8</button>
<button onclick="enterPin(9)" class="w-14 h-14 rounded-xl glass hover:border-slate-400 text-lg font-semibold text-white transition-all btn-press">9</button>
<button onclick="backspacePin()" class="w-14 h-14 rounded-xl glass hover:border-slate-400 text-lg text-slate-400 transition-all btn-press"><i class="fa-solid fa-delete-left"></i></button>
<button onclick="enterPin(0)" class="w-14 h-14 rounded-xl glass hover:border-slate-400 text-lg font-semibold text-white transition-all btn-press">0</button>
<button onclick="clearPin()" class="w-14 h-14 rounded-xl glass hover:border-slate-400 text-lg text-slate-400 transition-all btn-press"><i class="fa-solid fa-rotate-left"></i></button>
</div>
<p class="text-xs text-slate-500 mt-6">Demo PIN: <span class="font-mono text-slate-400">2580</span></p>
</div>
</div>
<!-- Mobile sidebar overlay -->
<div id="mobileOverlay" class="fixed inset-0 z-[300] bg-black/60 backdrop-blur-sm hidden lg:hidden" onclick="toggleMobileSidebar()"></div>
<div id="mobileSidebar" class="mobile-sidebar fixed inset-y-0 left-0 w-72 glass-strong z-[301] flex flex-col lg:hidden border-r border-white/5">
<div class="p-6 pb-4">
<div class="flex items-center gap-3">
<div class="w-9 h-9 rounded-xl bg-gradient-to-br from-brand-500 to-brand-700 flex items-center justify-center shadow-glow-sm">
<i class="fa-solid fa-shield-halved text-sm text-white"></i>
</div>
<span class="font-bold text-lg tracking-tight">Fortress</span>
</div>
</div>
<div id="mobileNavList" class="flex-1 overflow-auto px-3"></div>
<div class="p-4 border-t border-white/5">
<button onclick="lockVault()" class="w-full flex items-center gap-3 px-3 py-2.5 rounded-xl text-rose-400 hover:bg-rose-500/10 transition-all">
<i class="fa-solid fa-lock text-sm w-5 text-center"></i>
<span class="text-sm font-medium">Lock Vault</span>
</button>
</div>
</div>
<!-- App Layout -->
<div class="flex h-full relative z-10">
<!-- Sidebar -->
<aside class="hidden lg:flex w-64 flex-col glass-strong border-r border-white/5">
<div class="p-6 pb-4 flex items-center gap-3">
<div class="w-9 h-9 rounded-xl bg-gradient-to-br from-brand-500 to-brand-700 flex items-center justify-center shadow-glow-sm animate-pulse-glow">
<i class="fa-solid fa-shield-halved text-sm text-white"></i>
</div>
<span class="font-bold text-lg tracking-tight">Fortress</span>
</div>
<div class="px-4 pb-3">
<div class="p-3 rounded-xl bg-gradient-to-br from-brand-500/15 to-brand-700/10 border border-brand-500/20">
<div class="flex items-center gap-2 mb-2">
<div class="w-7 h-7 rounded-full bg-gradient-to-br from-brand-400 to-brand-600 flex items-center justify-center">
<span class="text-xs font-bold text-white" id="userInitial">JD</span>
</div>
<span class="text-xs font-semibold" id="userName">John Doe</span>
</div>
<div class="flex items-center gap-1.5">
<div class="flex-1 h-1.5 rounded-full bg-white/10 overflow-hidden">
<div class="h-full rounded-full bg-gradient-to-r from-brand-400 to-brand-500" style="width: 78%" id="sidebarHealth"></div>
</div>
<span class="text-[10px] text-brand-300 font-medium" id="sidebarScore">78</span>
</div>
</div>
</div>
<div class="flex-1 overflow-auto px-3 py-2 space-y-0.5" id="sidebarNav"></div>
<div class="p-4 border-t border-white/5">
<button onclick="lockVault()" class="w-full flex items-center gap-3 px-3 py-2.5 rounded-xl text-rose-400 hover:bg-rose-500/10 transition-all group">
<i class="fa-solid fa-lock text-sm w-5 text-center group-hover:scale-110 transition-transform"></i>
<span class="text-sm font-medium">Lock Vault</span>
</button>
</div>
</aside>
<!-- Main -->
<main class="flex-1 flex flex-col min-w-0 overflow-hidden">
<!-- Top Nav -->
<header class="h-16 flex items-center justify-between px-5 border-b border-white/5 glass-strong">
<div class="flex items-center gap-3">
<button onclick="toggleMobileSidebar()" class="lg:hidden w-9 h-9 rounded-xl hover:bg-white/5 flex items-center justify-center transition-colors">
<i class="fa-solid fa-bars text-sm text-slate-400"></i>
</button>
<div class="relative">
<i class="fa-solid fa-magnifying-glass absolute left-3.5 top-1/2 -translate-y-1/2 text-xs text-slate-500"></i>
<input type="text" id="globalSearch" placeholder="Search passwords..." class="w-64 fancy-input rounded-xl pl-9 pr-3 py-2 text-sm text-white placeholder-slate-500" oninput="handleSearch(this.value)">
<kbd class="absolute right-2.5 top-1/2 -translate-y-1/2 text-[10px] px-1.5 py-0.5 rounded bg-white/5 text-slate-500 border border-white/5 font-mono">⌘K</kbd>
</div>
</div>
<div class="flex items-center gap-2">
<button onclick="showNotifications()" class="relative w-9 h-9 rounded-xl hover:bg-white/5 flex items-center justify-center transition-all btn-press" data-tooltip="Notifications">
<i class="fa-regular fa-bell text-sm text-slate-400"></i>
<span class="absolute top-1.5 right-1.5 w-2 h-2 rounded-full bg-rose-500 animate-pulse"></span>
</button>
<button onclick="generatePasswordToClipboard()" class="w-9 h-9 rounded-xl hover:bg-brand-500/10 flex items-center justify-center transition-all btn-press" data-tooltip="Generate Password">
<i class="fa-solid fa-sparkles text-sm text-brand-400"></i>
</button>
<div class="w-8 h-8 rounded-full bg-gradient-to-br from-brand-400 to-brand-600 flex items-center justify-center shadow-glow-sm ml-1">
<span class="text-xs font-bold text-white" id="topAvatar">JD</span>
</div>
</div>
</header>
<!-- Content -->
<div id="mainContent" class="flex-1 overflow-y-auto overflow-x-hidden p-6"></div>
</main>
</div>
<!-- Password Details Modal -->
<div id="passwordModal" class="fixed inset-0 z-[500] hidden">
<div class="absolute inset-0 bg-black/60 backdrop-blur-sm modal-backdrop-enter" onclick="closePasswordModal()"></div>
<div class="absolute inset-0 flex items-center justify-center p-4 pointer-events-none">
<div class="modal-enter w-full max-w-lg pointer-events-auto max-h-[90vh] overflow-auto rounded-2xl glass-strong shadow-floating border border-white/10" id="passwordModalContent">
<div class="p-6" id="passwordModalBody"></div>
</div>
</div>
</div>
<!-- Add/Edit Modal -->
<div id="editModal" class="fixed inset-0 z-[500] hidden">
<div class="absolute inset-0 bg-black/60 backdrop-blur-sm modal-backdrop-enter" onclick="closeEditModal()"></div>
<div class="absolute inset-0 flex items-center justify-center p-4 pointer-events-none">
<div class="modal-enter w-full max-w-lg pointer-events-auto max-h-[90vh] overflow-auto rounded-2xl glass-strong shadow-floating border border-white/10" id="editModalContent">
<div class="p-6" id="editModalBody"></div>
</div>
</div>
</div>
<!-- Generator Modal -->
<div id="generatorModal" class="fixed inset-0 z-[500] hidden">
<div class="absolute inset-0 bg-black/60 backdrop-blur-sm modal-backdrop-enter" onclick="closeGeneratorModal()"></div>
<div class="absolute inset-0 flex items-center justify-center p-4 pointer-events-none">
<div class="modal-enter w-full max-w-lg pointer-events-auto rounded-2xl glass-strong shadow-floating border border-white/10" id="generatorModalContent">
<div class="p-6" id="generatorModalBody"></div>
</div>
</div>
</div>
<script>
// ===================== DATA =====================
const ACCOUNTS = {
'john': {
name: 'John Doe',
email: 'john@example.com',
pin: '2580',
avatar: 'JD',
passwords: [
{ id: 1, name: 'Google', url: 'google.com', username: 'john.doe@gmail.com', password: encrypt('SuperSecret123!'), category: 'social', tags: ['2FA', 'Work'], favicon: 'https://www.google.com/favicon.ico', strength: 80, lastUsed: '2024-01-20', created: '2023-03-15' },
{ id: 2, name: 'GitHub', url: 'github.com', username: 'johndev', password: encrypt('GH_@Secure99!'), category: 'dev', tags: ['SSH', 'Critical'], favicon: 'https://github.com/favicon.ico', strength: 95, lastUsed: '2024-01-19', created: '2022-11-10' },
{ id: 3, name: 'Netflix', url: 'netflix.com', username: 'john.family', password: encrypt('Stream2024!'), category: 'entertainment', tags: ['Family'], favicon: 'https://www.netflix.com/favicon.ico', strength: 60, lastUsed: '2024-01-18', created: '2021-06-20' },
{ id: 4, name: 'Amazon', url: 'amazon.com', username: 'johndoe', password: encrypt('Shop4Life!'), category: 'shopping', tags: ['Prime'], favicon: 'https://www.amazon.com/favicon.ico', strength: 70, lastUsed: '2024-01-17', created: '2020-09-01' },
{ id: 5, name: 'Discord', url: 'discord.com', username: 'johndoe#4821', password: encrypt('Chat2024!'), category: 'social', tags: ['Gaming'], favicon: 'https://discord.com/favicon.ico', strength: 55, lastUsed: '2024-01-16', created: '2019-04-12' },
{ id: 6, name: 'Notion', url: 'notion.so', username: 'john@work.com', password: encrypt('NoteMaster88!'), category: 'productivity', tags: ['Work', 'Team'], favicon: 'https://www.notion.so/favicon.ico', strength: 85, lastUsed: '2024-01-15', created: '2023-08-03' },
{ id: 7, name: 'Spotify', url: 'spotify.com', username: 'johndoe', password: encrypt('Music123'), category: 'entertainment', tags: ['Premium'], favicon: 'https://www.spotify.com/favicon.ico', strength: 35, lastUsed: '2024-01-14', created: '2018-02-28' },
{ id: 8, name: 'Stripe', url: 'stripe.com', username: 'john@company.com', password: encrypt('Stripe$Secure2024!'), category: 'finance', tags: ['Business', 'Critical'], favicon: 'https://stripe.com/favicon.ico', strength: 98, lastUsed: '2024-01-13', created: '2022-05-15' },
{ id: 9, name: 'Twitter / X', url: 'x.com', username: '@johndoe', password: encrypt('TweetLife!'), category: 'social', tags: ['Public'], favicon: 'https://abs.twimg.com/favicons/twitter.3.ico', strength: 65, lastUsed: '2024-01-12', created: '2017-11-20' },
{ id: 10, name: 'Vercel', url: 'vercel.com', username: 'johndoe', password: encrypt('DeployFast!'), category: 'dev', tags: ['Pro'], favicon: 'https://vercel.com/favicon.ico', strength: 75, lastUsed: '2024-01-11', created: '2023-01-10' },
{ id: 11, name: 'Slack', url: 'slack.com', username: 'john@team.com', password: encrypt('Slack2024!'), category: 'productivity', tags: ['Work'], favicon: 'https://slack.com/favicon.ico', strength: 60, lastUsed: '2024-01-10', created: '2021-03-22' },
{ id: 12, name: 'PayPal', url: 'paypal.com', username: 'john.doe', password: encrypt('PaySecure!'), category: 'finance', tags: ['Verified'], favicon: 'https://www.paypal.com/favicon.ico', strength: 82, lastUsed: '2024-01-09', created: '2019-08-14' },
]
},
'jane': {
name: 'Jane Smith',
email: 'jane@design.co',
pin: '1234',
avatar: 'JS',
passwords: [
{ id: 101, name: 'Figma', url: 'figma.com', username: 'janesmith', password: encrypt('Design2024!'), category: 'productivity', tags: ['Pro'], favicon: 'https://www.figma.com/favicon.ico', strength: 72, lastUsed: '2024-01-20', created: '2022-09-10' },
{ id: 102, name: 'Dribbble', url: 'dribbble.com', username: 'janesmith', password: encrypt('Dribbble!'), category: 'social', tags: ['Portfolio'], favicon: 'https://dribbble.com/favicon.ico', strength: 50, lastUsed: '2024-01-19', created: '2021-05-01' },
{ id: 103, name: 'Apple ID', url: 'apple.com', username: 'jane@icloud.com', password: encrypt('AppleSecure99!'), category: 'system', tags: ['2FA', 'Critical'], favicon: 'https://www.apple.com/favicon.ico', strength: 92, lastUsed: '2024-01-18', created: '2015-01-01' },
{ id: 104, name: 'Behance', url: 'behance.net', username: 'janesmith', password: encrypt('Portfolio88!'), category: 'social', tags: ['Creative'], favicon: 'https://www.behance.net/favicon.ico', strength: 68, lastUsed: '2024-01-17', created: '2020-03-15' },
]
}
};
// ===================== STATE =====================
let state = {
currentAccount: 'john',
currentView: 'dashboard',
selectedCategory: 'all',
searchQuery: '',
pinBuffer: '',
generator: {
length: 16,
uppercase: true,
lowercase: true,
numbers: true,
symbols: true,
avoidAmbiguous: true
},
showPassword: {},
editingId: null,
toastId: 0,
confettiId: 0
};
// ===================== CATEGORIES =====================
const CATEGORIES = {
all: { icon: 'fa-border-all', label: 'All Passwords', color: 'text-slate-300' },
social: { icon: 'fa-hashtag', label: 'Social', color: 'text-brand-400' },
dev: { icon: 'fa-code', label: 'Development', color: 'text-emerald-400' },
finance: { icon: 'fa-sack-dollar', label: 'Finance', color: 'text-amber-400' },
shopping: { icon: 'fa-cart-shopping', label: 'Shopping', color: 'text-orange-400' },
entertainment: { icon: 'fa-film', label: 'Entertainment', color: 'text-fuchsia-400' },
productivity: { icon: 'fa-bolt', label: 'Productivity', color: 'text-sky-400' },
system: { icon: 'fa-gear', label: 'System', color: 'text-slate-400' }
};
const CATEGORY_COLORS = {
social: { bg: 'bg-brand-500/10', text: 'text-brand-300', border: 'border-brand-500/20', glow: 'shadow-brand-500/10' },
dev: { bg: 'bg-emerald-500/10', text: 'text-emerald-300', border: 'border-emerald-500/20', glow: 'shadow-emerald-500/10' },
finance: { bg: 'bg-amber-500/10', text: 'text-amber-300', border: 'border-amber-500/20', glow: 'shadow-amber-500/10' },
shopping: { bg: 'bg-orange-500/10', text: 'text-orange-300', border: 'border-orange-500/20', glow: 'shadow-orange-500/10' },
entertainment: { bg: 'bg-fuchsia-500/10', text: 'text-fuchsia-300', border: 'border-fuchsia-500/20', glow: 'shadow-fuchsia-500/10' },
productivity: { bg: 'bg-sky-500/10', text: 'text-sky-300', border: 'border-sky-500/20', glow: 'shadow-sky-500/10' },
system: { bg: 'bg-slate-500/10', text: 'text-slate-300', border: 'border-slate-500/20', glow: 'shadow-slate-500/10' }
};
// ===================== UTILITIES =====================
function encrypt(text) { return btoa(text); }
function decrypt(text) { try { return atob(text); } catch(e) { return text; } }
function getAccount() { return ACCOUNTS[state.currentAccount]; }
function get