/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #00ff88;
    --secondary: #00cc6f;
    --accent: #00ffaa;
    --dark: #000000;
    --dark-1: #0a0a0a;
    --dark-2: #0f0f0f;
    --dark-3: #151515;
    --dark-4: #1a1a1a;
    --green-dark-1: #001a11;
    --green-dark-2: #001f15;
    --green-dark-3: #002614;
    --green-dark-4: #00291a;
    --green-dark-5: #003320;
    --light: #ffffff;
    --light-1: #f0f0f0;
    --light-2: #e0e0e0;
    --gray: #888888;
    --gray-light: #aaaaaa;
    --gray-dark: #666666;
    --green-glow: rgba(0, 255, 136, 0.3);
    --transition: all 0.15s cubic-bezier(0.4, 0, 1, 1);
}

body {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--dark);
    color: var(--light);
    line-height: 1.6;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    height: 100vh;
    position: relative;
}

/* Hexagon Canvas Background */
#hexagonCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 1;
    image-rendering: crisp-edges;
}

/* Main Container - Split Layout */
.main-container {
    display: grid;
    grid-template-columns: 40% 60%;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

/* Left Panel - Hero */
.left-panel {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(15, 15, 15, 0.7) 100%);
    border-right: 2px solid var(--primary);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    overflow-x: hidden;
    overflow-y: auto;
    box-shadow: 0 0 50px var(--green-glow), inset 0 0 100px rgba(0, 255, 136, 0.05);
    backdrop-filter: blur(3px);
}

.left-panel::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(90deg, transparent 49%, rgba(0, 255, 136, 0.03) 50%, transparent 51%),
        linear-gradient(0deg, transparent 49%, rgba(0, 255, 136, 0.03) 50%, transparent 51%);
    background-size: 20px 20px;
    pointer-events: none;
    z-index: 0;
}

.geometric-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 0;
    opacity: 0.4;
}

.shape {
    position: absolute;
    opacity: 0.15;
    animation: rotate 30s linear infinite;
    border: 2px solid var(--primary);
    box-shadow: 0 0 40px var(--green-glow);
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: transparent;
    top: -100px;
    left: -100px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    animation-duration: 40s;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: var(--green-dark-5);
    bottom: -50px;
    right: -50px;
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
    animation-direction: reverse;
    animation-duration: 35s;
}

.shape-3 {
    width: 250px;
    height: 250px;
    background: transparent;
    top: 40%;
    right: 10%;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    animation-duration: 25s;
}

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

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 500px;
    overflow: visible;
}

.logo-large {
    margin-bottom: 1rem;
    position: relative;
}

.logo-container {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-container::before {
    content: '';
    position: absolute;
    inset: -10px;
    background: 
        linear-gradient(0deg, transparent 24%, rgba(0, 255, 136, 0.05) 25%, rgba(0, 255, 136, 0.05) 26%, transparent 27%, transparent 74%, rgba(0, 255, 136, 0.05) 75%, rgba(0, 255, 136, 0.05) 76%, transparent 77%, transparent),
        linear-gradient(90deg, transparent 24%, rgba(0, 255, 136, 0.05) 25%, rgba(0, 255, 136, 0.05) 26%, transparent 27%, transparent 74%, rgba(0, 255, 136, 0.05) 75%, rgba(0, 255, 136, 0.05) 76%, transparent 77%, transparent);
    background-size: 40px 40px;
    opacity: 0.5;
    pointer-events: none;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 40px 40px;
    }
}


.logo-image, .logo-video {
    width: 160px;
    height: 160px;
    object-fit: contain;
    filter: drop-shadow(0 0 25px var(--primary)) brightness(1.15) contrast(1.3);
    position: relative;
    z-index: 1;
}

.logo-video {
    border: none;
    background: transparent;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.logo-text {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--primary);
    text-shadow: 0 0 30px var(--primary), 0 0 60px var(--green-glow);
    line-height: 1;
}

.hero-tagline {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--light-2);
    margin-bottom: 1rem;
    padding: 0.5rem 1rem;
    background: var(--dark-2);
    border: 2px solid var(--primary);
    display: inline-block;
    box-shadow: 0 0 20px var(--green-glow);
    position: relative;
}

.hero-tagline::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    width: 10px;
    height: 10px;
    background: var(--dark);
    clip-path: polygon(0 0, 100% 0, 0 100%);
    border-top: 2px solid var(--primary);
    border-left: 2px solid var(--primary);
}

.hero-tagline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    background: var(--dark);
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
    border-bottom: 2px solid var(--primary);
    border-right: 2px solid var(--primary);
}

.hero-description {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--gray-light);
    margin-bottom: 1rem;
}

/* Contract Address Section */
.contract-address-section {
    margin-bottom: 1rem;
}

.ca-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--gray);
    margin-bottom: 0.35rem;
}

.ca-container {
    display: flex;
    gap: 0.4rem;
    align-items: stretch;
}

.ca-input {
    flex: 1;
    background: var(--dark-2);
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 0.5rem 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    outline: none;
    box-shadow: 0 0 20px var(--green-glow);
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.ca-input:hover {
    box-shadow: 0 0 30px var(--primary);
}

.ca-copy-btn {
    background: var(--dark);
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.1s ease-out, color 0.1s ease-out, box-shadow 0.1s ease-out;
    box-shadow: 0 0 15px var(--green-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-width: 70px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
    overflow: hidden;
}

.ca-copy-btn .copy-icon,
.ca-copy-btn .copy-text {
    position: relative;
    z-index: 1;
}

.ca-copy-btn:hover {
    background: var(--primary);
    color: var(--dark);
    box-shadow: 0 0 30px var(--primary);
}

.ca-copy-btn:active {
    transform: scale(0.95);
}

.copy-icon {
    font-size: 0.9rem;
    line-height: 1;
}

.hero-stats-compact {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--dark-1);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top: 2px solid var(--primary);
}

.stat-compact {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
}

.stat-compact .stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    color: var(--primary);
    text-shadow: 0 0 20px var(--green-glow);
    line-height: 1;
}

.stat-compact .stat-label {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--gray);
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.btn-primary, .btn-secondary {
    padding: 0.6rem 1.5rem;
    border-radius: 0;
    font-weight: 700;
    font-size: 0.75rem;
    cursor: pointer;
    /* Tighter, more responsive hover/press feel */
    transition:
        background 0.12s ease-out,
        color 0.12s ease-out,
        box-shadow 0.12s ease-out,
        border-color 0.12s ease-out,
        transform 0.08s ease-out;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 10px;
    height: 10px;
    background: var(--dark);
    clip-path: polygon(100% 0, 100% 100%, 0 0);
    z-index: 1;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 10px;
    height: 10px;
    background: var(--dark);
    clip-path: polygon(100% 0, 100% 100%, 0 0);
    z-index: 1;
}

.btn-primary {
    background: var(--primary);
    color: var(--dark);
    box-shadow: 0 0 20px var(--green-glow);
    border: 2px solid var(--primary);
}

.btn-primary::before {
    border-top-color: var(--primary);
    border-right-color: var(--primary);
}

.btn-primary:hover {
    background: var(--dark);
    color: var(--primary);
    box-shadow: 0 0 30px var(--primary);
    border: 2px solid var(--primary);
}

.btn-primary:active,
.btn-secondary:active {
    transform: translateY(1px);
    box-shadow: 0 0 18px var(--green-glow);
}

.btn-secondary {
    background: var(--dark);
    color: var(--light);
    border: 2px solid var(--light);
}

.btn-secondary::before {
    border-top-color: var(--light);
    border-right-color: var(--light);
}

.btn-secondary:hover {
    border: 2px solid var(--primary);
    color: var(--primary);
    box-shadow: 0 0 20px var(--green-glow);
}

.btn-secondary:hover::before {
    border-top-color: var(--primary);
    border-right-color: var(--primary);
}

.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.social-link {
    color: var(--gray);
    text-decoration: none;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    transition: var(--transition);
    position: relative;
}

.social-link::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
    box-shadow: 0 0 10px var(--primary);
}

.social-link:hover {
    color: var(--primary);
    text-shadow: 0 0 10px var(--green-glow);
}

.social-link:hover::after {
    width: 100%;
}

/* Right Panel - Agents */
.right-panel {
    background: linear-gradient(135deg, rgba(10, 10, 10, 0.7) 0%, rgba(0, 0, 0, 0.7) 100%);
    padding: 2rem;
    overflow-y: auto;
    overflow-x: hidden;
    backdrop-filter: blur(3px);
    position: relative;
}

.right-panel::-webkit-scrollbar {
    width: 8px;
}

.right-panel::-webkit-scrollbar-track {
    background: var(--dark-2);
    border-left: 2px solid var(--dark-3);
}

.right-panel::-webkit-scrollbar-thumb {
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary);
}

.panel-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--light);
}

.pulse-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--dark-2);
    border: 2px solid var(--primary);
    position: relative;
}

.pulse-indicator::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    width: 8px;
    height: 8px;
    background: var(--dark);
    clip-path: polygon(0 0, 100% 0, 0 100%);
    border-top: 2px solid var(--primary);
    border-left: 2px solid var(--primary);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 0 10px var(--primary);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 10px var(--primary), 0 0 0 0 rgba(0, 255, 136, 0.7);
        opacity: 1;
    }
    50% {
        box-shadow: 0 0 20px var(--primary), 0 0 0 10px rgba(0, 255, 136, 0);
        opacity: 0.7;
    }
}

.pulse-text {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--primary);
}

/* Agents Compact Grid */
.agents-compact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.agent-compact {
    background: rgba(5, 5, 5, 0.85);
    border: 2px solid rgba(255, 255, 255, 0.15);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: flex-start;
    /* shared corner color for all four corners */
    --corner-color: rgba(255, 255, 255, 0.2);
    transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, border-color 0.12s ease-out, background 0.12s ease-out;
    cursor: default;
    position: relative;
    backdrop-filter: blur(5px);
    overflow: hidden;
}

.agent-compact::before,
.agent-compact::after {
    content: '';
    position: absolute;
    inset: 8px;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.12s ease-out, filter 0.12s ease-out;
}

.agent-compact::before {
    background:
        /* top-left vertical */ linear-gradient(to bottom, var(--corner-color), var(--corner-color)) left top / 2px 12px no-repeat,
        /* top-left horizontal */ linear-gradient(to right, var(--corner-color), var(--corner-color)) left top / 12px 2px no-repeat,
        /* bottom-right vertical */ linear-gradient(to top, var(--corner-color), var(--corner-color)) right bottom / 2px 12px no-repeat,
        /* bottom-right horizontal */ linear-gradient(to left, var(--corner-color), var(--corner-color)) right bottom / 12px 2px no-repeat;
}

.agent-compact::after {
    background:
        /* top-right vertical */ linear-gradient(to bottom, var(--corner-color), var(--corner-color)) right top / 2px 12px no-repeat,
        /* top-right horizontal */ linear-gradient(to left, var(--corner-color), var(--corner-color)) right top / 12px 2px no-repeat,
        /* bottom-left vertical */ linear-gradient(to top, var(--corner-color), var(--corner-color)) left bottom / 2px 12px no-repeat,
        /* bottom-left horizontal */ linear-gradient(to right, var(--corner-color), var(--corner-color)) left bottom / 12px 2px no-repeat;
}

.agent-compact:hover {
    border-color: var(--primary);
    background: rgba(10, 10, 10, 0.95);
    box-shadow: 0 0 40px var(--green-glow), inset 0 0 30px rgba(0, 255, 136, 0.08);
    transform: translateY(-2px);
    --corner-color: var(--primary);
}

.agent-compact:hover::before,
.agent-compact:hover::after {
    opacity: 1;
    filter: drop-shadow(0 0 12px var(--primary));
}

.agent-compact:hover .waveform-bar {
    animation-duration: 0.5s !important;
    box-shadow: 0 0 10px var(--primary);
}

.agent-compact:hover .status-badge.active {
    animation-duration: 0.8s;
}

.agent-compact:hover .cum-value {
    text-shadow: 0 0 20px var(--primary);
    transform: scale(1.05);
}

.agent-compact:hover .agent-name-compact {
    color: var(--primary);
    text-shadow: 0 0 15px var(--green-glow);
}

.agent-compact:hover .space-link {
    color: var(--primary);
}

/* Debate Indicator - When agents are in same space */
.agent-compact.in-debate {
    border-color: rgba(255, 100, 100, 0.5);
    box-shadow: 0 0 20px rgba(255, 100, 100, 0.3);
    animation: debateGlow 3s ease-in-out infinite;
}

@keyframes debateGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 100, 100, 0.3);
    }
    50% {
        box-shadow: 0 0 35px rgba(255, 100, 100, 0.5), 0 0 50px rgba(0, 255, 136, 0.2);
    }
}

.agent-compact.in-debate::after {
    border-color: rgba(255, 100, 100, 0.5);
}

.agent-compact.in-debate::before {
    border-color: rgba(255, 100, 100, 0.5);
}

.debate-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    margin-top: 0.5rem;
    margin-bottom: 0.75rem;
    background: linear-gradient(90deg, rgba(255, 100, 100, 0.1), rgba(255, 150, 0, 0.1));
    border: 2px solid rgba(255, 100, 100, 0.4);
    border-left: 4px solid #ff6464;
    animation: debatePulse 2s ease-in-out infinite;
}

@keyframes debatePulse {
    0%, 100% {
        border-left-color: #ff6464;
        box-shadow: 0 0 10px rgba(255, 100, 100, 0.3);
    }
    50% {
        border-left-color: #ff9664;
        box-shadow: 0 0 20px rgba(255, 100, 100, 0.5);
    }
}

.debate-icon-svg {
    animation: iconPulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 5px rgba(255, 100, 100, 0.5));
}

@keyframes iconPulse {
    0%, 100% {
        opacity: 0.8;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

.debate-text {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #ff9664;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(255, 100, 100, 0.3);
}

/* Enhanced waveform when debating */
.agent-compact.in-debate .waveform-bar {
    background: linear-gradient(180deg, #ff6464, var(--primary));
    animation-duration: 0.8s !important;
}

.agent-compact.in-debate .activity-waveform {
    border-color: rgba(255, 100, 100, 0.3);
}

.agent-compact.in-debate .status-badge.active {
    border-color: #ff6464;
    background: rgba(255, 100, 100, 0.15);
    box-shadow: 0 0 20px rgba(255, 100, 100, 0.4);
}

/* Avatar container - currently hidden since all PFPs are identical */
.agent-avatar-compact {
    display: none;
}

.avatar-shape {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.25rem;
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
    border: 2px solid var(--primary);
    box-shadow: 0 0 20px var(--green-glow);
    transition: var(--transition);
    position: relative;
}

.avatar-shape::before {
    content: '';
    position: absolute;
    inset: -4px;
    border: 1px solid var(--primary);
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
    opacity: 0.3;
    animation: pulse 3s ease-in-out infinite;
}

.agent-compact:hover .avatar-shape {
    transform: scale(1.05);
    box-shadow: 0 0 30px var(--primary);
}

.agent-status-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    background: var(--primary);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    box-shadow: 0 0 10px var(--primary);
    animation: pulse 2s ease-in-out infinite;
}

.agent-info-compact {
    width: 100%;
}

.agent-name-compact {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--light);
    margin-bottom: 0.35rem;
    letter-spacing: 0.02em;
    transition: var(--transition);
}

.agent-handle-compact {
    font-size: 0.75rem;
    color: var(--primary);
    margin-bottom: 1rem;
    font-weight: 600;
    opacity: 0.8;
    transition: var(--transition);
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
}

/* Live Status Indicator */
.agent-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.status-badge {
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    padding: 0.35rem 0.65rem;
    border: 2px solid var(--gray);
    color: var(--gray);
    background: var(--dark);
    position: relative;
}

.status-badge::before {
    content: '●';
    margin-right: 0.35rem;
    font-size: 0.5rem;
}

.status-badge.active {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(0, 255, 136, 0.15);
    animation: statusPulse 2s ease-in-out infinite;
    box-shadow: 0 0 20px var(--green-glow);
}

.status-badge.active::before {
    animation: statusDot 1.5s ease-in-out infinite;
}

@keyframes statusDot {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

@keyframes statusPulse {
    0%, 100% {
        box-shadow: 0 0 15px var(--green-glow);
    }
    50% {
        box-shadow: 0 0 25px var(--primary);
    }
}

.status-time {
    font-size: 0.6rem;
    color: var(--gray);
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.02em;
}

/* Space Link Container */
.space-link-container {
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background: rgba(0, 255, 136, 0.05);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-left: 3px solid var(--primary);
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.space-label {
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.space-link {
    font-size: 0.7rem;
    color: var(--light);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(0, 255, 136, 0.3);
    text-underline-offset: 3px;
    display: block;
    transition: var(--transition);
    word-break: break-all;
    cursor: pointer !important;
    position: relative;
    z-index: 11;
    pointer-events: auto !important;
}

.space-link:hover {
    color: var(--primary);
    text-shadow: 0 0 10px var(--green-glow);
    text-decoration-color: var(--primary);
}

.space-link:active {
    color: var(--accent);
}

/* Last Phrase Ticker */
.last-phrase-container {
    margin-bottom: 0.75rem;
    background: rgba(0, 255, 136, 0.05);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-left: 3px solid var(--primary);
    padding: 0.5rem;
    position: relative;
    overflow: hidden;
}

.phrase-label {
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.phrase-text {
    font-size: 0.7rem;
    color: var(--gray-light);
    line-height: 1.4;
    font-style: italic;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 2.8em;
}

/* Agent State Tags */
.agent-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.25rem 0 0.9rem;
}

.agent-tag {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.25rem 0.9rem 0.25rem 1.3rem;
    border-radius: 999px;
    border: 1px solid rgba(0, 255, 136, 0.5);
    color: var(--primary);
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.15), rgba(0, 0, 0, 0.6));
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.25);
    position: relative;
}

.agent-tag::before {
    content: '';
    position: absolute;
    left: 0.55rem;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 8px var(--primary);
}

/* Activity Waveform */
.activity-waveform {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 28px;
    margin-bottom: 0.75rem;
    padding: 0.4rem;
    background: rgba(0, 255, 136, 0.05);
    border: 1px solid rgba(0, 255, 136, 0.2);
}

.waveform-bar {
    flex: 1;
    background: var(--primary);
    min-width: 2px;
    height: 20%;
    box-shadow: 0 0 5px var(--green-glow);
    animation: waveform 1.5s ease-in-out infinite;
}

.waveform-bar:nth-child(1) { animation-delay: 0s; }
.waveform-bar:nth-child(2) { animation-delay: 0.1s; }
.waveform-bar:nth-child(3) { animation-delay: 0.2s; }
.waveform-bar:nth-child(4) { animation-delay: 0.3s; }
.waveform-bar:nth-child(5) { animation-delay: 0.4s; }
.waveform-bar:nth-child(6) { animation-delay: 0.5s; }
.waveform-bar:nth-child(7) { animation-delay: 0.6s; }
.waveform-bar:nth-child(8) { animation-delay: 0.7s; }

@keyframes waveform {
    0%, 100% {
        height: 20%;
    }
    50% {
        height: 80%;
    }
}

/* Disable waveform animation for offline agents */
.agent-compact:not(.agent-online) .activity-waveform .waveform-bar {
    animation: none !important;
    height: 10%;
    box-shadow: none;
}

/* Cumulative Stats */
.cumulative-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 2px solid rgba(0, 255, 136, 0.15);
    margin-top: 0.5rem;
}

.cum-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    padding: 0.6rem 0.4rem;
    background: rgba(0, 255, 136, 0.03);
    border: 1px solid rgba(0, 255, 136, 0.1);
    position: relative;
    transition: var(--transition);
}

.cum-stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
    opacity: 0;
    transition: var(--transition);
}

.cum-stat:hover::before {
    opacity: 1;
}

.cum-stat:hover {
    background: rgba(0, 255, 136, 0.08);
    border-color: rgba(0, 255, 136, 0.3);
}

.cum-value {
    font-size: 1.15rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    color: var(--primary);
    text-shadow: 0 0 10px var(--green-glow);
    line-height: 1;
    margin-bottom: 0.35rem;
    transition: var(--transition);
}

.cum-label {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Responsive */
@media (max-width: 1400px) {
    .main-container {
        grid-template-columns: 45% 55%;
    }
}

@media (max-width: 1024px) {
    body {
        overflow-y: auto;
        height: auto;
    }
    
    .main-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }
    
    .left-panel {
        border-right: none;
        border-bottom: 2px solid var(--primary);
        padding: 2rem;
        height: auto;
        min-height: auto;
    }
    
    .logo-container {
        width: 150px;
        height: 150px;
    }
    
    .logo-image, .logo-video {
        width: 130px;
        height: 130px;
    }
    
    .logo-text {
        font-size: 2.5rem;
    }
    
    .hero-stats-compact {
        padding: 1rem;
        gap: 1rem;
    }
    
    .agents-compact-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .right-panel {
        height: auto;
        overflow-y: visible;
    }
    
    .avatar-shape {
        width: 55px;
        height: 55px;
        font-size: 1.75rem;
    }
    
    .agent-name-compact {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    body {
        overflow-y: auto;
        height: auto;
    }
    
    .left-panel {
        padding: 1.5rem 1rem;
        min-height: auto;
    }
    
    .logo-large {
        margin-bottom: 1rem;
    }
    
    .logo-container {
        width: 120px;
        height: 120px;
    }
    
    .logo-image, .logo-video {
        width: 100px;
        height: 100px;
    }
    
    .logo-text {
        font-size: 2rem;
    }
    
    .hero-tagline {
        font-size: 0.7rem;
        padding: 0.4rem 0.8rem;
    }
    
    .hero-description {
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }
    
    .contract-address-section {
        margin-bottom: 1rem;
    }
    
    .ca-input {
        font-size: 0.65rem;
    }
    
    .ca-copy-btn {
        font-size: 0.65rem;
        min-width: 60px;
    }
    
    .hero-stats-compact {
        padding: 0.75rem;
        gap: 1rem;
        margin-bottom: 1rem;
    }
    
    .stat-compact .stat-value {
        font-size: 1.2rem;
    }
    
    .stat-compact .stat-label {
        font-size: 0.55rem;
    }
    
    .hero-actions {
        flex-direction: column;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        padding: 0.7rem 1rem;
        font-size: 0.7rem;
    }
    
    .social-links {
        gap: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .social-link {
        font-size: 0.6rem;
    }
    
    .agents-compact-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .right-panel {
        padding: 2rem 1rem;
        height: auto;
        min-height: 50vh;
    }
    
    .panel-header {
        margin-bottom: 1.5rem;
    }
    
    .panel-title {
        font-size: 1.2rem;
    }
    
    .pulse-indicator {
        padding: 0.4rem 0.75rem;
    }
    
    .pulse-text {
        font-size: 0.65rem;
    }
    
    .agent-compact {
        padding: 1.5rem 1.25rem;
    }
    
    .avatar-shape {
        width: 55px;
        height: 55px;
        font-size: 1.75rem;
    }
    
    .agent-avatar-compact {
        margin-bottom: 1rem;
    }
    
    .agent-name-compact {
        font-size: 0.95rem;
    }
    
    .agent-handle-compact {
        font-size: 0.7rem;
    }
    
    .status-badge {
        font-size: 0.55rem;
        padding: 0.25rem 0.45rem;
    }
    
    .status-space {
        font-size: 0.6rem;
    }
    
    .agent-status-bar {
        margin-bottom: 0.75rem;
    }
    
    .last-phrase-container {
        margin-bottom: 0.75rem;
    }
    
    .phrase-label {
        font-size: 0.5rem;
    }
    
    .phrase-text {
        font-size: 0.65rem;
    }
    
    .activity-waveform {
        height: 28px;
        padding: 0.5rem;
        gap: 3px;
        margin-bottom: 1rem;
    }
    
    .cumulative-stats {
        gap: 0.75rem;
        padding-top: 0.75rem;
    }
    
    .cum-value {
        font-size: 1rem;
    }
    
    .cum-label {
        font-size: 0.6rem;
    }
    
    .lock-icon-svg {
        margin-bottom: 0.75rem;
    }
    
    .lock-icon-svg svg {
        width: 40px;
        height: 40px;
    }
    
    .unlock-text {
        font-size: 0.65rem;
    }
    
    .unlock-mc {
        font-size: 1.1rem;
    }
}

/* Mobile touch optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn-primary, .btn-secondary, .ca-copy-btn {
        min-height: 44px; /* iOS minimum tap target */
    }
    
    .agent-compact {
        min-height: 80px;
    }
}

/* Locked Agent Styling */
.agent-locked {
    border-style: dashed !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    background: rgba(10, 10, 10, 0.5) !important;
    opacity: 0.7;
    position: relative;
    cursor: not-allowed;
}

.agent-locked::before,
.agent-locked::after {
    display: none !important;
}

.agent-locked:hover {
    transform: none !important;
    border-color: rgba(0, 255, 136, 0.3) !important;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.1) !important;
}

.lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    text-align: center;
    pointer-events: none;
}

.lock-icon-svg {
    margin-bottom: 0.5rem;
    color: var(--primary);
    filter: drop-shadow(0 0 15px var(--primary));
    animation: lockPulse 3s ease-in-out infinite;
}

.lock-icon-svg svg {
    display: block;
}

@keyframes lockPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

.redacted-text {
    font-size: 1.5rem;
    color: var(--gray);
    opacity: 0.5;
    letter-spacing: -0.1em;
}

.locked-name {
    color: var(--gray) !important;
    font-weight: 800 !important;
    letter-spacing: 0.2em !important;
}

.locked-handle {
    opacity: 0.5 !important;
    font-family: 'JetBrains Mono', monospace !important;
}

.unlock-text {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--gray-light);
    margin-bottom: 0.25rem;
}

.unlock-mc {
    font-size: 1.2rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    color: var(--primary);
    text-shadow: 0 0 20px var(--primary);
    letter-spacing: 0.1em;
}

.agent-locked .agent-avatar-compact,
.agent-locked .agent-info-compact {
    filter: blur(3px);
    opacity: 0.2;
}

.agent-locked .avatar-shape {
    border-style: dashed !important;
    border-color: rgba(0, 255, 136, 0.3) !important;
}

/* Additional shading variations */
.agent-compact:nth-child(3n+1) {
    background: rgba(10, 10, 10, 0.7);
}

.agent-compact:nth-child(3n+2) {
    background: rgba(15, 15, 15, 0.7);
}

.agent-compact:nth-child(3n+3) {
    background: rgba(20, 20, 20, 0.7);
}
