/**
 * Xundefined Labs - Dark Hacker / Cyber Lab Theme
 * High-performance, Accessible, Fully Responsive CSS
 */

/* ==========================================================================
   CSS CUSTOM PROPERTIES (DESIGN SYSTEM)
   ========================================================================== */
:root {
    /* Color Palette */
    --bg-base: #050505;
    --bg-surface: #0a0a0a;
    --bg-surface-elevated: #111111;
    --bg-card: rgba(14, 14, 14, 0.88);
    --bg-card-hover: rgba(22, 12, 14, 0.95);
    --bg-input: rgba(10, 10, 10, 0.9);

    /* Red Accent Hierarchy */
    --red-primary: #ff1744;
    --red-vivid: #ff003c;
    --red-deep: #b30026;
    --red-dark: #660015;
    --red-glow: rgba(255, 23, 68, 0.35);
    --red-glow-soft: rgba(255, 23, 68, 0.15);
    --red-glow-strong: rgba(255, 23, 68, 0.65);
    --red-border: rgba(255, 23, 68, 0.22);
    --red-border-hover: rgba(255, 23, 68, 0.75);

    /* Neutral & Status Tones */
    --text-primary: #f5f5f5;
    --text-secondary: #a3a3a3;
    --text-muted: #6b6b6b;
    --text-dim: #444444;

    --status-online: #00ff66;
    --status-online-glow: rgba(0, 255, 102, 0.4);
    --status-offline: #ff1744;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

    /* Transitions & Curves */
    --ease-cyber: cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: 0.15s var(--ease-cyber);
    --transition-normal: 0.25s var(--ease-cyber);
    --transition-slow: 0.4s var(--ease-cyber);

    /* Radii */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.5;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   CYBER BACKGROUND ELEMENTS
   ========================================================================== */
/* Grid Pattern */
.cyber-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(to right, rgba(255, 23, 68, 0.035) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 23, 68, 0.035) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

/* Scanline Effect */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        rgba(18, 16, 16, 0) 50%, 
        rgba(0, 0, 0, 0.25) 50%
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 1;
    opacity: 0.65;
}

/* Ambient Canvas */
.ambient-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* ==========================================================================
   APP HEADER
   ========================================================================== */
.app-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--red-border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.header-container {
    max-width: 1360px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

/* Brand */
.brand-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    font-family: var(--font-mono);
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    line-height: 1;
    user-select: none;
}

.logo-bracket {
    color: var(--red-primary);
    opacity: 0.8;
}

.logo-symbol {
    color: #ffffff;
    padding: 0 2px;
    text-shadow: 0 0 10px var(--red-glow);
}

.brand-details {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #ffffff;
    line-height: 1.2;
}

.brand-subtitle {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--red-primary);
    letter-spacing: 0.12em;
    font-weight: 600;
    text-transform: uppercase;
}

/* Header Status & Controls */
.header-status-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.system-status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(10, 10, 10, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: #dddddd;
    letter-spacing: 0.06em;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.online {
    background-color: var(--status-online);
    box-shadow: 0 0 8px var(--status-online-glow);
    animation: statusPulse 2s infinite ease-in-out;
}

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

.live-clock-widget {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: rgba(18, 18, 18, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 6px 12px;
    border-radius: var(--radius-full);
}

.live-clock-widget i {
    color: var(--red-primary);
    font-size: 0.8rem;
}

/* Logout Button */
.cyber-logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 23, 68, 0.08);
    border: 1px solid var(--red-border);
    color: #ffffff;
    padding: 7px 14px;
    border-radius: var(--radius-md);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.cyber-logout-btn:hover,
.cyber-logout-btn:focus-visible {
    background: rgba(255, 23, 68, 0.2);
    border-color: var(--red-primary);
    color: #ffffff;
    box-shadow: 0 0 14px var(--red-glow);
    transform: translateY(-1px);
}

.cyber-logout-btn:active {
    transform: translateY(0);
}

/* ==========================================================================
   DASHBOARD MAIN CONTAINER
   ========================================================================== */
.dashboard-main {
    position: relative;
    z-index: 10;
    padding: 32px 24px 64px;
    min-height: calc(100vh - 140px);
}

.main-container {
    max-width: 1360px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* ==========================================================================
   TERMINAL BANNER
   ========================================================================== */
.terminal-banner {
    background: var(--bg-card);
    border: 1px solid var(--red-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
}

.terminal-banner-header {
    background: rgba(5, 5, 5, 0.8);
    border-bottom: 1px solid rgba(255, 23, 68, 0.15);
    padding: 8px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

.terminal-prompt {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
}

.prompt-user {
    color: var(--red-primary);
}

.prompt-separator {
    color: var(--text-dim);
}

.prompt-dir {
    color: #64b5f6;
}

.prompt-symbol {
    color: #ffffff;
}

.prompt-cmd {
    color: #dedede;
    margin-left: 4px;
}

.terminal-badge {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    padding: 2px 8px;
    background: rgba(255, 23, 68, 0.12);
    border: 1px solid rgba(255, 23, 68, 0.3);
    border-radius: var(--radius-sm);
    color: var(--red-primary);
    font-weight: 600;
}

.terminal-banner-body {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.welcome-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.welcome-heading {
    font-size: 1.35rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.01em;
}

.welcome-subtext {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Search / Filter bar */
.filter-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    font-size: 0.85rem;
    pointer-events: none;
}

.tool-filter-input {
    background: rgba(8, 8, 8, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 8px 36px 8px 34px;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 0.82rem;
    width: 240px;
    transition: all var(--transition-fast);
}

.tool-filter-input:focus {
    outline: none;
    border-color: var(--red-primary);
    box-shadow: 0 0 12px var(--red-glow);
    width: 280px;
}

.tool-filter-input::placeholder {
    color: var(--text-dim);
    font-size: 0.8rem;
}

.clear-search-btn {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    border-radius: 50%;
}

.clear-search-btn:hover {
    color: #ffffff;
}

.node-count-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(18, 18, 18, 0.8);
    border: 1px solid var(--red-border);
    padding: 8px 12px;
    border-radius: var(--radius-md);
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

.node-count-num {
    color: var(--red-primary);
    font-weight: 700;
}

.node-count-label {
    color: var(--text-muted);
    font-size: 0.7rem;
}

/* ==========================================================================
   TOOLBOX SECTION
   ========================================================================== */
.toolbox-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.section-title-bar {
    display: flex;
    align-items: center;
    gap: 16px;
}

.title-with-icon {
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-icon {
    color: var(--red-primary);
    font-size: 1.1rem;
}

.section-heading {
    font-family: var(--font-mono);
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.08em;
}

.section-divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(
        to right,
        var(--red-border),
        rgba(255, 23, 68, 0.05) 80%,
        transparent
    );
}

.section-meta-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-dim);
    letter-spacing: 0.08em;
}

/* ==========================================================================
   MENU GRID & SQUARE CARDS
   ========================================================================== */
.menu-grid {
    display: grid;
    /* Desktop Default: 4-5 cards per row */
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

/* Tool Card - Launcher Node */
.tool-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    aspect-ratio: 1 / 1;
    min-height: 220px;
    background: var(--bg-card);
    border: 1px solid var(--red-border);
    border-radius: var(--radius-xl);
    padding: 20px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
    cursor: pointer;
    transition: 
        transform var(--transition-normal), 
        border-color var(--transition-normal), 
        box-shadow var(--transition-normal),
        background-color var(--transition-normal);
}

/* Hover Ambient Glow Overlay inside Card */
.tool-card .card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle at 50% 50%, 
        rgba(255, 23, 68, 0.12), 
        transparent 65%
    );
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
    z-index: 1;
}

/* Card Hover State */
.tool-card:hover {
    transform: translateY(-6px);
    border-color: var(--red-border-hover);
    background: var(--bg-card-hover);
    box-shadow: 
        0 14px 36px rgba(0, 0, 0, 0.7),
        0 0 24px var(--red-glow-soft);
}

.tool-card:hover .card-glow {
    opacity: 1;
}

/* Card Focus & Active */
.tool-card:focus-visible {
    outline: none;
    border-color: var(--red-primary);
    box-shadow: 
        0 0 0 3px rgba(255, 23, 68, 0.4),
        0 0 20px var(--red-glow);
    transform: translateY(-4px);
}

.tool-card:active {
    transform: scale(0.98);
}

/* Card Top: Badge & Indicator */
.tool-card-header {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.tool-badge {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 3px 8px;
    background: rgba(255, 23, 68, 0.1);
    border: 1px solid rgba(255, 23, 68, 0.3);
    color: var(--red-primary);
    border-radius: var(--radius-sm);
    text-transform: uppercase;
}

.tool-ext-indicator {
    color: var(--text-dim);
    font-size: 0.85rem;
    transition: color var(--transition-fast), transform var(--transition-fast);
}

.tool-card:hover .tool-ext-indicator {
    color: var(--red-primary);
    transform: translate(2px, -2px);
}

/* Card Center: Big Icon */
.tool-icon-box {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    margin: 6px auto 8px;
    background: rgba(255, 23, 68, 0.06);
    border: 1px solid rgba(255, 23, 68, 0.2);
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
}

.tool-main-icon {
    font-size: 1.85rem;
    color: #ffffff;
    transition: all var(--transition-normal);
}

.tool-card:hover .tool-icon-box {
    background: rgba(255, 23, 68, 0.18);
    border-color: var(--red-primary);
    box-shadow: 0 0 18px var(--red-glow);
    transform: scale(1.08);
}

.tool-card:hover .tool-main-icon {
    color: var(--red-primary);
}

/* Card Body: Title & Desc */
.tool-card-body {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
}

.tool-card-title {
    font-size: 0.96rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.25;
    letter-spacing: -0.01em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--transition-fast);
}

.tool-card:hover .tool-card-title {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.tool-card-description {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Card Footer: Subtle Launch Bar */
.tool-card-footer {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.tool-launch-text {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    transition: color var(--transition-fast);
}

.tool-arrow-icon {
    font-size: 0.7rem;
    color: var(--text-dim);
    transition: all var(--transition-fast);
}

.tool-card:hover .tool-launch-text {
    color: var(--red-primary);
}

.tool-card:hover .tool-arrow-icon {
    color: var(--red-primary);
    transform: translateX(3px);
}

/* Empty State / No Results */
.empty-state,
.no-search-results {
    background: var(--bg-card);
    border: 1px dashed var(--red-border);
    border-radius: var(--radius-xl);
    padding: 48px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.empty-icon,
.no-results-icon {
    font-size: 2.5rem;
    color: var(--red-primary);
    opacity: 0.8;
}

.empty-title,
.no-results-title {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: #ffffff;
    letter-spacing: 0.05em;
}

.empty-desc,
.no-results-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    max-width: 420px;
}

/* ==========================================================================
   APP FOOTER
   ========================================================================== */
.app-footer {
    position: relative;
    z-index: 10;
    background: rgba(5, 5, 5, 0.9);
    border-top: 1px solid var(--red-border);
    padding: 18px 24px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
}

.footer-container {
    max-width: 1360px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-left,
.footer-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-brand {
    color: #dedede;
    font-weight: 600;
}

.footer-brand i {
    color: var(--red-primary);
}

.footer-slash {
    color: var(--text-dim);
}

.footer-tagline,
.footer-status,
.footer-version {
    color: var(--text-muted);
}

/* ==========================================================================
   LOGIN PAGE SPECIFIC STYLES
   ========================================================================== */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
}

.login-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 440px;
}

.login-card-container {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--red-border);
    border-radius: var(--radius-xl);
    padding: 36px 32px;
    box-shadow: 
        0 16px 48px rgba(0, 0, 0, 0.8),
        0 0 30px var(--red-glow-soft);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

/* Cyber Corner Accents */
.cyber-corner {
    position: absolute;
    width: 12px;
    height: 12px;
    border-color: var(--red-primary);
    pointer-events: none;
}

.cyber-corner.top-left {
    top: -1px;
    left: -1px;
    border-top: 2px solid var(--red-primary);
    border-left: 2px solid var(--red-primary);
    border-top-left-radius: var(--radius-xl);
}

.cyber-corner.top-right {
    top: -1px;
    right: -1px;
    border-top: 2px solid var(--red-primary);
    border-right: 2px solid var(--red-primary);
    border-top-right-radius: var(--radius-xl);
}

.cyber-corner.bottom-left {
    bottom: -1px;
    left: -1px;
    border-bottom: 2px solid var(--red-primary);
    border-left: 2px solid var(--red-primary);
    border-bottom-left-radius: var(--radius-xl);
}

.cyber-corner.bottom-right {
    bottom: -1px;
    right: -1px;
    border-bottom: 2px solid var(--red-primary);
    border-right: 2px solid var(--red-primary);
    border-bottom-right-radius: var(--radius-xl);
}

/* Login Header */
.login-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 26px;
}

.login-logo-badge {
    font-family: var(--font-mono);
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 12px;
    user-select: none;
}

.login-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.01em;
    margin-bottom: 4px;
}

.login-subtitle {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--red-primary);
    letter-spacing: 0.14em;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.terminal-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid rgba(255, 23, 68, 0.25);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: #dedede;
    letter-spacing: 0.08em;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background: var(--red-primary);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--red-glow);
    animation: statusPulse 1.8s infinite ease-in-out;
}

/* Alert Box */
.cyber-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(255, 23, 68, 0.1);
    border: 1px solid var(--red-primary);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin-bottom: 22px;
    box-shadow: 0 0 15px rgba(255, 23, 68, 0.2);
    animation: alertShake 0.4s var(--ease-cyber);
}

@keyframes alertShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}

.cyber-alert-icon {
    color: var(--red-primary);
    font-size: 1.25rem;
    line-height: 1;
    margin-top: 2px;
}

.cyber-alert-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cyber-alert-title {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--red-primary);
    letter-spacing: 0.08em;
}

.cyber-alert-msg {
    font-size: 0.8rem;
    color: #f1f1f1;
    line-height: 1.35;
}

/* Form Styles */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    color: #cccccc;
    letter-spacing: 0.08em;
}

.form-label i {
    color: var(--red-primary);
}

.input-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-container .cyber-input {
    padding-right: 44px;
}

.cyber-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid rgba(255, 23, 68, 0.28);
    color: #ffffff;
    padding: 11px 15px;
    border-radius: var(--radius-md);
    font-family: var(--font-mono);
    font-size: 0.86rem;
    letter-spacing: 0.03em;
    outline: none;
    transition: all var(--transition-fast);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.cyber-input:hover {
    border-color: rgba(255, 23, 68, 0.55);
    background: rgba(14, 14, 14, 0.95);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4), 0 0 8px rgba(255, 23, 68, 0.15);
}

.cyber-input:focus {
    outline: none;
    border-color: var(--red-primary);
    box-shadow: 0 0 16px var(--red-glow), inset 0 2px 4px rgba(0, 0, 0, 0.4);
    background: rgba(16, 16, 16, 0.98);
}

.cyber-input::placeholder {
    color: var(--text-dim);
    font-family: var(--font-sans);
    font-size: 0.82rem;
    letter-spacing: normal;
}

.input-action-btn {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition-fast);
}

.input-action-btn:hover {
    color: var(--red-primary);
}

/* Submit Button */
.cyber-submit-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: linear-gradient(135deg, #ff1744 0%, #b30026 100%);
    border: 1px solid #ff4569;
    color: #ffffff;
    padding: 13px 20px;
    border-radius: var(--radius-md);
    font-family: var(--font-mono);
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    cursor: pointer;
    box-shadow: 0 4px 20px var(--red-glow);
    transition: all var(--transition-normal);
    overflow: hidden;
}

.cyber-submit-btn:hover {
    background: linear-gradient(135deg, #ff2d55 0%, #d50032 100%);
    box-shadow: 0 6px 26px var(--red-glow-strong);
    transform: translateY(-2px);
}

.cyber-submit-btn:active {
    transform: translateY(0);
}

.cyber-submit-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 23, 68, 0.5), 0 0 20px var(--red-glow);
}

.btn-icon {
    font-size: 1.2rem;
    transition: transform var(--transition-fast);
}

.cyber-submit-btn:hover .btn-icon {
    transform: translateX(4px);
}

/* Login Footer */
.login-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
}

.footer-meta {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.footer-meta .meta-item i {
    color: var(--red-primary);
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (MOBILE & TABLET LAUNCHER MATRIX)
   ========================================================================== */

/* Large Screens (Desktop): 4 - 5 cards per row */
@media (min-width: 1200px) {
    .menu-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 22px;
    }
}

/* Medium Screens (Tablet): 3 cards per row */
@media (min-width: 768px) and (max-width: 1199px) {
    .menu-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
    }

    .tool-card {
        padding: 16px;
        min-height: 200px;
    }

    .tool-icon-box {
        width: 52px;
        height: 52px;
        margin: 4px auto 6px;
    }

    .tool-main-icon {
        font-size: 1.65rem;
    }
}

/* Mobile Screens (Phone): 2 cards per row */
@media (max-width: 767px) {
    .dashboard-main {
        padding: 20px 14px 48px;
    }

    .header-container {
        padding: 12px 14px;
    }

    .brand-title {
        font-size: 1.05rem;
    }

    .brand-subtitle {
        font-size: 0.62rem;
    }

    .live-clock-widget {
        display: none; /* Hide clock on mobile for clean compact header */
    }

    .logout-label {
        display: none; /* Icon only logout button on mobile */
    }

    .cyber-logout-btn {
        padding: 7px 10px;
    }

    .terminal-banner-body {
        padding: 16px 14px;
        flex-direction: column;
        align-items: stretch;
    }

    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .tool-filter-input {
        width: 100%;
    }

    .tool-filter-input:focus {
        width: 100%;
    }

    .node-count-badge {
        justify-content: center;
    }

    /* Strict 2-column mobile application launcher grid */
    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .tool-card {
        padding: 14px 10px;
        border-radius: var(--radius-lg);
        min-height: 170px;
    }

    .tool-icon-box {
        width: 44px;
        height: 44px;
        margin: 2px auto 4px;
        border-radius: var(--radius-md);
    }

    .tool-main-icon {
        font-size: 1.4rem;
    }

    .tool-card-title {
        font-size: 0.84rem;
        line-height: 1.2;
    }

    .tool-card-description {
        font-size: 0.68rem;
        -webkit-line-clamp: 2;
    }

    .tool-badge {
        font-size: 0.58rem;
        padding: 2px 6px;
    }

    .tool-launch-text {
        font-size: 0.58rem;
    }

    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 6px;
    }
}

/* Extra Small Mobile (< 400px): Still 2 cards per row, ultra-compact */
@media (max-width: 399px) {
    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .tool-card {
        padding: 10px 8px;
        min-height: 155px;
    }

    .tool-card-title {
        font-size: 0.78rem;
    }

    .tool-card-description {
        display: none; /* Hide description on tiny screens for ultra-clean launcher look */
    }

    .tool-card-footer {
        padding-top: 4px;
    }
}

/* ==========================================================================
   ACCESSIBILITY: PREFERS REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .status-dot.online,
    .pulse-dot {
        animation: none !important;
    }
}

/* ==========================================================================
   TOOL WORKSPACE & COMMON CYBER COMPONENTS
   ========================================================================== */
.cyber-nav-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 23, 68, 0.08);
    border: 1px solid var(--red-border);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: var(--radius-md);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.cyber-nav-back-btn:hover {
    background: rgba(255, 23, 68, 0.2);
    border-color: var(--red-primary);
    box-shadow: 0 0 14px var(--red-glow);
    color: #ffffff;
    transform: translateY(-1px);
}

.cyber-nav-back-btn i {
    color: var(--red-primary);
}

/* Tool Header Details */
.tool-header-banner {
    background: var(--bg-card);
    border: 1px solid var(--red-border);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    position: relative;
    overflow: hidden;
}

.tool-header-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--red-primary);
    box-shadow: 0 0 12px var(--red-glow-strong);
}

.tool-header-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tool-header-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--red-primary);
    background: rgba(255, 23, 68, 0.1);
    border: 1px solid rgba(255, 23, 68, 0.3);
    border-radius: var(--radius-full);
    padding: 3px 12px;
    width: fit-content;
}

.tool-header-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.tool-header-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

/* Cyber Tab Navigation */
.cyber-tabs-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    background: rgba(10, 10, 10, 0.85);
    border: 1px solid var(--red-border);
    border-radius: var(--radius-lg);
    padding: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
}

.cyber-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.cyber-tab-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.cyber-tab-btn.active {
    color: #ffffff;
    background: rgba(255, 23, 68, 0.18);
    border-color: var(--red-primary);
    box-shadow: 0 0 14px var(--red-glow-soft);
}

.cyber-tab-btn i {
    font-size: 0.9rem;
    color: var(--red-primary);
}

.cyber-tab-btn.active i {
    color: #ffffff;
}

/* Tab Panels */
.cyber-tab-panel {
    display: none;
    animation: cyberFadeIn 0.25s var(--ease-cyber);
}

.cyber-tab-panel.active {
    display: block;
}

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

/* Cyber Cards / Panels */
.cyber-panel {
    background: var(--bg-card);
    border: 1px solid var(--red-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}

.cyber-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.cyber-panel-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ffffff;
}

.cyber-panel-title i {
    color: var(--red-primary);
    font-size: 1rem;
}

/* ==========================================================================
   SCROLLBAR STYLING (GLOBAL CYBER SCROLL)
   ========================================================================== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(8, 8, 8, 0.9);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 23, 68, 0.3);
    border-radius: var(--radius-full);
    transition: background var(--transition-fast);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--red-primary);
    box-shadow: 0 0 10px var(--red-glow);
}

/* ==========================================================================
   FORM CONTROLS & INPUT SYSTEM (CYBER MASTER SYSTEM)
   ========================================================================== */
.cyber-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.cyber-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #cfcfcf;
    margin-top: 14px;
    margin-bottom: 8px;
    text-transform: uppercase;
    user-select: none;
}

.cyber-label:first-child {
    margin-top: 0;
}

.cyber-label i {
    color: var(--red-primary);
    font-size: 0.85rem;
}

.cyber-label-hint {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 400;
    text-transform: none;
    margin-left: auto;
    letter-spacing: normal;
}

/* Textarea */
.cyber-textarea {
    width: 100%;
    min-height: 110px;
    background: var(--bg-input);
    border: 1px solid rgba(255, 23, 68, 0.28);
    border-radius: var(--radius-md);
    color: #f5f5f5;
    font-family: var(--font-mono);
    font-size: 0.84rem;
    line-height: 1.6;
    padding: 12px 14px;
    outline: none;
    transition: all var(--transition-fast);
    resize: vertical;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.cyber-textarea:hover {
    border-color: rgba(255, 23, 68, 0.55);
    background: rgba(12, 12, 12, 0.95);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5), 0 0 8px rgba(255, 23, 68, 0.15);
}

.cyber-textarea:focus {
    border-color: var(--red-primary);
    box-shadow: 0 0 16px var(--red-glow), inset 0 2px 4px rgba(0, 0, 0, 0.5);
    background: rgba(15, 15, 15, 0.98);
}

.cyber-textarea::placeholder {
    color: var(--text-dim);
    font-family: var(--font-sans);
    font-size: 0.82rem;
    letter-spacing: normal;
}

/* Select Dropdown */
.cyber-select {
    width: 100%;
    height: 42px;
    background-color: var(--bg-input);
    border: 1px solid rgba(255, 23, 68, 0.28);
    border-radius: var(--radius-md);
    color: #ffffff;
    font-family: var(--font-mono);
    font-size: 0.84rem;
    padding: 8px 38px 8px 14px;
    outline: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23ff1744' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 13px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.cyber-select:hover {
    border-color: rgba(255, 23, 68, 0.55);
    background-color: rgba(14, 14, 14, 0.95);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5), 0 0 8px rgba(255, 23, 68, 0.15);
}

.cyber-select:focus {
    border-color: var(--red-primary);
    box-shadow: 0 0 16px var(--red-glow), inset 0 2px 4px rgba(0, 0, 0, 0.5);
    background-color: rgba(16, 16, 16, 0.98);
}

.cyber-select option {
    background: #111111;
    color: #ffffff;
    padding: 10px;
    font-family: var(--font-mono);
}

/* File Input Custom Selector */
input[type=file].cyber-input {
    padding: 8px 12px;
    cursor: pointer;
}

input[type=file].cyber-input::file-selector-button,
input[type=file].cyber-input::-webkit-file-upload-button {
    background: linear-gradient(135deg, rgba(255, 23, 68, 0.25) 0%, rgba(179, 0, 38, 0.35) 100%);
    border: 1px solid var(--red-primary);
    color: #ffffff;
    padding: 6px 14px;
    margin-right: 12px;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all var(--transition-fast);
}

input[type=file].cyber-input:hover::file-selector-button,
input[type=file].cyber-input:hover::-webkit-file-upload-button {
    background: linear-gradient(135deg, #ff1744 0%, #b30026 100%);
    box-shadow: 0 0 12px var(--red-glow);
}

/* Number Input Spinners */
input[type=number].cyber-input::-webkit-inner-spin-button,
input[type=number].cyber-input::-webkit-outer-spin-button {
    opacity: 0.6;
    filter: invert(1);
    cursor: pointer;
    height: 24px;
}

/* Custom Cyber Checkboxes & Options */
.charset-checkbox-lbl,
.opt-item,
.cyber-checkbox-label {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 0.76rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    user-select: none;
    border: 1px solid transparent;
}

.charset-checkbox-lbl:hover,
.opt-item:hover,
.cyber-checkbox-label:hover {
    color: #ffffff;
    background: rgba(255, 23, 68, 0.08);
    border-color: rgba(255, 23, 68, 0.25);
}

.charset-checkbox-lbl input[type=checkbox],
.opt-item input[type=checkbox],
.cyber-checkbox-label input[type=checkbox],
.cyber-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 17px;
    height: 17px;
    border: 1.5px solid rgba(255, 23, 68, 0.45);
    border-radius: 4px;
    background: rgba(10, 10, 10, 0.85);
    cursor: pointer;
    display: inline-grid;
    place-content: center;
    transition: all var(--transition-fast);
    flex-shrink: 0;
    margin: 0;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6);
}

.charset-checkbox-lbl input[type=checkbox]:hover,
.opt-item input[type=checkbox]:hover,
.cyber-checkbox-label input[type=checkbox]:hover,
.cyber-checkbox:hover {
    border-color: var(--red-primary);
    box-shadow: 0 0 8px var(--red-glow-soft);
}

.charset-checkbox-lbl input[type=checkbox]:checked,
.opt-item input[type=checkbox]:checked,
.cyber-checkbox-label input[type=checkbox]:checked,
.cyber-checkbox:checked {
    background: var(--red-primary);
    border-color: var(--red-primary);
    box-shadow: 0 0 12px var(--red-glow);
}

.charset-checkbox-lbl input[type=checkbox]:checked::before,
.opt-item input[type=checkbox]:checked::before,
.cyber-checkbox-label input[type=checkbox]:checked::before,
.cyber-checkbox:checked::before {
    content: "";
    width: 9px;
    height: 5px;
    border-left: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    transform: rotate(-45deg) translate(1px, -1px);
}

/* ==========================================================================
   CYBER CHIPS & SELECTION BUTTONS
   ========================================================================== */
.cyber-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.cyber-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(18, 18, 18, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
    user-select: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.cyber-chip:hover {
    border-color: rgba(255, 23, 68, 0.6);
    color: #ffffff;
    background: rgba(255, 23, 68, 0.1);
    box-shadow: 0 0 12px rgba(255, 23, 68, 0.25);
    transform: translateY(-1px);
}

.cyber-chip.active {
    background: rgba(255, 23, 68, 0.22);
    border-color: var(--red-primary);
    color: #ffffff;
    box-shadow: 0 0 16px var(--red-glow-soft);
}

.cyber-chip.active::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--red-primary);
    box-shadow: 0 0 6px var(--red-primary);
    margin-right: 2px;
}

/* ==========================================================================
   BUTTON MASTER SYSTEM
   ========================================================================== */
.cyber-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    text-decoration: none;
    overflow: hidden;
    transition: all var(--transition-fast);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.cyber-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -70%;
    width: 50%;
    height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: rotate(25deg);
    transition: all 0.6s ease;
    pointer-events: none;
    opacity: 0;
}

.cyber-btn:hover::after {
    left: 130%;
    opacity: 1;
}

.cyber-btn:hover {
    transform: translateY(-2px);
}

.cyber-btn:active {
    transform: translateY(1px) scale(0.985);
}

.cyber-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--bg-base), 0 0 0 4px var(--red-primary), 0 0 16px var(--red-glow);
}

.cyber-btn:disabled,
.cyber-btn.disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
    transform: none !important;
    box-shadow: none !important;
}

.cyber-btn i {
    font-size: 1.05em;
    transition: transform var(--transition-fast);
}

.cyber-btn:hover i {
    transform: scale(1.15);
}

/* Button Variants */
.cyber-btn-primary {
    background: linear-gradient(135deg, #ff1744 0%, #d50032 50%, #990022 100%);
    border-color: rgba(255, 100, 130, 0.5);
    color: #ffffff;
    box-shadow: 0 4px 18px rgba(255, 23, 68, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.cyber-btn-primary:hover {
    background: linear-gradient(135deg, #ff335c 0%, #e60039 50%, #b30026 100%);
    border-color: #ff809b;
    box-shadow: 0 6px 26px rgba(255, 23, 68, 0.65), 0 0 14px rgba(255, 23, 68, 0.4);
    color: #ffffff;
}

.cyber-btn-secondary {
    background: linear-gradient(135deg, rgba(32, 32, 32, 0.95) 0%, rgba(18, 18, 18, 0.95) 100%);
    border-color: rgba(255, 255, 255, 0.12);
    color: #e2e2e2;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.cyber-btn-secondary:hover {
    background: linear-gradient(135deg, rgba(46, 46, 46, 0.95) 0%, rgba(28, 28, 28, 0.95) 100%);
    border-color: rgba(255, 255, 255, 0.28);
    color: #ffffff;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.6);
}

.cyber-btn-outline {
    background: rgba(255, 23, 68, 0.04);
    border-color: rgba(255, 23, 68, 0.35);
    color: #f0f0f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.cyber-btn-outline:hover {
    background: rgba(255, 23, 68, 0.16);
    border-color: var(--red-primary);
    color: #ffffff;
    box-shadow: 0 0 18px var(--red-glow-soft);
}

.cyber-btn-teal,
.cyber-btn-cyan {
    background: linear-gradient(135deg, #00b4d8 0%, #0077b6 100%);
    border-color: #48cae4;
    color: #ffffff;
    box-shadow: 0 4px 18px rgba(0, 180, 216, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.cyber-btn-teal:hover,
.cyber-btn-cyan:hover {
    background: linear-gradient(135deg, #48cae4 0%, #0096c7 100%);
    border-color: #90e0ef;
    box-shadow: 0 6px 24px rgba(0, 180, 216, 0.6), 0 0 12px rgba(0, 180, 216, 0.35);
    color: #ffffff;
}

.cyber-btn-emerald,
.cyber-btn-success {
    background: linear-gradient(135deg, #00c853 0%, #007e33 100%);
    border-color: #00e676;
    color: #ffffff;
    box-shadow: 0 4px 18px rgba(0, 230, 118, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.cyber-btn-emerald:hover,
.cyber-btn-success:hover {
    background: linear-gradient(135deg, #00e676 0%, #00a844 100%);
    border-color: #69f0ae;
    box-shadow: 0 6px 24px rgba(0, 230, 118, 0.6);
    color: #ffffff;
}

.cyber-btn-amber,
.cyber-btn-warning {
    background: linear-gradient(135deg, #ff9100 0%, #d84315 100%);
    border-color: #ffab40;
    color: #ffffff;
    box-shadow: 0 4px 18px rgba(255, 145, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.cyber-btn-amber:hover,
.cyber-btn-warning:hover {
    background: linear-gradient(135deg, #ffa726 0%, #ef6c00 100%);
    box-shadow: 0 6px 24px rgba(255, 145, 0, 0.6);
    color: #ffffff;
}

.cyber-btn-purple {
    background: linear-gradient(135deg, #7c4dff 0%, #512da8 100%);
    border-color: #b388ff;
    color: #ffffff;
    box-shadow: 0 4px 18px rgba(124, 77, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.cyber-btn-purple:hover {
    background: linear-gradient(135deg, #8c66ff 0%, #5e35b1 100%);
    box-shadow: 0 6px 24px rgba(124, 77, 255, 0.6);
    color: #ffffff;
}

/* Button Sizes */
.cyber-btn-xs {
    padding: 4px 10px;
    font-size: 0.68rem;
    gap: 4px;
    border-radius: var(--radius-sm);
}

.cyber-btn-sm {
    padding: 6px 14px;
    font-size: 0.74rem;
    gap: 6px;
    border-radius: var(--radius-sm);
}

.cyber-btn-md {
    padding: 10px 20px;
    font-size: 0.82rem;
    gap: 8px;
    border-radius: var(--radius-md);
}

.cyber-btn-lg {
    padding: 13px 26px;
    font-size: 0.9rem;
    gap: 10px;
    border-radius: var(--radius-md);
}

.cyber-btn-icon {
    width: 38px;
    height: 38px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
}

.cyber-btn-block {
    width: 100%;
}

.cyber-btn-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

/* Copy Button */
.cyber-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: rgba(255, 23, 68, 0.08);
    border: 1px solid rgba(255, 23, 68, 0.3);
    color: #e8e8e8;
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    user-select: none;
}

.cyber-copy-btn:hover {
    background: rgba(255, 23, 68, 0.22);
    border-color: var(--red-primary);
    color: #ffffff;
    box-shadow: 0 0 12px var(--red-glow-soft);
    transform: translateY(-1px);
}

.cyber-copy-btn:active {
    transform: translateY(1px);
}

.cyber-copy-btn.copied {
    background: rgba(0, 255, 102, 0.16) !important;
    border-color: var(--status-online) !important;
    color: var(--status-online) !important;
    box-shadow: 0 0 14px rgba(0, 255, 102, 0.4) !important;
    transform: scale(1.03);
}

/* Sample Quick Preset Buttons */
.sample-btns-row {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin: 8px 0 12px;
}

.sample-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-family: var(--font-mono);
    font-weight: 600;
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    user-select: none;
}

.sample-btn:hover {
    border-color: var(--red-primary);
    color: #ffffff;
    background: rgba(255, 23, 68, 0.12);
    box-shadow: 0 0 10px var(--red-glow-soft);
    transform: translateY(-1px);
}

.sample-btn:active {
    background: rgba(255, 23, 68, 0.2);
    transform: translateY(1px);
}

/* ==========================================================================
   TOOL SPECIFIC UNIFIED COMPONENTS
   ========================================================================== */

/* Mode Selection Cards Grid */
.mode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.mode-card {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    cursor: pointer;
    background: rgba(18, 18, 18, 0.7);
    transition: all var(--transition-fast);
    position: relative;
    user-select: none;
}

.mode-card:hover {
    border-color: rgba(255, 23, 68, 0.5);
    background: rgba(255, 23, 68, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.mode-card.mc-active {
    border-color: var(--red-primary);
    background: rgba(255, 23, 68, 0.2);
    box-shadow: 0 0 16px var(--red-glow-soft);
}

.mc-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #ffffff;
    font-family: var(--font-mono);
    margin-bottom: 3px;
}

.mc-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* Description / Notice Callout Box */
.desc-box {
    font-size: 0.78rem;
    color: var(--text-secondary);
    background: rgba(10, 10, 10, 0.85);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    margin-bottom: 16px;
    line-height: 1.6;
    border-left: 3px solid var(--red-primary);
    font-family: var(--font-mono);
}

/* Options Bar */
.opts-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin: 12px 0 16px;
    padding: 10px 14px;
    background: rgba(12, 12, 12, 0.7);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Output Display Box */
.cyber-out-box {
    background: rgba(5, 5, 5, 0.95);
    border: 1px solid rgba(255, 23, 68, 0.22);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: #ffffff;
    word-break: break-all;
    white-space: pre-wrap;
    min-height: 70px;
    line-height: 1.7;
    max-height: 280px;
    overflow-y: auto;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.6);
}

/* Status Badges */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.b-ok {
    background: rgba(0, 255, 102, 0.15);
    color: var(--status-online);
    border: 1px solid rgba(0, 255, 102, 0.35);
}

.b-err {
    background: rgba(255, 23, 68, 0.15);
    color: var(--red-primary);
    border: 1px solid var(--red-primary);
}

.b-warn {
    background: rgba(255, 145, 0, 0.15);
    color: #ffab40;
    border: 1px solid rgba(255, 145, 0, 0.35);
}

/* Stats Matrix */
.cyber-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.cyber-stat-box {
    background: rgba(15, 15, 15, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    transition: all var(--transition-fast);
}

.cyber-stat-box:hover {
    border-color: rgba(255, 23, 68, 0.3);
    background: rgba(20, 20, 20, 0.95);
}

.cyber-stat-lbl {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 2px;
}

.cyber-stat-val {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
}

/* Syntax Highlighting */
.hl-hex { color: #ff708d; font-weight: 600; }
.hl-dec { color: #48cae4; font-weight: 600; }
.hl-named { color: #ffd166; font-weight: 600; }
.hl-key { color: #06d6a0; font-weight: 600; }
.hl-val { color: #118ab2; font-weight: 600; }

/* Homoglyph Keypad Matrix */
.char-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
    gap: 5px;
    margin: 8px 0 14px;
}

.char-cell {
    background: rgba(12, 12, 12, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: var(--radius-sm);
    padding: 6px 4px;
    text-align: center;
    font-size: 1rem;
    color: #ffffff;
    cursor: pointer;
    transition: all var(--transition-fast);
    user-select: none;
}

.char-cell:hover {
    border-color: var(--red-primary);
    background: rgba(255, 23, 68, 0.2);
    transform: scale(1.12);
    box-shadow: 0 0 12px var(--red-glow-soft);
}

.char-cell:active {
    transform: scale(0.95);
    background: var(--red-primary);
}

/* Example Presets Grid */
.example-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    margin: 8px 0 16px;
}

.example-chip {
    background: rgba(14, 14, 14, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
    user-select: none;
}

.example-chip:hover {
    border-color: var(--red-primary);
    background: rgba(255, 23, 68, 0.1);
    box-shadow: 0 0 14px var(--red-glow-soft);
    transform: translateY(-2px);
}

.example-chip:active {
    transform: translateY(0);
}

.example-chip .sample {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 3px;
}

.example-chip .label {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.section-label {
    font-size: 0.74rem;
    font-weight: 700;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--red-primary);
    margin: 14px 0 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Info Table */
.info-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    margin-top: 10px;
}

.info-table th {
    text-align: left;
    padding: 9px 12px;
    background: rgba(20, 20, 20, 0.9);
    color: var(--text-muted);
    border-bottom: 1px solid var(--red-border);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.info-table td {
    padding: 9px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
}

.info-table tr:hover td {
    background: rgba(255, 23, 68, 0.05);
}

.info-table code {
    color: #00ff66;
    background: rgba(0, 255, 102, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Charset Checkbox Matrix */
.charset-matrix-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
    margin: 10px 0 16px;
    max-height: 280px;
    overflow-y: auto;
    padding: 10px;
    background: rgba(10, 10, 10, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
}

/* Results Scroll List */
.results-scroll-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 520px;
    overflow-y: auto;
    margin-top: 14px;
    padding-right: 4px;
}

.result-item-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: rgba(12, 12, 12, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    transition: all var(--transition-fast);
}

.result-item-card:hover {
    border-color: rgba(255, 23, 68, 0.4);
    background: rgba(255, 23, 68, 0.04);
}

.result-seq-idx {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    min-width: 38px;
}

.result-content-wrap {
    flex: 1;
    min-width: 0;
}

.result-display-text {
    font-size: 0.95rem;
    color: #ffffff;
    font-weight: 500;
    word-break: break-all;
}

.result-debug-info {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--red-primary);
    background: rgba(255, 23, 68, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 4px;
    word-break: break-all;
    display: none;
}

/* Shortlink Result Cards */
.shortlink-result-card {
    background: rgba(14, 14, 14, 0.9);
    border: 1px solid rgba(255, 23, 68, 0.22);
    border-radius: var(--radius-md);
    padding: 18px;
    margin-bottom: 16px;
    position: relative;
    transition: border-color var(--transition-fast);
}

.shortlink-result-card.success {
    border-left: 4px solid var(--status-online);
}

.shortlink-result-card.error {
    border-left: 4px solid var(--red-primary);
}

.shortlink-meta-lbl {
    font-size: 0.72rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}

.shortlink-meta-val {
    font-size: 0.88rem;
    font-family: var(--font-mono);
    color: #ffffff;
    word-break: break-all;
    margin-bottom: 12px;
}

.shortlink-meta-val a {
    color: var(--red-primary);
    text-decoration: none;
}

.shortlink-meta-val a:hover {
    text-decoration: underline;
}

.variants-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(20, 20, 20, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    cursor: pointer;
    user-select: none;
    margin-top: 14px;
    transition: all var(--transition-fast);
}

.variants-header-row:hover {
    border-color: rgba(255, 23, 68, 0.4);
    background: rgba(255, 23, 68, 0.06);
}

.variants-box {
    background: rgba(10, 10, 10, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    padding: 12px;
    max-height: 420px;
    overflow-y: auto;
    display: none;
}

.variants-box.open {
    display: block;
}

.variant-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-family: var(--font-mono);
    font-size: 0.78rem;
}

.variant-item-row:last-child {
    border-bottom: none;
}

.variant-domain-badge {
    color: var(--text-muted);
    min-width: 130px;
    font-size: 0.74rem;
}

.variant-url-txt {
    color: var(--text-primary);
    flex: 1;
    word-break: break-all;
}

.variant-url-txt a {
    color: #ffffff;
    text-decoration: none;
}

.variant-url-txt a:hover {
    color: var(--red-primary);
    text-decoration: underline;
}

.api-docs-box {
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    background: rgba(12, 12, 12, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    margin-top: 20px;
    line-height: 1.8;
}

.api-docs-box code {
    color: var(--red-primary);
    background: rgba(255, 23, 68, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Font Injector Profile Diff */
.font-diff {
    background: rgba(10, 10, 10, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin-bottom: 14px;
}

.diff-row {
    display: flex;
    gap: 12px;
    align-items: baseline;
    margin: 4px 0;
    font-family: var(--font-mono);
}

.diff-k {
    font-size: 0.74rem;
    color: var(--text-muted);
    min-width: 100px;
}

.diff-v {
    font-size: 0.78rem;
    color: #00ff66;
}

/* Dropzone Upload */
.cyber-dropzone {
    border: 2px dashed var(--red-border);
    border-radius: var(--radius-lg);
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    background: rgba(255, 23, 68, 0.03);
    transition: all var(--transition-fast);
}

.cyber-dropzone:hover,
.cyber-dropzone.drag {
    border-color: var(--red-primary);
    background: rgba(255, 23, 68, 0.08);
    box-shadow: 0 0 20px var(--red-glow-soft);
}

.cyber-drop-icon {
    font-size: 2.2rem;
    color: var(--red-primary);
    margin-bottom: 8px;
    transition: transform var(--transition-fast);
}

.cyber-dropzone:hover .cyber-drop-icon {
    transform: translateY(-3px) scale(1.08);
}

/* Toast Feedback */
.cyber-toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: rgba(10, 10, 10, 0.95);
    border: 1px solid var(--red-primary);
    color: #ffffff;
    padding: 11px 24px;
    border-radius: var(--radius-full);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 600;
    box-shadow: 0 8px 28px var(--red-glow-strong);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 9999;
}

.cyber-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Grid Utilities */
.g2-grid,
.split-grid,
.config-two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

/* ==========================================================================
   RESPONSIVE ADJUSTMENTS FOR TOOLS
   ========================================================================== */
@media (max-width: 900px) {
    .split-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .tool-header-banner {
        padding: 18px 16px;
    }

    .tool-header-title {
        font-size: 1.2rem;
    }

    .cyber-panel {
        padding: 18px 14px;
    }

    .cyber-tabs-nav {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding: 6px;
        -webkit-overflow-scrolling: touch;
    }

    .cyber-tab-btn {
        padding: 7px 12px;
        font-size: 0.72rem;
    }

    .cyber-btn-row {
        flex-direction: column;
    }

    .cyber-btn {
        width: 100%;
    }

    .g2-grid,
    .config-two-cols {
        grid-template-columns: 1fr;
    }

    .charset-matrix-grid {
        grid-template-columns: 1fr;
    }
}

