:root {
--bg-deep: #050511;
--primary: #6d28d9;
--primary-glow: #8b5cf6;
--accent: #06b6d4;
--accent-glow: #67e8f9;
--danger: #ef4444;
--success: #10b981;
--text-main: #f8fafc;
--text-muted: #94a3b8;
--glass-bg: rgba(15, 23, 42, 0.7);
--glass-border: rgba(255, 255, 255, 0.1);
--font-main: 'Outfit', sans-serif;
}

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

/* ============================
CRITICAL SVG RESET (FIXED)
============================ */
svg {
display: block;
width: 20px;
height: 20px;
min-width: 20px;
}

/* Specific Sizes */
.logo-svg { width: 48px; height: 48px; color: var(--accent); }
.icon-md { width: 24px; height: 24px; color: var(--accent-glow); }
.icon-sm { width: 18px; height: 18px; }
.input-icon { width: 18px; height: 18px; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); z-index: 2; pointer-events: none;}
.chevron { width: 16px; height: 16px; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); pointer-events: none; }

/* ============================
LAYOUT & THEME
============================ */
body {
background-color: var(--bg-deep);
color: var(--text-main);
font-family: var(--font-main);
min-height: 100vh;
display: flex;
justify-content: center;
padding: 2rem 1rem;
overflow-x: hidden;
}

.app-container { width: 100%; max-width: 750px; position: relative; z-index: 1; }

.main-header { text-align: center; margin-bottom: 2.5rem; }
.logo-wrapper { display: inline-flex; align-items: center; gap: 15px; margin-bottom: 0.5rem; }
h1 { font-size: 2.2rem; font-weight: 700; letter-spacing: -1px; margin: 0; }
.highlight { background: linear-gradient(135deg, var(--primary-glow), var(--accent-glow)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.subtitle { color: var(--text-muted); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 2px; }

/* Glass Panels */
.glass-panel {
background: var(--glass-bg);
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
border: 1px solid var(--glass-border);
border-radius: 20px;
padding: 2rem;
margin-bottom: 2rem;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
transition: transform 0.3s ease;
}

.panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.title-group { display: flex; align-items: center; gap: 10px; }
.title-group h2 { font-size: 1.1rem; font-weight: 600; color: var(--text-main); margin: 0; }

/* Accordion */
.accordion-content { max-height: 0; overflow: hidden; opacity: 0; transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.accordion-content.active { max-height: 2000px; opacity: 1; margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--glass-border); }

/* Forms */
.input-block { margin-bottom: 1.25rem; }
.input-block label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--text-muted); margin-bottom: 0.5rem; margin-left: 4px; }
.input-wrapper, .select-wrapper { position: relative; display: block; }

input, select {
width: 100%;
background: rgba(0,0,0,0.3);
border: 1px solid var(--glass-border);
border-radius: 12px;
padding: 12px 12px 12px 42px;
color: var(--text-main);
font-family: var(--font-main);
font-size: 0.95rem;
transition: all 0.3s ease;
appearance: none;
}

input:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.2); }
input:focus + .input-icon { color: var(--primary-glow); }

/* Node Cards */
.nodes-grid { display: grid; gap: 1rem; margin-bottom: 1.5rem; }
.node-card {
background: rgba(255,255,255,0.03);
border: 1px solid var(--glass-border);
border-radius: 14px;
padding: 1.25rem;
animation: fadeIn 0.3s ease;
}
.node-header { display: flex; justify-content: space-between; margin-bottom: 1rem; font-size: 0.75rem; color: var(--text-muted); font-weight: 700; }

/* Buttons */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
padding: 10px 20px;
border-radius: 10px;
border: none;
font-weight: 600;
cursor: pointer;
font-size: 0.9rem;
transition: all 0.2s;
}
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-glow)); color: white; }
.btn-primary:hover { box-shadow: 0 0 15px var(--primary); transform: translateY(-1px); }
.btn-secondary { background: transparent; border: 1px solid var(--glass-border); color: var(--text-main); }
.btn-secondary:hover { background: rgba(255,255,255,0.05); }
.btn-glow { width: 100%; background: linear-gradient(135deg, var(--accent), var(--primary)); color: #000; font-weight: 700; text-transform: uppercase; }
.btn-glow:hover { box-shadow: 0 0 20px rgba(6, 182, 212, 0.5); }

.btn-icon, .btn-remove {
background: transparent; border: 1px solid var(--glass-border);
color: var(--text-muted); width: 36px; height: 36px;
border-radius: 8px; display: flex; align-items: center; justify-content: center;
cursor: pointer; transition: 0.2s;
}
.btn-icon:hover { background: rgba(255,255,255,0.1); color: var(--text-main); }
.btn-remove { border: none; color: var(--danger); }
.btn-remove:hover { background: rgba(239, 68, 68, 0.1); }
.btn-icon-sm { background: var(--bg-deep); border: 1px solid var(--glass-border); color: var(--success); width: 32px; height: 32px; border-radius: 6px; cursor: pointer; display: flex; align-items: center; justify-content: center; }

.action-row { display: flex; gap: 10px; justify-content: flex-end; }

/* Results */
.result-container { margin-top: 1.5rem; padding: 1rem; background: rgba(16, 185, 129, 0.1); border: 1px solid var(--success); border-radius: 12px; }
.hidden { display: none; }
.result-label { font-size: 0.7rem; color: var(--success); text-transform: uppercase; font-weight: 700; margin-bottom: 0.5rem; }
.result-content { display: flex; justify-content: space-between; align-items: center; background: rgba(0,0,0,0.3); padding: 10px; border-radius: 8px; }
#shortLinkDisplay { font-family: monospace; color: var(--text-main); font-size: 0.9rem; word-break: break-all; }

/* Toasts */
.toast-container { position: fixed; top: 20px; right: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 9999; }
.toast { padding: 12px 16px; background: var(--bg-deep); border-left: 4px solid; border-radius: 6px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); color: white; font-size: 0.9rem; display: flex; align-items: center; border: 1px solid var(--glass-border); animation: slideIn 0.3s ease; }
.toast.error { border-left-color: var(--danger); }
.toast.success { border-left-color: var(--success); }

@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
