:root {
    --bg-primary: #0a0c0f;
    --bg-secondary: #12151a;
    --bg-card: #161a21;
    --bg-card-hover: #1a1f28;
    --border-color: #2a3142;
    --accent-primary: #d97459;
    --accent-secondary: #e8937b;
    --accent-glow: rgba(217, 116, 89, 0.3);
    --text-primary: #e8e8e8;
    --text-secondary: #8b9ab5;
    --text-muted: #5a6880;
    --success: #4ade80;
    --warning: #fbbf24;
    --danger: #f87171;
}

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

body {
    font-family: 'JetBrains Mono', monospace;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Animated background */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(217, 116, 89, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(217, 116, 89, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-section img {
    width: 50px;
    height: 50px;
    filter: drop-shadow(0 0 10px var(--accent-glow));
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { filter: drop-shadow(0 0 10px var(--accent-glow)); }
    50% { filter: drop-shadow(0 0 20px var(--accent-primary)); }
}

.logo-text h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 2px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-text span {
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 3px;
    text-transform: uppercase;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    padding: 10px 18px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: blink 1.5s infinite;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: var(--bg-primary);
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 25px var(--accent-glow);
}

.social-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 10px 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.social-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
}

.social-btn svg {
    width: 18px;
    height: 18px;
    fill: var(--text-primary);
}

/* Mission Section */
.mission-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px 25px;
    margin-bottom: 25px;
}

.mission-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    color: var(--accent-primary);
    margin-bottom: 12px;
    letter-spacing: 2px;
}

.mission-text {
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.mission-text .highlight {
    color: var(--accent-primary);
    font-weight: 600;
}

.mission-text .goal {
    color: var(--success);
    font-weight: 600;
}

/* Main Grid */
.main-grid {
    display: grid;
    grid-template-columns: 280px 1fr 300px;
    gap: 20px;
}

@media (max-width: 1200px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
}

/* Card Styles */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    animation: fadeInUp 0.6s ease forwards;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 2px;
}

.card-title::before {
    content: '// ';
    color: var(--accent-primary);
}

.card-badge {
    font-size: 0.65rem;
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: 1px;
    font-weight: 600;
}

.badge-live {
    background: rgba(74, 222, 128, 0.15);
    color: var(--success);
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.badge-streaming {
    background: rgba(217, 116, 89, 0.15);
    color: var(--accent-primary);
    border: 1px solid rgba(217, 116, 89, 0.3);
}

.card-body {
    padding: 15px 20px;
}

/* Stats List */
.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.stat-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.stat-value.success {
    color: var(--success);
}

.stat-value.warning {
    color: var(--warning);
}

.stat-value.danger {
    color: var(--danger);
}

/* Video Section */
.video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 6px;
    overflow: hidden;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-container canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.video-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(239, 68, 68, 0.9);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.video-badge .dot {
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: blink 1s infinite;
}

.video-env {
    position: absolute;
    top: 12px;
    left: 80px;
    display: flex;
    gap: 8px;
}

.env-tag {
    background: rgba(0, 0, 0, 0.7);
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.65rem;
    color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
}

.video-viewers {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.video-stats {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.video-stat {
    background: rgba(0, 0, 0, 0.8);
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.6rem;
    border-left: 2px solid var(--accent-primary);
}

.video-stat-label {
    color: var(--text-muted);
    margin-bottom: 2px;
}

.video-stat-value {
    color: var(--success);
    font-weight: 600;
}

.video-bottom {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.blocks-confirmed {
    background: rgba(0, 0, 0, 0.8);
    padding: 8px 14px;
    border-radius: 4px;
}

.blocks-label {
    font-size: 0.55rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.blocks-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.resolution-selector {
    display: flex;
    gap: 4px;
}

.res-btn {
    background: rgba(0, 0, 0, 0.6);
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.6rem;
    color: var(--text-muted);
    cursor: pointer;
}

.res-btn.active {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

/* Environment Section */
.env-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.env-item {
    background: var(--bg-secondary);
    border-radius: 6px;
    padding: 15px;
    text-align: center;
}

.env-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.env-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.env-value span {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.env-bar {
    width: 100%;
    height: 3px;
    background: var(--border-color);
    border-radius: 2px;
    margin-top: 10px;
    overflow: hidden;
}

.env-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 2px;
    transition: width 1s ease;
}

/* Resources Section */
.resource-item {
    margin-bottom: 15px;
}

.resource-item:last-child {
    margin-bottom: 0;
}

.resource-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.resource-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.resource-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-primary);
}

.resource-bar {
    width: 100%;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
}

.resource-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 1s ease;
}

.resource-bar-fill.high {
    background: linear-gradient(90deg, var(--success), #22c55e);
}

.resource-bar-fill.medium {
    background: linear-gradient(90deg, var(--warning), #f59e0b);
}

.resource-bar-fill.low {
    background: linear-gradient(90deg, var(--danger), #ef4444);
}

/* Mining Output */
.output-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    background: var(--bg-secondary);
    border-radius: 6px;
    margin-bottom: 10px;
}

.output-item:last-child {
    margin-bottom: 0;
}

.output-icon {
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--accent-primary);
}

.output-info {
    flex: 1;
}

.output-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.output-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.output-change {
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.output-change.positive {
    background: rgba(74, 222, 128, 0.15);
    color: var(--success);
}

/* Colony Health */
.health-circle {
    width: 140px;
    height: 140px;
    margin: 20px auto;
    position: relative;
}

.health-circle svg {
    transform: rotate(-90deg);
}

.health-circle-bg {
    fill: none;
    stroke: var(--border-color);
    stroke-width: 8;
}

.health-circle-fill {
    fill: none;
    stroke: var(--accent-primary);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 377;
    stroke-dashoffset: 22.62;
    transition: stroke-dashoffset 1s ease;
}

.health-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Orbitron', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.health-label {
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Claude Analysis */
.terminal {
    background: var(--bg-secondary);
    border-radius: 6px;
    padding: 20px;
    font-size: 0.8rem;
    line-height: 1.8;
}

.terminal-prompt {
    color: var(--accent-primary);
}

.terminal-text {
    color: var(--text-secondary);
}

.terminal-tag {
    font-weight: 600;
}

.terminal-tag.observation {
    color: var(--warning);
}

.terminal-tag.status {
    color: var(--accent-primary);
}

.terminal-tag.recommendation {
    color: var(--success);
}

.terminal-highlight {
    font-weight: 600;
}

.terminal-highlight.high {
    color: var(--success);
}

.terminal-highlight.optimal {
    color: var(--success);
}

.terminal-highlight.nominal {
    color: var(--accent-secondary);
}

.terminal-cursor {
    display: inline-block;
    width: 8px;
    height: 16px;
    background: var(--accent-primary);
    animation: cursor-blink 1s infinite;
    vertical-align: middle;
    margin-left: 4px;
}

@keyframes cursor-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Activity Stream */
.activity-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.75rem;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-time {
    color: var(--text-muted);
    font-size: 0.65rem;
    white-space: nowrap;
}

.activity-text {
    color: var(--text-secondary);
}

.activity-text .highlight {
    color: var(--accent-primary);
    font-weight: 600;
}

.activity-text .success {
    color: var(--success);
    font-weight: 600;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-grid > *:nth-child(1) { animation-delay: 0.1s; }
.main-grid > *:nth-child(2) { animation-delay: 0.2s; }
.main-grid > *:nth-child(3) { animation-delay: 0.3s; }

/* Center column layout */
.center-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Right column layout */
.right-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Left column layout */
.left-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.excellent-badge {
    color: var(--success);
}

.thinking-badge {
    color: var(--accent-primary);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
