:root {
    --bg-color: #050510;
    --card-bg: rgba(20, 20, 40, 0.6);
    --primary-color: #00f3ff;
    --secondary-color: #ff00ff;
    --text-color: #e0e0e0;
    --glass-border: 1px solid rgba(0, 243, 255, 0.1);
    --glow: 0 0 10px rgba(0, 243, 255, 0.5);
    --font-main: 'Rajdhani', sans-serif;
    --font-heading: 'Orbitron', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    overflow-x: hidden;
}

/* Background Scanline effect */
.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0),
            rgba(255, 255, 255, 0) 50%,
            rgba(0, 0, 0, 0.1) 50%,
            rgba(0, 0, 0, 0.1));
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 10;
}

#matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    /* Lower than card but higher than bg */
    pointer-events: none;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.app-container {
    width: 100%;
    max-width: 1200px;
    padding: 20px;
    position: relative;
    z-index: 200;
    /* Ensure app content sits above matrix */
}

/* Sections */
.active-section {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

.hidden-section {
    display: none;
}

/* Auth Card */
.tech-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: var(--glass-border);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    z-index: 1000;
    /* Highest priority */
}

/* Warning Blink Animation */
.blink-text {
    animation: text-blink 0.5s infinite alternate;
}

.entering-text {
    width: 100%;
    padding: 15px;
    /* Matches button padding */
    color: #f00;
    font-family: var(--font-heading);
    font-size: 1rem;
    text-align: center;
    letter-spacing: 2px;
    text-shadow: 0 0 10px #f00;
    cursor: default;
    animation: red-alert-blink 0.3s infinite alternate;
}

@keyframes text-blink {
    0% {
        opacity: 0.2;
        color: #fff;
    }

    100% {
        opacity: 1;
        color: var(--primary-color);
    }
}

@keyframes red-alert-blink {
    0% {
        opacity: 0.3;
    }

    100% {
        opacity: 1;
    }
}

.login-card {
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
}

/* Typography */
h1 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    text-shadow: var(--glow);
    font-size: 2.5rem;
    margin-bottom: 5px;
}

.subtitle {
    color: #889;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

/* Forms */
.input-group {
    margin-bottom: 20px;
    text-align: left;
}

label {
    display: block;
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

input {
    width: 100%;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #333;
    color: #fff;
    font-family: var(--font-main);
    font-size: 1.1rem;
    outline: none;
    transition: 0.3s;
}

input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 8px rgba(0, 243, 255, 0.3);
}

/* Buttons */
.cyber-btn {
    width: 100%;
    padding: 15px;
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    font-family: var(--font-heading);
    font-size: 1rem;
    cursor: pointer;
    transition: 0.3s;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.cyber-btn:hover {
    background: var(--primary-color);
    color: #000;
    box-shadow: var(--glow);
}

/* Cyberpunk Button Entry Animation */
.cyber-btn {
    position: relative;
    overflow: hidden;
}

.active-section .cyber-btn-animate {
    animation: cyber-glitch-entry 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.cyber-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 243, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: 0.5s;
    z-index: 1;
}

.cyber-btn:hover::before {
    transform: translateX(100%);
}

/* Border Draw Effect */
.active-section .cyber-btn-animate::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px solid var(--primary-color);
    z-index: -1;
    animation: cyber-border-draw 3s forwards cubic-bezier(0.19, 1, 0.22, 1);
    clip-path: polygon(0 0, 0 0, 0 0, 0 0);
}

/* Scanline Sweep */
.cyber-btn-scanline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(0, 243, 255, 0.5);
    box-shadow: 0 0 10px var(--primary-color);
    z-index: 2;
    pointer-events: none;
    opacity: 0;
}

.active-section .cyber-btn-animate .cyber-btn-scanline {
    animation: cyber-scanline-sweep 6s infinite;
}

/* Dashboard */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(0, 243, 255, 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    padding: 20px 30px;
    background: rgba(10, 10, 25, 0.8);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 100;
}

.top-bar::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    box-shadow: 0 0 10px var(--primary-color);
}

/* Brand and Logo Styles */
.brand {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 5px;
    transition: transform 0.3s ease;
}

.brand:hover {
    transform: scale(1.02);
}

.logo-text-container {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.alutech-main {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 700;
    color: transparent;
    background: linear-gradient(180deg, #fff 40%, rgba(0, 243, 255, 0.8) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    letter-spacing: 2px;
    position: relative;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
}

/* Glitch effect override for Alutech */
.alutech-main.glitch::before,
.alutech-main.glitch::after {
    color: #fff;
}

.alutech-sub {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: -5px;
    padding-left: 2px;
}

/* Cyberpunk SVG icons — angular stroke, neon glow */
.cyber-icon {
    width: 1.25em;
    height: 1.25em;
    display: inline-block;
    vertical-align: middle;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 4px currentColor);
    transition: filter 0.3s ease;
}

.icon-btn .cyber-icon,
.icon-btn-small .cyber-icon {
    width: 1.35em;
    height: 1.35em;
}

.icon-btn:hover .cyber-icon,
.icon-btn-small:hover .cyber-icon {
    filter: drop-shadow(0 0 8px var(--primary-color)) drop-shadow(0 0 12px var(--primary-color));
}

.group-icon .cyber-icon {
    width: 1em;
    height: 1em;
    stroke: var(--secondary-color);
    filter: drop-shadow(0 0 4px var(--secondary-color));
}

.lightning-icon .cyber-icon {
    stroke: #ffe600;
    filter: drop-shadow(0 0 6px #ffe600) drop-shadow(0 0 10px #ffaa00);
    animation: flash 3s infinite;
}

.lightning-icon {
    display: inline-flex;
    align-items: center;
    color: #ffe600;
    animation: flash 3s infinite;
}

.lightning-icon .cyber-icon {
    width: 1.4rem;
    height: 1.4rem;
}

.uptime-text {
    font-family: var(--font-heading);
    color: #0f0;
    /* Neon Green */
    font-size: 1.2rem;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(0, 255, 0, 0.8);
    letter-spacing: 1px;
    background: linear-gradient(180deg, #baffba, #00ff00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.services-text {
    font-family: var(--font-main);
    color: #a0a0b0;
    /* Metallic silver/blue */
    font-size: 1.2rem;
    font-weight: 500;
    text-transform: lowercase;
    text-shadow: 0 0 2px rgba(160, 160, 176, 0.5);
    letter-spacing: 0.5px;
    margin-left: 5px;
    font-variant: small-caps;
}

@keyframes flash {

    0%,
    90%,
    100% {
        opacity: 1;
    }

    92% {
        opacity: 0.5;
    }

    94% {
        opacity: 1;
    }

    96% {
        opacity: 0.2;
    }

    98% {
        opacity: 1;
    }
}

.controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.icon-btn {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 243, 255, 0.3);
    color: rgba(255, 255, 255, 0.8);
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
    /* Slight roundness for pro feel, or 0 for strict brutalism */
    position: relative;
    overflow: hidden;
}

.icon-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 243, 255, 0.2), transparent);
    transition: 0.5s;
}

.icon-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
    transform: translateY(-2px);
}

.icon-btn:hover::before {
    left: 100%;
}

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

.nav-btn {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 243, 255, 0.3);
    color: rgba(255, 255, 255, 0.8);
    padding: 0 20px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.9rem;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
    text-decoration: none;
    letter-spacing: 1px;
}

.nav-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
    transform: translateY(-2px);
}

.stats-panel {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.stat-card {
    flex: 1;
    min-width: 200px;
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 5px;
    border-left: 3px solid var(--secondary-color);
}

.stat-card h3 {
    margin: 0;
    font-size: 0.9rem;
    color: #888;
}

.stat-value {
    font-size: 2rem;
    font-family: var(--font-heading);
    margin-top: 10px;
}

.status-ok {
    color: #0f0;
    text-shadow: 0 0 5px #0f0;
}

.add-btn {
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: rgba(0, 243, 255, 0.1);
    border: 1px dashed var(--primary-color);
    color: var(--primary-color);
    font-weight: 700;
    transition: all 0.3s ease;
    text-shadow: 0 0 5px var(--primary-color);
    border-radius: 5px;
    padding: 20px;
    /* Match padding of stat-card */
}

.add-btn:hover {
    background: rgba(0, 243, 255, 0.2);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.3);
    border-style: solid;
    transform: translateY(-2px);
    color: #fff;
    text-shadow: 0 0 10px #fff;
}

.sync-landings-wrap {
    margin-top: 12px;
}

.sync-landings-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 240px;
    padding: 12px 20px;
    background: rgba(0, 243, 255, 0.08);
    border: 1px solid rgba(0, 243, 255, 0.4);
    color: var(--primary-color);
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sync-landings-btn:hover:not(:disabled) {
    background: var(--primary-color);
    color: #000;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.5);
    transform: translateY(-2px);
    text-shadow: none;
}

.sync-landings-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.sync-landings-btn .inline-icon {
    width: 1em;
    height: 1em;
    flex-shrink: 0;
}

.sync-landings-msg {
    margin: 8px 0 0;
    font-size: 0.9rem;
    color: var(--primary-color);
}

.sync-landings-msg.error {
    color: #f44;
    text-shadow: 0 0 6px rgba(255, 68, 68, 0.5);
}

/* Sync Controls Layout */
.sync-controls-row {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Sync Status Badge */
.sync-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid #444;
    border-radius: 4px;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.sync-status-badge .badge-label {
    color: #888;
    font-weight: 500;
}

.sync-status-badge .badge-value {
    color: #fff;
    font-weight: 700;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

/* Badge States */
.sync-status-badge.status-idle {
    border-color: #444;
}

.sync-status-badge.status-loading {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
}

.sync-status-badge.status-loading .badge-value {
    color: var(--primary-color);
    animation: flash 1.5s infinite;
}

.sync-status-badge.status-success {
    border-color: #0f0;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.3);
    background: rgba(0, 255, 0, 0.05);
}

.sync-status-badge.status-success .badge-value {
    color: #0f0;
    text-shadow: 0 0 8px #0f0;
}

.sync-status-badge.status-error {
    border-color: #f00;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.3);
    background: rgba(255, 0, 0, 0.05);
}

.sync-status-badge.status-error .badge-value {
    color: #f00;
    text-shadow: 0 0 8px #f00;
}

/* Improved Message Styling */
.sync-landings-msg {
    margin-top: 15px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-left: 3px solid #888;
    font-family: var(--font-main);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeIn 0.3s ease-out;
}

.sync-landings-msg.success {
    border-left-color: #0f0;
    background: linear-gradient(90deg, rgba(0, 255, 0, 0.1), transparent);
    color: #cfc;
}

.sync-landings-msg.error {
    border-left-color: #f00;
    background: linear-gradient(90deg, rgba(255, 0, 0, 0.1), transparent);
    color: #fcc;
}

.msg-icon .cyber-icon {
    width: 1.2em;
    height: 1.2em;
}

.sync-landings-msg.success .msg-icon {
    color: #0f0;
}

.sync-landings-msg.error .msg-icon {
    color: #f00;
}

/* Sync СРС Styles */
.sync-group-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: auto;
}

.sync-srs-wrap {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.sync-srs-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 240px;
    padding: 12px 20px;
    background: rgba(0, 243, 255, 0.08);
    border: 1px solid rgba(0, 243, 255, 0.4);
    color: var(--primary-color);
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sync-srs-msg {
    /* Inherits message styles from sync-landings-msg */
}

/* Monitor Grid */
.monitors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.monitor-card {
    background: rgba(20, 20, 40, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 8px;
    transition: 0.3s;
    position: relative;
}

.monitor-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.monitor-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.monitor-name {
    font-weight: 700;
    font-size: 1.2rem;
}

.monitor-status {
    width: 10px;
    height: 10px;
    background: #444;
    border-radius: 50%;
    box-shadow: 0 0 5px #444;
    flex-shrink: 0;
}

.status-up {
    background: #0f0;
    box-shadow: 0 0 8px #0f0;
}

.status-down {
    background: #f00;
    box-shadow: 0 0 8px #f00;
}

.monitor-details {
    font-size: 0.9rem;
    color: #aaa;
}

.monitor-url {
    color: var(--primary-color);
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    display: block;
    margin-top: 5px;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.modal.hidden {
    display: none;
}

.modal-content {
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--secondary-color);
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.2);
}

/* Custom scrollbar for modal content */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: rgba(255, 0, 255, 0.5);
    border-radius: 4px;
    border: 1px solid rgba(255, 0, 255, 0.8);
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 0, 255, 0.7);
    box-shadow: 0 0 5px rgba(255, 0, 255, 0.5);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    cursor: pointer;
    color: #fff;
    background: none;
    border: none;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal .cyber-icon,
.close-modal-icon {
    width: 1.75rem;
    height: 1.75rem;
    stroke: currentColor;
    filter: drop-shadow(0 0 4px currentColor);
}

.close-modal:hover {
    color: var(--secondary-color);
}

.close-modal:hover .cyber-icon {
    filter: drop-shadow(0 0 8px var(--secondary-color));
}

.error-msg {
    color: #f00;
    margin-top: 15px;
    min-height: 20px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Glitch Effect */
.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -1px 0 #00fff9;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(13px, 9999px, 81px, 0);
    }

    5% {
        clip: rect(88px, 9999px, 2px, 0);
    }

    10% {
        clip: rect(100px, 9999px, 86px, 0);
    }

    /* ... shortened for brevity ... */
    100% {
        clip: rect(67px, 9999px, 24px, 0);
    }
}

@keyframes glitch-anim2 {
    0% {
        clip: rect(65px, 9999px, 98px, 0);
    }

    100% {
        clip: rect(2px, 9999px, 66px, 0);
    }
}

/* New Cyberpunk Keyframes */
@keyframes cyber-glitch-entry {
    0% {
        transform: translate(0);
        opacity: 0;
        filter: hue-rotate(90deg);
    }

    10% {
        transform: translate(-5px, -2px);
        opacity: 0.5;
    }

    20% {
        transform: translate(5px, 2px);
    }

    30% {
        transform: translate(-2px, 5px);
        filter: hue-rotate(0deg);
        opacity: 1;
    }

    40% {
        transform: translate(2px, -5px);
    }

    50% {
        transform: translate(-5px, 2px);
    }

    60% {
        transform: translate(0);
    }
}

@keyframes cyber-border-draw {
    0% {
        clip-path: polygon(0 0, 0 0, 0 0, 0 0);
    }

    25% {
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    }

    50% {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 100% 100%);
    }

    75% {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }

    100% {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
        opacity: 0;
    }
}

@keyframes cyber-scanline-sweep {
    0% {
        top: 0;
        opacity: 0;
    }

    5% {
        opacity: 1;
    }

    15% {
        opacity: 1;
    }

    20% {
        top: 100%;
        opacity: 0;
    }

    100% {
        top: 100%;
        opacity: 0;
    }
}

/* Group Sections Container */
.group-sections-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 20px;
}

.group-section {
    background: rgba(20, 20, 40, 0.3);
    border: 1px solid rgba(0, 243, 255, 0.2);
    border-radius: 8px;
    overflow: hidden;
    transition: 0.3s;
}

.group-section:hover {
    border-color: rgba(0, 243, 255, 0.5);
}

.group-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(0, 243, 255, 0.05);
    border-bottom: 1px solid rgba(0, 243, 255, 0.1);
    cursor: pointer;
    user-select: none;
}

.group-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.group-title h2 {
    margin: 0;
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 1.3rem;
    text-transform: uppercase;
}

.group-icon {
    color: var(--secondary-color);
    font-size: 1.2rem;
    transition: transform 0.3s;
}

.group-section.collapsed .group-icon {
    transform: rotate(-90deg);
}

.group-section.collapsed .group-monitors-grid {
    display: none;
}

.group-count {
    color: #666;
    font-size: 0.9rem;
}

.group-controls {
    display: flex;
    gap: 8px;
}

.icon-btn-small {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #444;
    color: #fff;
    padding: 6px 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.2s;
}

.icon-btn-small:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
    background: rgba(255, 0, 255, 0.1);
}

.group-monitors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
}

.empty-group-msg {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
    grid-column: 1 / -1;
}

/* Tag Filter Bar */
.tag-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 20px;
    background: rgba(255, 0, 255, 0.05);
    border: 1px solid rgba(255, 0, 255, 0.2);
    border-radius: 5px;
    align-items: center;
    margin-top: 20px;
}

.filter-label {
    color: var(--secondary-color);
    font-weight: 700;
    margin-right: 10px;
}

.tag-filter-btn {
    padding: 8px 15px;
    background: transparent;
    border: 2px solid;
    border-radius: 20px;
    color: #fff;
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 0.9rem;
    transition: 0.3s;
}

.tag-filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 10px currentColor;
}

.tag-filter-btn.active {
    color: #000;
    font-weight: 700;
}

.tag-filter-clear {
    padding: 8px 15px;
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid #f00;
    color: #f00;
    border-radius: 20px;
    cursor: pointer;
    transition: 0.3s;
    font-family: var(--font-main);
}

.tag-filter-clear:hover {
    background: #f00;
    color: #000;
}

/* Monitor Tags */
.monitor-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.monitor-tag {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 0.75rem;
    color: #000;
    font-weight: 700;
}

/* Monitor Action Buttons */
.monitor-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.action-btn {
    flex: 1;
    padding: 8px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #444;
    color: var(--primary-color);
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.2s;
    font-family: var(--font-main);
}

.action-btn:hover {
    border-color: var(--primary-color);
    background: rgba(0, 243, 255, 0.1);
}

/* Tag List in Modal */
.tag-list,
.group-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid #333;
    border-radius: 5px;
}

.tag-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid;
    border-radius: 3px;
}

/* Tag Checklist */
.tag-checklist {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid #333;
    border-radius: 5px;
    margin-bottom: 20px;
}

.tag-checklist-item {
    display: flex;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: 0.2s;
    border-radius: 3px;
}

.tag-checklist-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.tag-checklist-item input[type="checkbox"] {
    margin-right: 10px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.tag-checklist-item label {
    flex: 1;
    margin: 0;
    cursor: pointer;
}

.tag-color-indicator {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    margin-left: 10px;
}

/* Select Styling */
select {
    width: 100%;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #333;
    color: #fff;
    font-family: var(--font-main);
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
}

select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 8px rgba(0, 243, 255, 0.3);
}

select option {
    background: #1a1a2e;
    color: #fff;
}

/* Color Input Styling */
input[type="color"] {
    height: 50px;
    cursor: pointer;
}

/* Responsive Design */
@media (max-width: 768px) {
    .group-monitors-grid {
        grid-template-columns: 1fr;
    }

    .stats-panel {
        flex-direction: column;
    }

    .group-section-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .group-controls {
        width: 100%;
        justify-content: flex-end;
    }

    .tag-filter-bar {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Mode Toggle */
.mode-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    justify-content: center;
}

.mode-option {
    flex: 1;
    max-width: 150px;
    cursor: pointer;
}

.mode-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.mode-option span {
    display: block;
    padding: 12px 20px;
    border: 1px solid rgba(0, 243, 255, 0.3);
    border-radius: 5px;
    text-align: center;
    transition: all 0.3s ease;
    font-weight: 600;
}

.mode-option input[type="radio"]:checked+span {
    background: rgba(0, 243, 255, 0.2);
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
}

.mode-option:hover span {
    border-color: var(--primary-color);
}

/* Batch Form */
.mode-form.hidden {
    display: none;
}

#batch-urls {
    width: 100%;
    min-height: 200px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 243, 255, 0.3);
    border-radius: 5px;
    color: var(--text-color);
    padding: 12px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    resize: vertical;
    line-height: 1.5;
}

#batch-urls:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 8px rgba(0, 243, 255, 0.4);
}

.hint {
    display: block;
    color: #888;
    font-size: 0.85rem;
    margin-top: 5px;
    font-style: italic;
}

.batch-preview {
    padding: 15px;
    background: rgba(0, 0, 0, 0.5);
    border-left: 3px solid var(--primary-color);
    margin: 20px 0;
    text-align: center;
    font-weight: 600;
    font-size: 1.1rem;
}

#batch-count {
    color: var(--primary-color);
    font-size: 1.3rem;
    font-weight: 700;
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    min-width: 300px;
    background: rgba(10, 10, 20, 0.95);
    border: 1px solid var(--primary-color);
    color: #fff;
    padding: 15px 20px;
    border-radius: 4px;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-heading);
    animation: slideIn 0.3s ease-out forwards;
    position: relative;
    overflow: hidden;
}

.toast::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
}

.toast.success {
    border-color: #0f0;
}

.toast.success::before {
    background: #0f0;
    box-shadow: 0 0 10px #0f0;
}

.toast.error {
    border-color: #f00;
}

.toast.error::before {
    background: #f00;
    box-shadow: 0 0 10px #f00;
}

.toast-message {
    flex-grow: 1;
    margin-left: 10px;
    font-size: 1rem;
    letter-spacing: 1px;
}

.toast-close {
    background: none;
    border: none;
    color: #888;
    font-size: 1.2rem;
    cursor: pointer;
    margin-left: 10px;
    transition: color 0.2s;
}

.toast-close:hover {
    color: #fff;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Cyberpunk Loader */
.cyber-loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    gap: 20px;
}

.cyber-loader {
    width: 60px;
    height: 60px;
    border: 3px solid transparent;
    border-top-color: var(--primary-color);
    border-right-color: var(--primary-color);
    border-radius: 50%;
    animation: cyber-spin 1s linear infinite;
    position: relative;
    box-shadow: 0 0 10px var(--primary-color);
}

.cyber-loader::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border: 3px solid transparent;
    border-top-color: var(--secondary-color);
    border-left-color: var(--secondary-color);
    border-radius: 50%;
    animation: cyber-spin-reverse 1.5s linear infinite;
}

.cyber-loader::after {
    content: '';
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: cyber-pulse 1s ease-in-out infinite;
    box-shadow: 0 0 20px var(--primary-color);
}

.cyber-loader-text {
    font-family: var(--font-heading);
    color: var(--primary-color);
    letter-spacing: 2px;
    animation: flicker 2s infinite;
}

@keyframes cyber-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes cyber-spin-reverse {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(-360deg);
    }
}

@keyframes cyber-pulse {

    0%,
    100% {
        transform: scale(0.8);
        opacity: 0.5;
    }

    50% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes flicker {

    0%,
    19%,
    21%,
    23%,
    25%,
    54%,
    56%,
    100% {
        opacity: 1;
    }

    20%,
    24%,
    55% {
        opacity: 0.5;
    }
}

/* Empty State Grid */
.empty-state-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px;
    perspective: 500px;
    overflow: hidden;
}

.cyber-grid-empty {
    width: 200px;
    height: 100px;
    background:
        linear-gradient(transparent 95%, var(--primary-color) 95%),
        linear-gradient(90deg, transparent 95%, var(--primary-color) 95%);
    background-size: 20px 20px;
    transform: rotateX(60deg);
    position: relative;
    margin-bottom: 20px;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.2);
    animation: grid-scroll 2s linear infinite;
}

.cyber-grid-empty::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, var(--bg-color));
}

@keyframes grid-scroll {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 0 20px;
    }
}

.empty-msg {
    font-family: var(--font-heading);
    color: #666;
    letter-spacing: 3px;
    border: 1px solid #333;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.3);
}

/* Custom Cyberpunk Modal System */
.cyber-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cyber-modal-overlay.cyber-modal-visible {
    opacity: 1;
}

.cyber-modal-content {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.5), 0 0 60px rgba(0, 243, 255, 0.3);
    max-width: 500px;
    width: 90%;
    padding: 30px;
    position: relative;
    animation: cyber-modal-enter 0.3s ease-out;
}

@keyframes cyber-modal-enter {
    0% {
        transform: scale(0.8) translateY(-50px);
        opacity: 0;
    }

    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.cyber-modal-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 243, 255, 0.3);
}

.cyber-modal-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
}

.cyber-modal-icon::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    animation: icon-pulse 2s ease-in-out infinite;
}

@keyframes icon-pulse {

    0%,
    100% {
        box-shadow: 0 0 10px currentColor;
    }

    50% {
        box-shadow: 0 0 20px currentColor, 0 0 30px currentColor;
    }
}

.cyber-modal-icon-info {
    color: var(--primary-color);
    background: rgba(0, 243, 255, 0.1);
    border: 2px solid var(--primary-color);
}

.cyber-modal-icon-success {
    color: #0f0;
    background: rgba(0, 255, 0, 0.1);
    border: 2px solid #0f0;
}

.cyber-modal-icon-error {
    color: #f00;
    background: rgba(255, 0, 0, 0.1);
    border: 2px solid #f00;
}

.cyber-modal-icon-warning {
    color: #ff0;
    background: rgba(255, 255, 0, 0.1);
    border: 2px solid #ff0;
}

.cyber-modal-icon .cyber-icon {
    width: 28px;
    height: 28px;
    filter: drop-shadow(0 0 6px currentColor);
}

.cyber-modal-title {
    font-family: var(--font-heading);
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
    font-size: 1.5rem;
    margin: 0;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.cyber-modal-body {
    margin: 20px 0;
}

.cyber-modal-message {
    color: var(--text-color);
    font-family: var(--font-main);
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0;
    text-align: center;
}

.cyber-modal-footer {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
}

.cyber-modal-btn {
    padding: 12px 30px;
    background: transparent;
    border: 2px solid;
    color: var(--primary-color);
    font-family: var(--font-heading);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
    border-radius: 5px;
}

.cyber-modal-btn-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.cyber-modal-btn-primary:hover {
    background: var(--primary-color);
    color: #000;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.5);
    transform: translateY(-2px);
}

.cyber-modal-btn-secondary {
    border-color: #666;
    color: #999;
}

.cyber-modal-btn-secondary:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
    background: rgba(255, 0, 255, 0.1);
    transform: translateY(-2px);
}

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

/* Scanline effect for modal buttons */
.cyber-modal-btn .cyber-btn-scanline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(0, 243, 255, 0.5);
    box-shadow: 0 0 10px var(--primary-color);
    z-index: 2;
    pointer-events: none;
    animation: modal-scanline 3s infinite;
}

@keyframes modal-scanline {
    0% {
        top: 0;
        opacity: 0;
    }

    5% {
        opacity: 1;
    }

    95% {
        opacity: 1;
    }

    100% {
        top: 100%;
        opacity: 0;
    }
}

/* Responsive Modal */
@media (max-width: 768px) {
    .cyber-modal-content {
        width: 95%;
        padding: 20px;
    }

    .cyber-modal-footer {
        flex-direction: column;
    }

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

/* Auth checking overlay */
.auth-checking-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
}

.auth-checking-overlay .cyber-loader {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
}

.auth-checking-overlay .cyber-loader-text {
    font-size: 14px;
    color: #00f3ff;
    letter-spacing: 2px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}