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

body {
    font-family: 'JetBrains Mono', monospace;
    background: #000;
    color: #00ff9d;
    overflow: hidden;
    height: 100vh;
    cursor: crosshair;
}

.container {
    position: relative;
    height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease;
}

.screen.active {
    opacity: 1;
    visibility: visible;
}

.terminal-content {
    text-align: center;
    max-width: 800px;
    padding: 40px;
}

.protocol-header {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-shadow: 0 0 20px #00ff9d;
    animation: pulse-glow 3s ease-in-out infinite alternate;
}

.tagline {
    font-size: 1.2rem;
    margin-bottom: 4rem;
    opacity: 0.8;
    font-weight: 400;
}

.begin-button {
    background: transparent;
    border: 2px solid #00ff9d;
    color: #00ff9d;
    font-family: inherit;
    font-size: 1.1rem;
    padding: 15px 30px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
    animation: blink 2s infinite;
    transition: all 0.3s ease;
}

.address-input-section {
    margin: 2rem 0;
    text-align: left;
    max-width: 600px;
}

.input-label {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #00ff9d;
}

.address-input {
    width: 100%;
    background: transparent;
    border: 1px solid #00ff9d;
    color: #00ff9d;
    font-family: inherit;
    font-size: 0.9rem;
    padding: 12px 15px;
    margin-bottom: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.address-input:focus {
    border-color: #fff;
    box-shadow: 0 0 10px rgba(0, 255, 157, 0.3);
}

.address-input::placeholder {
    color: rgba(0, 255, 157, 0.5);
}

.error-message {
    color: #ff6b6b;
    font-size: 0.8rem;
    margin-bottom: 1rem;
    min-height: 1rem;
}

.balance-result {
    text-align: center;
    margin: 2rem 0;
}

.level-display {
    margin-bottom: 2rem;
}

.user-level {
    font-size: 1.8rem;
    font-weight: 700;
    color: #00ff9d;
    margin-bottom: 1rem;
    text-shadow: 0 0 20px #00ff9d;
}

.level-message {
    font-size: 1.2rem;
    color: #fff;
    opacity: 0.8;
}

.proceed-btn {
    animation: pulse-glow 2s ease-in-out infinite alternate;
}

.vanishing-complete {
    text-align: center;
    margin: 2rem 0;
}

.vanish-message {
    margin-top: 1rem;
    font-size: 1rem;
    opacity: 0.8;
    font-style: italic;
}

.result-subtitle {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #fff;
    opacity: 0.9;
}

.invite-info {
    margin-top: 2rem;
    padding: 1.5rem;
    border: 1px solid rgba(0, 255, 157, 0.3);
    background: rgba(0, 255, 157, 0.05);
}

.invite-text {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.invite-link {
    font-size: 1rem;
    color: #00ff9d;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 12px;
    border: 1px solid #00ff9d;
    margin: 0.5rem 0;
    word-break: break-all;
}

.invite-bonus {
    font-size: 0.8rem;
    margin-top: 0.5rem;
    opacity: 0.7;
    font-style: italic;
}

.begin-button:hover {
    background: #00ff9d;
    color: #000;
    box-shadow: 0 0 30px #00ff9d;
    animation: none;
}

.begin-button:hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: scan 0.5s ease-in-out;
}

.terminal-output {
    text-align: left;
    font-size: 1.1rem;
    line-height: 1.8;
    min-height: 300px;
    max-width: 600px;
}

.terminal-line {
    opacity: 0;
    animation: type-in 0.5s ease forwards;
    margin-bottom: 0.5rem;
}

.scan-counter {
    margin-top: 3rem;
    font-size: 0.9rem;
    opacity: 0.7;
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.result-card {
    background: rgba(0, 255, 157, 0.03);
    border: 1px solid #00ff9d;
    padding: 3rem;
    text-align: center;
    max-width: 500px;
    position: relative;
    animation: card-enter 1s ease forwards;
}

.result-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #00ff9d, transparent, #00ff9d);
    z-index: -1;
    opacity: 0.3;
    animation: border-pulse 2s ease-in-out infinite;
}

.result-level {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: glitch-text 1s ease forwards;
}

.result-percentage {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #fff;
}

.result-message {
    font-size: 1rem;
    margin-bottom: 2rem;
    opacity: 0.8;
    font-style: italic;
}

.result-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.action-button {
    background: transparent;
    border: 1px solid #00ff9d;
    color: #00ff9d;
    font-family: inherit;
    font-size: 1rem;
    padding: 12px 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.action-button:hover {
    background: rgba(0, 255, 157, 0.1);
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.3);
    animation: pulse-hover 1s ease infinite;
}

.action-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    animation: none;
}

.action-button:disabled:hover {
    background: transparent;
    box-shadow: none;
    animation: none;
}

.tweet-btn:hover {
    animation: radar-pulse 2s ease infinite;
}

.invite-btn:hover {
    animation: pulse-hover 1s ease infinite;
}

.access-granted {
    text-align: center;
    font-size: 1.5rem;
    margin-top: 2rem;
    animation: fade-in 2s ease forwards;
}

.access-denied {
    text-align: center;
    font-size: 1.5rem;
    margin-top: 2rem;
    animation: fade-in 2s ease forwards;
    color: #ff4444;
}

.access-denied > div:first-child {
    color: #ff0000;
    font-weight: bold;
    font-size: 2rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.footer {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 2rem;
    font-size: 0.8rem;
    opacity: 0.5;
    font-family: 'JetBrains Mono', monospace;
}

/* Glitch Effects */
body:hover::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 157, 0.02) 4px
    );
    pointer-events: none;
    animation: crt-flicker 0.15s infinite linear;
}

/* Animations */
@keyframes pulse-glow {
    0% { text-shadow: 0 0 20px #00ff9d; }
    100% { text-shadow: 0 0 30px #00ff9d, 0 0 40px #00ff9d; }
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.7; }
}

@keyframes scan {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes type-in {
    0% { opacity: 0; transform: translateX(-10px); }
    100% { opacity: 1; transform: translateX(0); }
}

@keyframes card-enter {
    0% { 
        opacity: 0; 
        transform: scale(0.8) translateY(20px);
    }
    100% { 
        opacity: 1; 
        transform: scale(1) translateY(0);
    }
}

@keyframes border-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

@keyframes glitch-text {
    0% { 
        transform: translateX(0);
        filter: hue-rotate(0deg);
    }
    10% { 
        transform: translateX(-2px);
        filter: hue-rotate(90deg);
    }
    20% { 
        transform: translateX(2px);
        filter: hue-rotate(180deg);
    }
    30% { 
        transform: translateX(-1px);
        filter: hue-rotate(270deg);
    }
    40% { 
        transform: translateX(1px);
        filter: hue-rotate(360deg);
    }
    50% { 
        transform: translateX(0);
        filter: hue-rotate(0deg);
    }
    100% { 
        transform: translateX(0);
        filter: hue-rotate(0deg);
    }
}

@keyframes pulse-hover {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 255, 157, 0.3); }
    50% { box-shadow: 0 0 30px rgba(0, 255, 157, 0.6); }
}

@keyframes radar-pulse {
    0% { 
        box-shadow: 0 0 0 0 rgba(0, 255, 157, 0.4);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(0, 255, 157, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 255, 157, 0);
    }
}

@keyframes fade-in {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes crt-flicker {
    0% { opacity: 1; }
    98% { opacity: 1; }
    99% { opacity: 0.98; }
    100% { opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
    .protocol-header {
        font-size: 1.8rem;
    }
    
    .terminal-content {
        padding: 20px;
    }
    
    .result-card {
        margin: 20px;
        padding: 2rem;
    }
    
    .footer {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

/* Screen transition effects */
.screen-transition {
    animation: glitch-transition 0.3s ease;
}

@keyframes glitch-transition {
    0% {
        filter: brightness(1);
        transform: scale(1);
    }
    25% {
        filter: brightness(1.5) hue-rotate(90deg);
        transform: scale(1.02) skew(2deg);
    }
    50% {
        filter: brightness(0.5) hue-rotate(180deg);
        transform: scale(0.98) skew(-2deg);
    }
    75% {
        filter: brightness(1.2) hue-rotate(270deg);
        transform: scale(1.01) skew(1deg);
    }
    100% {
        filter: brightness(1);
        transform: scale(1);
    }
}

/* Leaderboard Styles */
.view-leaderboard-btn {
    margin-top: 20px;
    padding: 15px 30px;
    background: transparent;
    border: 1px solid #00ff9d;
    color: #00ff9d;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-leaderboard-btn:hover {
    background: rgba(0, 255, 157, 0.1);
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.3);
}

.leaderboard-subtitle {
    font-size: 14px;
    color: rgba(0, 255, 157, 0.7);
    margin-bottom: 30px;
    text-align: center;
}

.leaderboard-content {
    max-width: 800px;
    margin: 0 auto;
    max-height: 500px;
    overflow-y: auto;
    padding: 20px;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
}

.leaderboard-header {
    display: grid;
    grid-template-columns: 60px 120px 1fr 100px 100px;
    gap: 15px;
    padding: 10px 15px;
    border-bottom: 1px solid rgba(0, 255, 157, 0.3);
    margin-bottom: 10px;
    font-size: 12px;
    color: rgba(0, 255, 157, 0.7);
    text-transform: uppercase;
}

.leaderboard-row {
    display: grid;
    grid-template-columns: 60px 120px 1fr 100px 100px;
    gap: 15px;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(0, 255, 157, 0.1);
    transition: all 0.2s ease;
    font-size: 13px;
}

.leaderboard-row:hover {
    background: rgba(0, 255, 157, 0.05);
    border-color: rgba(0, 255, 157, 0.3);
}

.leaderboard-row.current-user {
    background: rgba(0, 255, 157, 0.15);
    border-color: #00ff9d;
    font-weight: bold;
}

.rank {
    color: #00ff9d;
    font-weight: bold;
}

.rank.top-1 {
    color: #ffd700;
    text-shadow: 0 0 10px #ffd700;
}

.rank.top-2 {
    color: #c0c0c0;
}

.rank.top-3 {
    color: #cd7f32;
}

.sigil {
    font-family: 'Courier New', monospace;
    color: rgba(0, 255, 157, 0.8);
}

.level-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    text-align: center;
}

.level-WISP {
    color: #888;
    border: 1px solid #888;
}

.level-GHOST {
    color: #00ff9d;
    border: 1px solid #00ff9d;
}

.level-SPECTER {
    color: #00d4ff;
    border: 1px solid #00d4ff;
}

.level-PHANTOM {
    color: #ff00ff;
    border: 1px solid #ff00ff;
    box-shadow: 0 0 10px rgba(255, 0, 255, 0.3);
}

.invites {
    color: #00ff9d;
    font-weight: bold;
}

.balance {
    color: rgba(0, 255, 157, 0.7);
}

.loading {
    text-align: center;
    padding: 40px;
    color: rgba(0, 255, 157, 0.5);
}

.leaderboard-content::-webkit-scrollbar {
    width: 8px;
}

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

.leaderboard-content::-webkit-scrollbar-thumb {
    background: #00ff9d;
    border-radius: 4px;
}

.leaderboard-content::-webkit-scrollbar-thumb:hover {
    background: #00cc7d;
}