/* ======================================== AmneziaVPN Web Panel — Design System ======================================== */ /* Google Font */ /* @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap'); */ /* ===== CSS Variables / Tokens ===== */ :root { /* Color palette — deep dark with neon violet accent */ --bg-primary: #0a0a0f; --bg-secondary: #12121a; --bg-card: #1a1a26; --bg-card-hover: #22223a; --bg-input: #16162240; --bg-modal: rgba(10, 10, 15, 0.92); --border-color: rgba(255, 255, 255, 0.06); --border-hover: rgba(255, 255, 255, 0.12); --border-focus: rgba(138, 92, 246, 0.5); --text-primary: #f0f0f5; --text-secondary: #8b8ba0; --text-muted: #83839c; --text-accent: #a78bfa; --accent: #8b5cf6; --accent-light: #a78bfa; --accent-dark: #7c3aed; --accent-glow: rgba(139, 92, 246, 0.25); --accent-gradient: linear-gradient(135deg, #7c3aed, #2d2f71); --success: #22c55e; --success-bg: rgba(34, 197, 94, 0.12); --success-border: rgba(34, 197, 94, 0.25); --danger: #ef4444; --danger-bg: rgba(239, 68, 68, 0.12); --danger-border: rgba(239, 68, 68, 0.25); --warning: #f59e0b; --warning-bg: rgba(245, 158, 11, 0.12); --info: #3b82f6; --info-bg: rgba(59, 130, 246, 0.12); /* Spacing */ --space-xs: 4px; --space-sm: 8px; --space-md: 16px; --space-lg: 24px; --space-xl: 32px; --space-2xl: 48px; --space-3xl: 64px; /* Radius */ --radius-sm: 8px; --radius-md: 12px; --radius-lg: 16px; --radius-xl: 20px; --radius-full: 9999px; /* Shadows */ --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3); --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4); --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5); --shadow-glow: 0 0 30px rgba(139, 92, 246, 0.15); --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.04); /* Transitions */ --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1); --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1); --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1); /* Font */ --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; --text-xs: 0.72rem; --text-sm: 0.8rem; --text-base: 0.9rem; --text-md: 1rem; --text-lg: 1.1rem; --text-xl: 1.4rem; --text-2xl: 1.5rem; } /* ===== Light Theme ===== */ [data-theme="light"] { --bg-primary: #f5f5f9; --bg-secondary: #eeeef3; --bg-card: #ffffff; --bg-card-hover: #f8f8fc; --bg-input: rgba(0, 0, 0, 0.03); --bg-modal: rgba(255, 255, 255, 0.92); --border-color: rgba(0, 0, 0, 0.08); --border-hover: rgba(0, 0, 0, 0.15); --border-focus: rgba(138, 92, 246, 0.4); --text-primary: #1a1a2e; --text-secondary: #5a5a78; --text-muted: #6b6b83; --text-accent: #7c3aed; --accent: #7c3aed; --accent-light: #8b5cf6; --accent-dark: #6d28d9; --accent-glow: rgba(124, 58, 237, 0.15); --accent-gradient: linear-gradient(135deg, #7c3aed, #2d2f71); --success: #16a34a; --success-bg: rgba(22, 163, 74, 0.08); --success-border: rgba(22, 163, 74, 0.2); --danger: #dc2626; --danger-bg: rgba(220, 38, 38, 0.06); --danger-border: rgba(220, 38, 38, 0.15); --warning: #d97706; --warning-bg: rgba(217, 119, 6, 0.08); --info: #2563eb; --info-bg: rgba(37, 99, 235, 0.06); --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06); --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08); --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1); --shadow-glow: 0 0 20px rgba(124, 58, 237, 0.08); --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.03); } [data-theme="light"] body::before { background: radial-gradient(ellipse 600px 400px at 20% 10%, rgba(124, 58, 237, 0.04), transparent), radial-gradient(ellipse 500px 500px at 80% 80%, rgba(99, 102, 241, 0.03), transparent), radial-gradient(ellipse 800px 300px at 50% 50%, rgba(139, 92, 246, 0.02), transparent); } [data-theme="light"] .logo-text { background: linear-gradient(135deg, #1a1a2e, #7c3aed); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; } [data-theme="light"] .theme-toggle { background: rgba(0, 0, 0, 0.04); } [data-theme="light"] .theme-toggle:hover { background: rgba(0, 0, 0, 0.08); } [data-theme="light"] .header-nav { background: #ffffff; } /* ===== Theme Toggle ===== */ .theme-toggle { width: 36px; height: 36px; border: 1px solid var(--border-color); border-radius: var(--radius-full); background: rgba(255, 255, 255, 0.04); color: var(--text-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1rem; transition: all var(--transition-base); flex-shrink: 0; } .theme-toggle:hover { color: var(--text-primary); border-color: var(--border-hover); background: rgba(255, 255, 255, 0.08); transform: rotate(15deg); } /* ===== Reset & Base ===== */ *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } html { font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; max-width: 100%; } body { font-family: var(--font-family); background: var(--bg-primary); color: var(--text-primary); line-height: 1.6; min-height: 100vh; max-width: 100%; /* Pair both axes: overflow-x:hidden + overflow-y:visible computes to auto/auto and Chrome then paints a persistent gutter (Pixel settings page). */ overflow-x: hidden; overflow-y: auto; } :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; } /* Animated mesh gradient background */ body::before { content: ''; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: radial-gradient(ellipse 600px 400px at 20% 10%, rgba(99, 102, 241, 0.08), transparent), radial-gradient(ellipse 500px 500px at 80% 80%, rgba(139, 92, 246, 0.06), transparent), radial-gradient(ellipse 800px 300px at 50% 50%, rgba(79, 70, 229, 0.04), transparent); pointer-events: none; z-index: 0; } a { color: var(--accent-light); text-decoration: none; transition: color var(--transition-fast); } a:hover { color: var(--accent); } ::selection { background: rgba(139, 92, 246, 0.3); color: #fff; } /* ===== Scrollbar (mouse/trackpad only) ===== * Styling ::-webkit-scrollbar forces classic always-on gutters in Chromium. * On phones (Pixel etc.) that makes a permanent side slider on long pages * like Settings. Leave touch devices on native overlay scrollbars. */ @media (hover: hover) and (pointer: fine) { ::-webkit-scrollbar { width: 6px; } ::-webkit-scrollbar-track { background: transparent; } ::-webkit-scrollbar-thumb { background: rgba(139, 92, 246, 0.3); border-radius: var(--radius-full); } ::-webkit-scrollbar-thumb:hover { background: rgba(139, 92, 246, 0.5); } [data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(124, 58, 237, 0.2); } } /* Touch: overlay-only scrolling — no persistent gutter on long pages (Settings). */ @media (hover: none), (pointer: coarse) { html, body { scrollbar-width: none; -ms-overflow-style: none; } html::-webkit-scrollbar, body::-webkit-scrollbar { width: 0; height: 0; display: none; } } /* ===== Layout ===== */ .app-container { /* Avoid z-index here so page modals can stack above .mobile-tabbar. */ position: relative; max-width: 1100px; margin: 0 auto; padding: var(--space-xl) var(--space-lg); } /* ===== Header ===== */ .app-header { display: flex; align-items: center; justify-content: space-between; padding: var(--space-lg) 0; margin-bottom: var(--space-xl); border-bottom: 1px solid var(--border-color); } .app-logo { display: flex; align-items: center; gap: var(--space-md); } .logo-icon { width: 44px; height: 44px; background: var(--accent-gradient); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 22px; box-shadow: var(--shadow-glow); } .logo-text { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; background: linear-gradient(135deg, #f0f0f5, #a78bfa); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; } .logo-subtitle { font-size: 0.75rem; color: var(--text-muted); font-weight: 400; letter-spacing: 0.05em; text-transform: uppercase; } /* ===== Buttons ===== */ .btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-sm); /* symbol glyphs like U+23F9 fall back to a font with much taller metrics, which stretches the line box downwards and leaves the label riding high */ line-height: 1; padding: 10px 20px; border: none; border-radius: var(--radius-md); font-family: var(--font-family); font-size: 0.875rem; font-weight: 600; cursor: pointer; transition: all var(--transition-base); position: relative; overflow: hidden; white-space: nowrap; } .btn::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent); opacity: 0; transition: opacity var(--transition-fast); } .btn:hover::before { opacity: 1; } .btn-primary { background: var(--accent-gradient); color: #fff; box-shadow: 0 2px 12px rgba(139, 92, 246, 0.3); } .btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4); } .btn-primary:active { transform: translateY(0); } .btn-secondary { background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border-color); } .btn-secondary:hover { border-color: var(--border-hover); background: var(--bg-card-hover); } .btn-danger { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-border); } .btn-danger:hover { background: rgba(239, 68, 68, 0.2); } .btn-success { background: var(--success-bg); color: var(--success); border: 1px solid var(--success-border); } .btn-sm { padding: 6px 14px; font-size: 0.8rem; border-radius: var(--radius-sm); } .btn-icon { width: 36px; height: 36px; padding: 0; border-radius: var(--radius-sm); font-size: 1.1rem; /* .btn overflow:hidden clips emoji glyphs; SVG icons stay inside the box */ overflow: visible; } .btn-icon-svg { width: 16px; height: 16px; display: block; flex-shrink: 0; } .btn-text-with-icon { display: inline-flex; align-items: center; gap: 6px; } .btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; } .btn .spinner { width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, 0.2); border-top-color: #1c1c30; border-radius: 50%; animation: spin 0.6s linear infinite; color: #fff; } /* ===== Cards ===== */ .card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: var(--space-lg); box-shadow: var(--shadow-card); transition: all var(--transition-base); } .card-hover:hover { border-color: var(--border-hover); box-shadow: var(--shadow-card), var(--shadow-glow); transform: translateY(-2px); } .card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-lg); } .card-title { font-size: var(--text-lg); font-weight: 600; } .card-subtitle { font-size: 0.85rem; color: var(--text-secondary); margin-top: var(--space-xs); } /* ===== Section ===== */ .section-title { font-size: var(--text-2xl); font-weight: 700; margin-bottom: var(--space-lg); display: flex; align-items: center; gap: var(--space-md); } .section-title .icon { font-size: 1.3rem; } .section-title .icon, .section-title svg { flex-shrink: 0; color: var(--text-secondary); } /* ===== Page Header ===== */ .page-header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); flex-wrap: wrap; margin-bottom: var(--space-lg); } .page-header__title { margin-bottom: 0; } .page-header__actions { display: flex; align-items: center; gap: var(--space-sm); flex-wrap: wrap; margin-left: auto; } .page-header__search { flex: 1; min-width: 220px; max-width: 500px; } .page-header-card { margin-bottom: var(--space-xl); } .page-header--card, .page-header--secondary { margin-bottom: var(--space-lg); } .search-field { position: relative; } .search-field .form-input { padding-inline-start: 40px; } .search-field-icon { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); opacity: 0.5; pointer-events: none; } .settings-nav { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-bottom: var(--space-lg); position: sticky; top: 0; z-index: 30; padding: var(--space-sm) 0; background: var(--bg-primary); } .settings-nav a { padding: 6px 12px; border: 1px solid var(--border-color); border-radius: var(--radius-full); color: var(--text-secondary); font-size: var(--text-sm); white-space: nowrap; } .settings-nav a:hover { border-color: var(--border-hover); color: var(--text-primary); } /* ===== Server Card ===== */ .server-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--space-lg); margin-bottom: var(--space-xl); } .server-card { position: relative; cursor: grab; } .server-card:active { cursor: grabbing; } /* While being dragged: dim the card so the user sees their selection. */ .server-card.dragging { opacity: 0.45; cursor: grabbing; } /* Drop target hint: highlighted border + slight lift. */ .server-card.drag-over { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent), 0 8px 20px rgba(139, 92, 246, 0.25); transform: translateY(-2px); } /* Ping indicator dot to the left of the server name. */ .ping-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: middle; background: #888; transition: background-color 0.25s ease, box-shadow 0.25s ease; flex-shrink: 0; } .ping-dot.ping-pending { background: #94a3b8; animation: ping-pulse 1.2s ease-in-out infinite; } .ping-dot.ping-ok { background: var(--success); box-shadow: 0 0 6px rgba(34, 197, 94, 0.55); } .ping-dot.ping-fail { background: var(--danger, #ef4444); } .ping-ms { font-size: 0.72rem; margin-left: 6px; color: var(--text-muted); font-family: 'SF Mono', 'Fira Code', monospace; font-variant-numeric: tabular-nums; } @keyframes ping-pulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } } .server-icon { width: 48px; height: 48px; background: var(--accent-gradient); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; box-shadow: 0 2px 12px rgba(139, 92, 246, 0.2); } .server-card .server-meta { display: flex; align-items: center; gap: var(--space-md); margin-bottom: var(--space-md); } .server-card .server-name { font-size: 1.05rem; font-weight: 600; } .server-card .server-host { font-size: 0.8rem; color: var(--text-muted); font-family: 'SF Mono', 'Fira Code', monospace; } .server-card .server-protocols { display: flex; gap: var(--space-sm); flex-wrap: wrap; margin-top: var(--space-sm); } .server-card .server-actions { display: flex; gap: var(--space-sm); margin-top: var(--space-md); padding-top: var(--space-md); border-top: 1px solid var(--border-color); align-items: center; } /* Desktop: Manage fills leftover space (replaces former inline style="flex:1") */ .server-card .server-actions > a.btn:not(.btn-icon) { flex: 1; } /* ===== Badge ===== */ .badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: var(--radius-full); font-size: var(--text-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; } .badge-success { background: var(--success-bg); color: var(--success); border: 1px solid var(--success-border); } .badge-danger { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-border); } .badge-info { background: var(--info-bg); color: var(--info); border: 1px solid rgba(59, 130, 246, 0.25); } .badge-warn { background: var(--warning-bg); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.25); } .badge-secondary { background: rgba(255, 255, 255, 0.06); color: var(--text-secondary); border: 1px solid var(--border-color); } .badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; } /* ===== Form Elements ===== */ .form-group { margin-bottom: var(--space-md); } .form-label { display: block; font-size: var(--text-sm); font-weight: 500; color: var(--text-secondary); margin-bottom: var(--space-xs); text-transform: uppercase; letter-spacing: 0.05em; } .form-input, .form-select, .form-textarea { width: 100%; min-width: 0; max-width: 100%; padding: 11px 16px; background: var(--bg-input); border: 1px solid var(--border-color); border-radius: var(--radius-md); color: var(--text-primary); font-family: var(--font-family); font-size: 0.9rem; transition: all var(--transition-fast); outline: none; } .form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--border-focus); box-shadow: 0 0 0 3px var(--accent-glow); background: var(--bg-secondary); } .form-input::placeholder { color: var(--text-muted); } .form-textarea { min-height: 100px; resize: vertical; font-family: 'SF Mono', 'Fira Code', monospace; font-size: 0.82rem; } .form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b8ba0' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; cursor: pointer; } /* ===== Searchable Select ===== */ .searchable-select { position: relative; } /* The native