:root {
    --bg-deep: #030304;
    --bg-card: rgba(18, 18, 20, .75);
    --border-color: rgba(255, 255, 255, .08);
    --success-color: #10b981;
    --error-color: #ef4444;
    --accent-color: #818cf8;
    --text-main: #e2e8f0;
    --text-sub: #94a3b8;
    --btn-bg: rgba(255, 255, 255, .05);
    --btn-hover: rgba(255, 255, 255, .12);
    --font-main: system-ui, -apple-system, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, monospace;
    --highlight-border: #6366f1;
    --highlight-bg: rgba(99, 102, 241, .15)
}

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

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

#warp-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: .6
}

.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-color);
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, .9);
    width: 92%;
    max-width: 600px;
    border-radius: 20px;
    padding: 40px;
    position: relative;
    z-index: 10;
    margin: 20px 0;
    overflow: hidden
}

.spotlight {
    pointer-events: none;
    position: absolute;
    inset: 0;
    background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, .08), transparent 40%);
    z-index: 1;
    opacity: 0;
    transition: opacity .5s
}

.glass-panel:hover .spotlight,
.modal:hover .spotlight {
    opacity: 1
}

.gradient-title {
    font-size: 2rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 24px;
    position: relative;
    z-index: 2;
    background: linear-gradient(135deg, #fff 0%, #e0e7ff 15%, #a5b4fc 30%, #818cf8 50%, #c084fc 70%, #f5f3ff 85%, #fff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: textShine 6s linear infinite
}

@keyframes textShine {
    to {
        background-position: 200% center
    }
}

.content-layer {
    position: relative;
    z-index: 2
}

.status-container {
    background: rgba(0, 0, 0, .3);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px
}

.status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: .85rem;
    color: var(--text-sub);
    text-transform: uppercase;
    letter-spacing: .05em;
    gap: 10px;
    height: 20px
}

#status-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center
}

.timer-highlight {
    color: #fbbf24;
    font-weight: 700;
    font-family: var(--font-mono);
    margin: 0
}

.cancel-btn {
    color: var(--text-sub);
    text-decoration: underline;
    cursor: pointer;
    font-size: .85rem;
    transition: color .2s;
    white-space: nowrap;
    flex-shrink: 0
}

.cancel-btn:hover {
    color: #fff
}

.desktop-hint {
    display: inline
}

.node-list {
    display: flex;
    flex-direction: column;
    gap: 12px
}

.node-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, .03);
    border: 1px solid transparent;
    padding: 12px 16px;
    border-radius: 8px;
    transition: all .2s ease;
    cursor: pointer;
    position: relative
}

.node-item:hover {
    background: rgba(255, 255, 255, .08)
}

.node-item.selected {
    border-color: var(--highlight-border);
    background: var(--highlight-bg);
    box-shadow: 0 0 15px rgba(99, 102, 241, .2)
}

.node-info {
    display: flex;
    align-items: center;
    gap: 12px
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #64748b;
    box-shadow: 0 0 5px rgba(0, 0, 0, .5);
    transition: background-color .3s
}

.node-name {
    font-size: .95rem;
    font-weight: 500
}

.node-latency {
    font-family: var(--font-mono);
    font-size: .85rem;
    color: var(--text-sub)
}

.btn-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 30px
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    background: var(--btn-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    transition: all .2s ease;
    cursor: pointer;
    gap: 8px
}

.action-btn:hover {
    background: var(--btn-hover);
    border-color: rgba(255, 255, 255, .3);
    transform: translateY(-2px)
}

.action-btn.primary {
    background: rgba(255, 255, 255, .1);
    border-color: rgba(255, 255, 255, .2);
    grid-column: span 2;
    color: #fff;
    font-size: 1.05rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .2)
}

.action-btn.primary.dimmed {
    opacity: .7;
    box-shadow: none
}

.action-btn.primary:hover {
    background: rgba(255, 255, 255, .15);
    border-color: rgba(255, 255, 255, .4);
    opacity: 1
}

.btn-pulse {
    animation: pulse-border 2s infinite;
    border-color: var(--accent-color);
    color: #fff;
    background: rgba(129, 140, 248, .15)
}

@keyframes pulse-border {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(129, 140, 248, 0)
    }

    0% {
        box-shadow: 0 0 0 0 rgba(129, 140, 248, .4)
    }

    70% {
        box-shadow: 0 0 0 10px rgba(129, 140, 248, 0)
    }
}

.footer-info {
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
    font-size: .85rem;
    line-height: 1.6;
    color: var(--text-sub);
    text-align: left
}

.footer-info p {
    margin-bottom: 12px
}

.footer-info p:last-child {
    margin-bottom: 0
}

.link-text {
    color: var(--accent-color);
    text-decoration: none;
    transition: color .2s;
    cursor: pointer
}

.link-text:hover {
    color: #fff;
    text-decoration: underline
}

.btn-icon {
    width: 18px;
    height: 18px;
    opacity: .9
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, .6);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto
}

.modal {
    background: rgba(20, 20, 25, .95);
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 20px;
    padding: 35px;
    width: 85%;
    max-width: 420px;
    text-align: center;
    transform: scale(.9);
    transition: transform .3s ease;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .8);
    color: #fff;
    position: relative;
    overflow: hidden
}

.modal-overlay.active .modal {
    transform: scale(1)
}

.modal h3 {
    margin-bottom: 25px;
    font-size: 1.25rem;
    color: #fff;
    font-weight: 600;
    position: relative;
    z-index: 2
}

.qq-group {
    position: relative;
    cursor: pointer;
    margin-bottom: 25px;
    z-index: 2
}

.qq-container {
    position: relative;
    background: rgba(0, 0, 0, .3);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px 16px;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s ease
}

.qq-group:hover .qq-container {
    background: rgba(0, 0, 0, .5);
    border-color: rgba(255, 255, 255, .2);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5)
}

.qq-text {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    color: #e5e7eb;
    font-weight: 700;
    letter-spacing: 1px
}

.copy-icon-wrap {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    transition: color .3s
}

.qq-group:hover .copy-icon-wrap {
    color: #fff
}

.qq-hint {
    margin-top: 12px;
    text-align: center;
    font-size: .8rem;
    color: #6b7280
}

.copy-toast {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, .95);
    color: #000;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    pointer-events: none;
    z-index: 20;
    box-shadow: 0 10px 25px rgba(0, 0, 0, .3);
    opacity: 0;
    visibility: hidden;
    width: max-content;
    display: flex;
    align-items: center;
    gap: 8px
}

.copy-toast.animate-in {
    visibility: visible;
    animation: slideUpIn .4s cubic-bezier(.18, .89, .32, 1.28) forwards
}

.copy-toast.animate-out {
    visibility: visible;
    animation: slideUpOut .4s cubic-bezier(.6, -.28, .735, .045) forwards
}

@keyframes slideUpIn {
    0% {
        opacity: 0;
        transform: translate(-50%, 20%) scale(.9);
        filter: blur(4px)
    }

    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
        filter: blur(0)
    }
}

@keyframes slideUpOut {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
        filter: blur(0)
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -120%) scale(.95);
        filter: blur(4px)
    }
}

.modal-btn {
    background: var(--btn-bg);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0;
    height: 44px;
    line-height: 44px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all .2s;
    width: 100%;
    font-size: .95rem;
    outline: 0;
    position: relative;
    z-index: 2
}

.modal-btn:hover {
    background: var(--btn-hover);
    border-color: rgba(255, 255, 255, .3);
    transform: translateY(-2px);
    color: #fff
}

@media (max-width:640px) {
    .glass-panel {
        padding: 24px;
        width: 95%
    }

    .gradient-title {
        font-size: 1.5rem
    }

    .node-name {
        font-size: .9rem
    }

    .status-header {
        font-size: .8rem
    }

    .cancel-btn {
        font-size: .8rem
    }

    .desktop-hint {
        display: none
    }

    .modal {
        padding: 25px;
        width: 90%
    }

    .qq-text {
        font-size: 1.3rem
    }
}