:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --danger: #ef4444;
    --success: #10b981;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    scroll-behavior: smooth;
}

body {
    background: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Premium Page Loader */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: all 0.8s cubic-bezier(0.65, 0, 0.35, 1);
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.loader-text {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 20px;
    background: linear-gradient(90deg, #fff, var(--primary), #fff);
    background-size: 200%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: text-shimmer 2s infinite linear;
}

@keyframes text-shimmer {
    to {
        background-position: 200% center;
    }
}

.spinner-outer {
    width: 80px;
    height: 80px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.spinner-inner {
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.5, 0.1, 0.4, 0.9) infinite;
}

.spinner-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    filter: blur(2px);
    box-shadow: 0 0 15px var(--primary);
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

/* Background Blobs */
.bg-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    width: 50vw;
    height: 50vw;
    background: var(--primary);
    filter: blur(120px);
    opacity: 0.1;
    border-radius: 50%;
    animation: blob-float 20s infinite alternate;
}

@keyframes blob-float {
    0% {
        transform: translate(-10%, -10%) scale(1);
    }

    100% {
        transform: translate(30%, 20%) scale(1.1);
    }
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(to right, #818cf8, #c084fc);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Hero Section */
.hero {
    padding: 100px 0;
    text-align: center;
    animation: fadeInUp 1s ease;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 40px;
}

/* Feature Grid */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    padding: 60px 0;
}

.feature-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 32px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-10px) scale(1.02);
    border-color: var(--primary);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

/* Click Ripple */
.click-ripple {
    position: fixed;
    width: 20px;
    height: 20px;
    background: rgba(99, 102, 241, 0.4);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    animation: ripple-anim 0.6s ease-out forwards;
    z-index: 999999;
}

@keyframes ripple-anim {
    to {
        width: 100px;
        height: 100px;
        opacity: 0;
    }
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 20px;
}

/* Buttons */
.btn {
    padding: 12px 28px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid var(--glass-border);
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Footer */
footer {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    padding: 30px 0;
    margin-top: 80px;
    width: 100%;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.footer-left {
    flex: 1;
}

.footer-left .logo {
    font-size: 1.25rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-left p {
    color: var(--text-muted);
    font-size: 0.875rem;
    max-width: 400px;
}

.footer-right {
    text-align: right;
}

.footer-links {
    margin-bottom: 10px;
    display: flex;
    justify-content: flex-end;
    gap: 20px;
    font-size: 0.9rem;
}

.footer-links a {
    color: var(--text-main);
    text-decoration: none;
    transition: 0.3s;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    color: var(--text-muted);
    font-size: 0.8rem;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    flex-wrap: wrap;
}

.footer-bottom a {
    color: inherit;
    text-decoration: none;
}

@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .footer-left p {
        margin: 0 auto;
    }

    .footer-right {
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }

    .footer-bottom {
        justify-content: center;
    }
}

/* Toasts */
#toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px 24px;
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    animation: toastIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes toastIn {
    from {
        transform: translateX(100%) opacity(0);
    }

    to {
        transform: translateX(0) opacity(1);
    }
}

/* Modals & Dialogs */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    width: 100%;
    max-width: 480px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.6);
    transform: scale(0.9);
    animation: modalIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes modalIn {
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-icon {
    font-size: 3.5rem;
    margin-bottom: 24px;
}

.modal-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.modal-desc {
    color: var(--text-muted);
    margin-bottom: 32px;
}

.modal-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* Node Status Badge */
.node-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-online {
    background: var(--success);
    box-shadow: 0 0 10px var(--success);
}

.status-offline {
    background: var(--danger);
    box-shadow: 0 0 10px var(--danger);
}

.status-checking {
    background: var(--primary);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.5;
    }
}

/* Dashbaord Card */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s;
}

.glass-card.shake {
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

/* Forms */
.form-group {
    margin-bottom: 24px;
}

.label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 14px 18px;
    color: white;
    transition: 0.3s;
}

.input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Animation Utils */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    header {
        height: auto;
        padding: 15px 0;
        flex-direction: column;
        gap: 15px;
    }

    .hero {
        padding: 60px 0;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .footer-grid {
        text-align: center;
    }
}