:root {
    --neon-purple: #bc00dd;
    --neon-blue: #00f0ff;
    --neon-pink: #ff0055;
    --dark-bg: #0a0512;
    --glass-bg: rgba(20, 10, 35, 0.65);
    --glass-border: rgba(188, 0, 221, 0.25);
    --font-cyber: 'Orbitron', sans-serif;
    --font-tech: 'Rajdhani', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
}

body {
    background-color: var(--dark-bg);
    color: #ffffff;
    font-family: var(--font-tech);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Background canvas setup */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
}

.cyber-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Header style setup */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(188, 0, 221, 0.15);
}

.logo-container h1 {
    font-family: var(--font-cyber);
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 4px;
    color: #fff;
    text-shadow: 0 0 10px var(--neon-purple), 0 0 20px var(--neon-purple);
}

.sub-glitch {
    font-size: 0.75rem;
    letter-spacing: 3px;
    color: var(--neon-blue);
    font-weight: bold;
}

.user-profile {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 6px 12px;
    border-radius: 30px;
    backdrop-filter: blur(5px);
}

.user-profile img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--neon-blue);
    margin-right: 8px;
}

.user-profile span {
    font-family: var(--font-cyber);
    font-size: 0.8rem;
    color: #fff;
    margin-right: 10px;
}

#logoutBtn {
    background: none;
    border: none;
    color: var(--neon-pink);
    cursor: pointer;
    font-size: 0.9rem;
    transition: transform 0.2s;
}
#logoutBtn:hover { transform: scale(1.1); }

/* Premium Glassmorphism Card Box */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 40px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 0 40px rgba(188, 0, 221, 0.15), inset 0 0 20px rgba(188, 0, 221, 0.1);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.step-content h2 {
    font-family: var(--font-cyber);
    font-size: 1.5rem;
    text-align: center;
    letter-spacing: 2px;
    margin-bottom: 15px;
    color: #fff;
}

.step-content p {
    text-align: center;
    color: #b1a7c1;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

/* Central Neon Circle Styling */
.hero-graphic {
    position: relative;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 25px;
}

.neon-circle {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px dashed var(--neon-purple);
    animation: rotateCircle 10s linear infinite;
    box-shadow: 0 0 20px rgba(188, 0, 221, 0.4);
}

.central-icon {
    font-size: 2.2rem;
    color: var(--neon-blue);
    text-shadow: 0 0 15px var(--neon-blue);
}

/* Progress System */
.progress-container {
    position: relative;
    margin-bottom: 40px;
    padding: 0 10px;
}

.progress-bar-wrapper {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-50%);
    z-index: 1;
    border-radius: 2px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-purple), var(--neon-blue));
    box-shadow: 0 0 12px var(--neon-blue);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-labels {
    position: relative;
    display: flex;
    justify-content: space-between;
    z-index: 2;
}

.p-step {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #150d22;
    border: 2px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: var(--font-cyber);
    font-size: 0.85rem;
    font-weight: bold;
    color: #6a5a83;
    transition: all 0.3s ease;
}

.p-step.active {
    border-color: var(--neon-purple);
    color: #fff;
    box-shadow: 0 0 15px var(--neon-purple);
}

.p-step.verified {
    border-color: var(--neon-blue);
    background: var(--neon-blue);
    color: #150d22;
    box-shadow: 0 0 15px var(--neon-blue);
}

/* Sequential Task Architecture */
.task-node {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.task-node.active {
    border-color: rgba(188, 0, 221, 0.4);
    background: rgba(188, 0, 221, 0.04);
}

.task-node.locked {
    opacity: 0.35;
    pointer-events: none;
}

.task-node.completed {
    border-color: rgba(0, 240, 255, 0.3);
    background: rgba(0, 240, 255, 0.02);
}

.task-info h3 {
    font-family: var(--font-cyber);
    font-size: 1.05rem;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.task-info p {
    font-size: 0.95rem;
    color: #a396b8;
    text-align: left;
    margin-bottom: 0;
}

.neon-text { color: var(--neon-blue); font-weight: bold; }

.task-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Buttons Engine */
.action-btn, .verify-btn, .glow-btn {
    font-family: var(--font-cyber);
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s ease;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.action-btn {
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
}
.action-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: #fff;
}

.verify-btn {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid var(--neon-purple);
    color: var(--neon-purple);
}
.verify-btn:not(:disabled):hover {
    background: var(--neon-purple);
    color: #fff;
    box-shadow: 0 0 15px var(--neon-purple);
}
.verify-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.3);
}

.glow-btn {
    width: 100%;
    padding: 16px;
    background: var(--neon-purple);
    border: none;
    color: #fff;
    font-size: 1.05rem;
    box-shadow: 0 0 20px rgba(188, 0, 221, 0.5);
}
.glow-btn:hover {
    background: #d400fa;
    box-shadow: 0 0 30px rgba(188, 0, 221, 0.8);
    transform: translateY(-1px);
}

/* Wallet Secure Sub-Form Module */
.input-container {
    position: relative;
    margin-bottom: 20px;
    width: 100%;
}

.wallet-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--neon-blue);
    font-size: 1.2rem;
}

#ethWallet {
    width: 100%;
    padding: 16px 16px 16px 48px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: #fff;
    font-family: var(--font-cyber);
    font-size: 1rem;
    transition: all 0.3s;
}
#ethWallet:focus {
    outline: none;
    border-color: var(--neon-blue);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}

/* Modals Core Shell */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 2, 10, 0.85);
    backdrop-filter: blur(10px);
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #11091f;
    border: 2px solid var(--neon-purple);
    border-radius: 16px;
    padding: 40px;
    max-width: 480px;
    width: 90%;
    text-align: center;
    box-shadow: 0 0 50px rgba(188, 0, 221, 0.4);
    transform: scale(0.9);
    animation: modalPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Loading Spinner Core Mechanics */
.cyber-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 240, 255, 0.1);
    border-top-color: var(--neon-blue);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: rotateCircle 0.8s linear infinite;
}

.success-icon-wrap {
    font-size: 4rem;
    color: var(--neon-blue);
    margin-bottom: 20px;
    animation: neonPulse 2s infinite alternate;
}

.terminal-receipt {
    background: #06030a;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px;
    font-family: monospace;
    font-size: 0.85rem;
    color: #00ff66;
    text-align: left;
    margin-bottom: 25px;
    border-left: 3px solid #00ff66;
}

/* Utility Animations */
@keyframes rotateCircle {
    to { transform: rotate(360deg); }
}
@keyframes modalPop {
    to { transform: scale(1); }
}
@keyframes neonPulse {
    from { text-shadow: 0 0 10px var(--neon-blue); }
    to { text-shadow: 0 0 25px var(--neon-blue), 0 0 35px var(--neon-blue); }
}

.hidden { display: none !important; }

/* Responsive Adaptations */
@media(max-width: 768px) {
    .task-node {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    .task-actions {
        width: 100%;
        justify-content: flex-end;
    }
    .glass-card { padding: 24px 16px; }
}
