/* ═══════════════════════════════════════════
   CloudVPS — Dark Hosting Theme
   ═══════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
    --bg: #060a13;
    --bg-card: #0c1220;
    --bg-card-hover: #111b2e;
    --bg-surface: #080e1a;
    --border: #151f33;
    --border-accent: #2563eb;
    --text: #e2e8f0;
    --text-muted: #5a6a84;
    --text-dim: #3a4a64;
    --accent: #3b82f6;
    --accent-glow: rgba(59,130,246,0.12);
    --accent-hover: #2563eb;
    --green: #10b981;
    --green-glow: rgba(16,185,129,0.12);
    --red: #ef4444;
    --red-glow: rgba(239,68,68,0.12);
    --orange: #f59e0b;
    --purple: #8b5cf6;
    --gradient: linear-gradient(135deg, #3b82f6, #8b5cf6);
    --gradient-soft: linear-gradient(135deg, rgba(59,130,246,0.08), rgba(139,92,246,0.08));
    --radius: 12px;
    --radius-lg: 16px;
    --font: 'Outfit', -apple-system, sans-serif;
    --mono: 'JetBrains Mono', monospace;
    --shadow: 0 4px 24px rgba(0,0,0,0.3);
    --shadow-glow: 0 0 40px rgba(59,130,246,0.15);
}

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

html { scroll-behavior: smooth; }

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

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--text-dim); border-radius: 3px; }

/* ─── ANIMATIONS ─── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }
@keyframes glow { 0%,100% { box-shadow: 0 0 20px var(--accent-glow); } 50% { box-shadow: var(--shadow-glow); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes gradientShift { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes scanline { 0% { top: -10%; } 100% { top: 110%; } }

.anim-up { animation: fadeUp .65s ease forwards; opacity: 0; }
.anim-in { animation: fadeIn .5s ease forwards; }
.d1 { animation-delay: .1s; } .d2 { animation-delay: .2s; } .d3 { animation-delay: .3s; }
.d4 { animation-delay: .4s; } .d5 { animation-delay: .5s; } .d6 { animation-delay: .6s; }

/* ─── GRID BG ─── */
.grid-bg {
    position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
.grid-bg::before {
    content: ''; position: absolute; inset: 0;
    background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 64px 64px; opacity: .25;
}
.grid-bg .orb {
    position: absolute; border-radius: 50%; filter: blur(1px);
}
.grid-bg .orb-1 {
    width: 600px; height: 600px; top: -200px; right: -100px;
    background: radial-gradient(circle, rgba(59,130,246,.07), transparent 70%);
    animation: float 9s ease-in-out infinite;
}
.grid-bg .orb-2 {
    width: 500px; height: 500px; bottom: -150px; left: -100px;
    background: radial-gradient(circle, rgba(139,92,246,.05), transparent 70%);
    animation: float 11s ease-in-out infinite 3s;
}

/* ─── LAYOUT ─── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.page-content { position: relative; z-index: 1; padding: 32px 0; }
.section-pad { padding: 80px 0; }

/* ─── HEADER ─── */
.header {
    position: sticky; top: 0; z-index: 100;
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    background: rgba(6,10,19,.85); border-bottom: 1px solid var(--border);
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 64px; max-width: 1280px; margin: 0 auto; padding: 0 24px;
}
.logo { display: flex; align-items: center; gap: 10px; cursor: pointer; text-decoration: none; }
.logo-icon {
    width: 36px; height: 36px; border-radius: 10px; background: var(--gradient);
    display: flex; align-items: center; justify-content: center; font-size: 18px;
    box-shadow: 0 4px 20px var(--accent-glow);
}
.logo-text { font-size: 20px; font-weight: 800; letter-spacing: -.5px; color: var(--text); }
.logo-text span { color: var(--accent); }

.nav { display: flex; align-items: center; gap: 6px; }
.nav-link {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px; border-radius: 8px; font-size: 13px; font-weight: 600;
    color: var(--text-muted); text-decoration: none; border: none; background: none;
    cursor: pointer; transition: all .2s; font-family: var(--font);
}
.nav-link:hover { color: var(--text); background: rgba(255,255,255,.04); }
.nav-link.active { color: var(--accent); }

/* ─── BUTTONS ─── */
.btn {
    display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px;
    border-radius: 10px; font-family: var(--font); font-weight: 600; font-size: 14px;
    cursor: pointer; border: none; transition: all .2s; text-decoration: none; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn-primary { background: var(--gradient); color: #fff; box-shadow: 0 4px 20px var(--accent-glow); }
.btn-primary:hover { box-shadow: var(--shadow-glow); }
.btn-secondary { background: var(--bg-card); color: var(--text); border: 1px solid var(--border); }
.btn-danger { background: var(--red-glow); color: var(--red); border: 1px solid rgba(239,68,68,.25); }
.btn-success { background: var(--green-glow); color: var(--green); border: 1px solid rgba(16,185,129,.25); }
.btn-ghost { background: transparent; color: var(--text-muted); padding: 8px 12px; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-block { width: 100%; justify-content: center; }

/* ─── CARD ─── */
.card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 24px; transition: all .3s;
}
.card-hover:hover {
    border-color: var(--border-accent);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px var(--accent-glow);
}

/* ─── BADGE ─── */
.badge {
    display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 20px;
    font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
}
.badge-accent { background: rgba(59,130,246,.15); color: var(--accent); border: 1px solid rgba(59,130,246,.3); }
.badge-green { background: var(--green-glow); color: var(--green); border: 1px solid rgba(16,185,129,.3); }
.badge-red { background: var(--red-glow); color: var(--red); border: 1px solid rgba(239,68,68,.3); }
.badge-purple { background: rgba(139,92,246,.15); color: var(--purple); border: 1px solid rgba(139,92,246,.3); }
.badge-orange { background: rgba(245,158,11,.15); color: var(--orange); border: 1px solid rgba(245,158,11,.3); }

/* ─── STATUS DOT ─── */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; }
.status-dot {
    width: 8px; height: 8px; border-radius: 50%;
}
.status-running .status-dot { background: var(--green); box-shadow: 0 0 8px var(--green); animation: pulse 2s infinite; }
.status-running { color: var(--green); }
.status-stopped .status-dot { background: var(--red); box-shadow: 0 0 8px var(--red); }
.status-stopped { color: var(--red); }
.status-creating .status-dot { background: var(--orange); box-shadow: 0 0 8px var(--orange); animation: pulse 1s infinite; }
.status-creating { color: var(--orange); }
.status-rebuilding .status-dot { background: var(--orange); box-shadow: 0 0 8px var(--orange); animation: pulse 1s infinite; }
.status-rebuilding { color: var(--orange); }

/* ─── FORMS ─── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.form-input, .form-select {
    width: 100%; padding: 11px 14px; background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: 10px; color: var(--text); font-size: 14px; font-family: var(--font);
    outline: none; transition: border .2s, box-shadow .2s;
}
.form-input:focus, .form-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.form-input::placeholder { color: var(--text-dim); }
.form-select {
    cursor: pointer; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235a6a84' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px;
}
.form-input.mono { font-family: var(--mono); }

/* ─── MODAL ─── */
.modal-overlay {
    display: none; position: fixed; inset: 0; z-index: 1000;
    align-items: center; justify-content: center;
    background: rgba(0,0,0,.7); backdrop-filter: blur(8px);
}
.modal-overlay.open { display: flex; animation: fadeIn .2s ease; }
.modal {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px;
    width: 90%; max-width: 560px; max-height: 85vh; overflow: auto;
    box-shadow: 0 24px 80px rgba(0,0,0,.5); animation: fadeUp .3s ease;
}
.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 24px; border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 18px; font-weight: 700; }
.modal-close { cursor: pointer; color: var(--text-muted); background: none; border: none; font-size: 20px; padding: 4px; }
.modal-body { padding: 24px; }
.modal-footer { display: flex; justify-content: space-between; padding: 0 24px 24px; gap: 12px; }

/* ─── STAT BOX ─── */
.stat-box {
    display: flex; align-items: center; gap: 16px;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px;
}
.stat-icon {
    width: 44px; height: 44px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.stat-icon.blue { background: var(--accent-glow); }
.stat-icon.green { background: var(--green-glow); }
.stat-icon.purple { background: rgba(139,92,246,.12); }
.stat-icon.orange { background: rgba(245,158,11,.12); }
.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.stat-value { font-size: 22px; font-weight: 700; font-family: var(--mono); }

/* ─── GRID LAYOUTS ─── */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }

/* ─── TABLE ─── */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
    padding: 10px 12px; text-align: left; font-weight: 600; color: var(--text-muted);
    font-size: 12px; text-transform: uppercase; letter-spacing: .5px;
    border-bottom: 1px solid var(--border);
}
.table td { padding: 12px; border-bottom: 1px solid rgba(21,31,51,.5); }
.table tr:hover td { background: rgba(255,255,255,.02); }
.table .mono { font-family: var(--mono); font-size: 13px; }

/* ─── TAB BAR ─── */
.tabs {
    display: flex; gap: 4px; padding: 4px; background: var(--bg-surface);
    border-radius: 12px; border: 1px solid var(--border); margin-bottom: 24px; flex-wrap: wrap;
}
.tab-btn {
    padding: 10px 18px; border-radius: 8px; border: none; cursor: pointer;
    background: transparent; color: var(--text-muted); font-weight: 600;
    font-size: 13px; font-family: var(--font); transition: all .2s;
}
.tab-btn.active { background: var(--accent); color: #fff; }
.tab-btn:hover:not(.active) { color: var(--text); }

/* ─── SPINNER ─── */
.spinner {
    width: 20px; height: 20px; border: 2px solid var(--border);
    border-top-color: var(--accent); border-radius: 50%;
    animation: spin .6s linear infinite; display: inline-block;
}

/* ─── TOAST ─── */
.toast {
    position: fixed; top: 80px; right: 24px; z-index: 9999;
    padding: 12px 20px; background: var(--bg-card); border-radius: 12px;
    display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600;
    box-shadow: 0 8px 32px rgba(0,0,0,.3); animation: fadeUp .3s ease;
    border: 1px solid var(--border);
}
.toast.hidden { display: none; }

/* ─── SELECTOR GRID ─── */
.sel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sel-item {
    padding: 16px; border-radius: 12px; cursor: pointer; transition: all .2s;
    background: var(--bg-surface); border: 2px solid var(--border);
}
.sel-item:hover { border-color: var(--text-dim); }
.sel-item.selected { background: var(--accent-glow); border-color: var(--accent); }
.sel-item .sel-title { font-weight: 700; font-size: 14px; margin-bottom: 2px; }
.sel-item .sel-sub { font-size: 12px; color: var(--text-muted); }
.sel-item .sel-price { font-family: var(--mono); font-size: 20px; font-weight: 700; }

/* ─── PROGRESS STEPS ─── */
.steps { display: flex; gap: 8px; margin-bottom: 28px; }
.step-bar { flex: 1; height: 4px; border-radius: 2px; background: var(--border); transition: background .3s; }
.step-bar.done { background: var(--accent); }

/* ─── SERVER LIST ITEM ─── */
.srv-item {
    display: flex; align-items: center; gap: 20px; padding: 16px 24px;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
    cursor: pointer; transition: all .3s;
}
.srv-item:hover { border-color: var(--border-accent); transform: translateY(-2px); box-shadow: 0 8px 32px var(--accent-glow); }
.srv-icon {
    width: 42px; height: 42px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0;
}
.srv-icon.on { background: var(--green-glow); }
.srv-icon.off { background: var(--red-glow); }
.srv-info { flex: 1; min-width: 0; }
.srv-name { font-weight: 700; font-size: 15px; font-family: var(--mono); margin-bottom: 2px; display: flex; align-items: center; gap: 10px; }
.srv-meta { font-size: 13px; color: var(--text-muted); }
.srv-right { text-align: right; flex-shrink: 0; }
.srv-ip { font-family: var(--mono); font-weight: 700; font-size: 14px; }
.srv-exp { font-size: 12px; color: var(--text-muted); }

/* ─── VNC CONSOLE ─── */
.vnc-box {
    background: #000; border-radius: 8px; padding: 20px; font-family: var(--mono);
    font-size: 13px; color: var(--green); min-height: 300px; position: relative; overflow: hidden;
}
.vnc-scanline {
    position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: rgba(16,185,129,.3); animation: scanline 3s linear infinite; opacity: .5;
}
.cursor-blink { animation: blink 1s infinite; }

/* ─── PRICING CARD ─── */
.plan-card { position: relative; overflow: hidden; }
.plan-card.popular { border: 2px solid var(--accent); }
.plan-ribbon {
    position: absolute; top: 16px; right: -32px; background: var(--gradient);
    color: #fff; padding: 4px 40px; font-size: 11px; font-weight: 700;
    transform: rotate(45deg); letter-spacing: .5px;
}
.plan-name { font-size: 14px; font-weight: 700; color: var(--accent); letter-spacing: 2px; margin-bottom: 8px; }
.plan-price { font-size: 42px; font-weight: 900; font-family: var(--mono); letter-spacing: -2px; }
.plan-per { color: var(--text-muted); font-size: 14px; }
.plan-specs { display: flex; flex-direction: column; gap: 12px; padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin: 16px 0; }
.plan-spec { display: flex; justify-content: space-between; font-size: 14px; }
.plan-spec-label { color: var(--text-muted); }
.plan-spec-value { font-weight: 600; font-family: var(--mono); }

/* ─── HERO ─── */
.hero { text-align: center; padding: 100px 0 80px; }
.hero h1 {
    font-size: clamp(36px, 6vw, 72px); font-weight: 900; line-height: 1.05;
    letter-spacing: -2px; margin: 24px 0 20px;
    background: linear-gradient(135deg, #fff 30%, #3b82f6 70%, #8b5cf6);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-size: 200% 200%; animation: gradientShift 6s ease infinite;
}
.hero p { font-size: 18px; color: var(--text-muted); max-width: 560px; margin: 0 auto 40px; line-height: 1.7; }
.hero-btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ─── FEATURES ─── */
.feat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 80px; }
.feat-icon {
    width: 48px; height: 48px; border-radius: 12px; background: var(--bg-surface);
    display: flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 16px;
}
.feat-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.feat-desc { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

/* ─── QUICK AMOUNT BTNS ─── */
.amount-btns { display: flex; gap: 8px; margin-top: 10px; }
.amount-btn {
    flex: 1; padding: 6px 0; border: 1px solid var(--border); border-radius: 8px;
    background: transparent; color: var(--text-muted); cursor: pointer;
    font-size: 13px; font-weight: 600; font-family: var(--mono); transition: all .2s;
}
.amount-btn:hover, .amount-btn.active { background: var(--accent-glow); color: var(--accent); border-color: var(--accent); }

/* ─── DETAIL ROWS ─── */
.detail-row {
    display: flex; justify-content: space-between; padding: 8px 0;
    border-bottom: 1px solid rgba(21,31,51,.5); font-size: 14px;
}
.detail-row:last-child { border-bottom: none; }
.detail-label { color: var(--text-muted); }
.detail-value { font-weight: 600; font-family: var(--mono); font-size: 13px; }

/* ─── EVENT LOG ─── */
.log-item {
    display: flex; align-items: center; gap: 12px; padding: 10px 0;
    border-bottom: 1px solid rgba(21,31,51,.3); font-size: 14px;
}
.log-item:last-child { border-bottom: none; }
.log-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.log-time { font-family: var(--mono); font-size: 12px; color: var(--text-dim); flex-shrink: 0; min-width: 48px; }

/* ─── FOOTER ─── */
.footer { border-top: 1px solid var(--border); padding: 40px 24px; text-align: center; }
.footer p { color: var(--text-dim); font-size: 13px; }

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
    .hero h1 { font-size: 32px; letter-spacing: -1px; }
    .sel-grid { grid-template-columns: 1fr; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .srv-item { flex-wrap: wrap; gap: 12px; }
    .srv-right { width: 100%; text-align: left; }
    .nav { gap: 2px; }
    .nav-link { padding: 6px 8px; font-size: 12px; }
    .container { padding: 0 16px; }
}
