/* Minecraft Font */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

:root {
    --mc-bg: #1a1a1a;
    --mc-panel: #2b2b2b;
    --mc-border: #555555;
    --mc-highlight: #8b8b8b;
    --mc-text: #ffffff;
    --mc-text-shadow: #3f3f3f;
    --mc-gold: #ffaa00;
    --mc-green: #55ff55;
    --mc-red: #ff5555;
    --mc-blue: #5555ff;
    --mc-purple: #aa00aa;
    --mc-aqua: #55ffff;
    --mc-gray: #aaaaaa;
}

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

body {
    font-family: 'Press Start 2P', cursive;
    background: var(--mc-bg);
    color: var(--mc-text);
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.1) 2px, rgba(0,0,0,0.1) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(0,0,0,0.1) 2px, rgba(0,0,0,0.1) 4px);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Header */
.mc-header {
    background: var(--mc-panel);
    border: 4px solid var(--mc-border);
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 
        inset -2px -2px 0 var(--mc-border),
        inset 2px 2px 0 var(--mc-highlight);
}

.mc-title {
    font-size: 24px;
    color: var(--mc-gold);
    text-shadow: 3px 3px 0 var(--mc-text-shadow);
    margin-bottom: 20px;
    text-align: center;
}

.mc-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Minecraft-style Buttons */
.mc-button {
    background: var(--mc-panel);
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    position: relative;
}

.button-inner {
    display: block;
    padding: 12px 24px;
    background: linear-gradient(180deg, #7a7a7a 0%, #5a5a5a 50%, #3a3a3a 100%);
    border: 2px solid #000;
    box-shadow: 
        inset -2px -2px 0 rgba(0,0,0,0.5),
        inset 2px 2px 0 rgba(255,255,255,0.2);
    color: var(--mc-text);
    text-shadow: 2px 2px 0 var(--mc-text-shadow);
}

.mc-button:hover .button-inner {
    background: linear-gradient(180deg, #9a9a9a 0%, #7a7a7a 50%, #5a5a5a 100%);
}

.mc-button:active .button-inner {
    box-shadow: 
        inset 2px 2px 0 rgba(0,0,0,0.5),
        inset -2px -2px 0 rgba(255,255,255,0.2);
}

.nav-btn.active .button-inner {
    background: linear-gradient(180deg, #ffd700 0%, #ffaa00 50%, #cc8800 100%);
    color: #000;
    text-shadow: 1px 1px 0 rgba(255,255,255,0.3);
}

/* Filters */
.filters {
    background: var(--mc-panel);
    border: 4px solid var(--mc-border);
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
    box-shadow: 
        inset -2px -2px 0 var(--mc-border),
        inset 2px 2px 0 var(--mc-highlight);
}

.mc-label {
    font-size: 10px;
    color: var(--mc-gray);
}

.mc-select {
    background: var(--mc-bg);
    border: 2px solid var(--mc-border);
    color: var(--mc-text);
    padding: 8px 12px;
    font-family: inherit;
    font-size: 10px;
    cursor: pointer;
}

/* Levels Summary */
.levels-summary {
    background: var(--mc-panel);
    border: 4px solid var(--mc-border);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 
        inset -2px -2px 0 var(--mc-border),
        inset 2px 2px 0 var(--mc-highlight);
}

.level-info {
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(0,0,0,0.3);
    border-left: 4px solid var(--mc-gold);
}

.level-info h3 {
    font-size: 12px;
    color: var(--mc-gold);
    margin-bottom: 5px;
}

.level-info p {
    font-size: 8px;
    color: var(--mc-gray);
    line-height: 1.5;
}

/* Advancements Grid */
.advancements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.advancement-card {
    background: var(--mc-panel);
    border: 4px solid var(--mc-border);
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    box-shadow: 
        inset -2px -2px 0 var(--mc-border),
        inset 2px 2px 0 var(--mc-highlight);
}

.advancement-card:hover {
    border-color: var(--mc-gold);
    transform: translateY(-2px);
    box-shadow: 
        inset -2px -2px 0 var(--mc-gold),
        inset 2px 2px 0 var(--mc-gold),
        0 4px 8px rgba(0,0,0,0.5);
}

.advancement-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 10px;
    display: block;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.advancement-title {
    font-size: 10px;
    text-align: center;
    margin-bottom: 5px;
    color: var(--mc-gold);
    text-shadow: 2px 2px 0 var(--mc-text-shadow);
    word-wrap: break-word;
}

.advancement-meta {
    display: flex;
    justify-content: space-between;
    font-size: 8px;
    color: var(--mc-gray);
    margin-top: 10px;
}

.level-badge {
    background: var(--mc-bg);
    padding: 4px 8px;
    border: 2px solid var(--mc-border);
}

.tab-badge {
    background: var(--mc-bg);
    padding: 4px 8px;
    border: 2px solid var(--mc-border);
    text-transform: capitalize;
}

/* Level Colors */
.level-badge.L0 { border-color: var(--mc-gray); color: var(--mc-gray); }
.level-badge.L1 { border-color: var(--mc-green); color: var(--mc-green); }
.level-badge.L2 { border-color: var(--mc-aqua); color: var(--mc-aqua); }
.level-badge.L3 { border-color: var(--mc-red); color: var(--mc-red); }
.level-badge.L4 { border-color: var(--mc-purple); color: var(--mc-purple); }
.level-badge.L5 { border-color: var(--mc-gold); color: var(--mc-gold); }
.level-badge.L6 { border-color: #ff55ff; color: #ff55ff; }

/* Agents Grid */
.agents-header {
    text-align: center;
    margin-bottom: 30px;
}

.section-title {
    font-size: 20px;
    color: var(--mc-gold);
    text-shadow: 3px 3px 0 var(--mc-text-shadow);
    margin-bottom: 10px;
}

.section-description {
    font-size: 10px;
    color: var(--mc-gray);
}

.agents-grid {
    display: grid;
    gap: 20px;
}

.agent-card {
    background: var(--mc-panel);
    border: 4px solid var(--mc-border);
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 
        inset -2px -2px 0 var(--mc-border),
        inset 2px 2px 0 var(--mc-highlight);
}

.agent-card:hover {
    border-color: var(--mc-aqua);
    transform: translateY(-2px);
    box-shadow: 
        inset -2px -2px 0 var(--mc-aqua),
        inset 2px 2px 0 var(--mc-aqua),
        0 4px 8px rgba(0,0,0,0.5);
}

.agent-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.agent-name {
    font-size: 14px;
    color: var(--mc-aqua);
    text-shadow: 2px 2px 0 var(--mc-text-shadow);
}

.agent-stats {
    font-size: 10px;
    color: var(--mc-green);
}

.agent-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.info-item {
    background: rgba(0,0,0,0.3);
    padding: 10px;
    border-left: 3px solid var(--mc-gray);
}

.info-label {
    font-size: 8px;
    color: var(--mc-gray);
    margin-bottom: 5px;
}

.info-value {
    font-size: 10px;
    color: var(--mc-text);
}

.agent-description {
    font-size: 9px;
    color: var(--mc-gray);
    line-height: 1.6;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid var(--mc-border);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    overflow-y: auto;
}

.modal.active {
    display: block;
}

.modal-content {
    margin: 50px auto;
    max-width: 800px;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.mc-panel {
    background: var(--mc-panel);
    border: 4px solid var(--mc-border);
    padding: 30px;
    box-shadow: 
        inset -2px -2px 0 var(--mc-border),
        inset 2px 2px 0 var(--mc-highlight),
        0 8px 16px rgba(0,0,0,0.5);
}

.close {
    color: var(--mc-gray);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.close:hover {
    color: var(--mc-red);
}

.detail-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 3px solid var(--mc-border);
}

.detail-icon {
    width: 96px;
    height: 96px;
    image-rendering: pixelated;
    border: 3px solid var(--mc-gold);
}

.detail-title-section h2 {
    font-size: 16px;
    color: var(--mc-gold);
    text-shadow: 2px 2px 0 var(--mc-text-shadow);
    margin-bottom: 10px;
}

.detail-badges {
    display: flex;
    gap: 10px;
}

.detail-section {
    margin: 20px 0;
}

.detail-section h3 {
    font-size: 12px;
    color: var(--mc-aqua);
    margin-bottom: 10px;
    text-shadow: 2px 2px 0 var(--mc-text-shadow);
}

.detail-section p {
    font-size: 9px;
    color: var(--mc-gray);
    line-height: 1.6;
}

.prerequisites-list {
    list-style: none;
    padding: 0;
}

.prerequisite-item {
    background: rgba(0,0,0,0.3);
    padding: 8px;
    margin: 5px 0;
    border-left: 3px solid var(--mc-red);
    font-size: 9px;
}

.performance-reports {
    display: grid;
    gap: 15px;
}

.report-item {
    background: rgba(0,0,0,0.3);
    padding: 15px;
    border-left: 4px solid var(--mc-gray);
}

.report-item.pass {
    border-left-color: var(--mc-green);
}

.report-item.partial {
    border-left-color: var(--mc-gold);
}

.report-item.fail {
    border-left-color: var(--mc-red);
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.report-agent {
    font-size: 10px;
    color: var(--mc-aqua);
}

.report-status {
    font-size: 8px;
    padding: 4px 8px;
    border: 2px solid;
    text-transform: uppercase;
}

.report-status.pass {
    border-color: var(--mc-green);
    color: var(--mc-green);
}

.report-status.partial {
    border-color: var(--mc-gold);
    color: var(--mc-gold);
}

.report-status.fail {
    border-color: var(--mc-red);
    color: var(--mc-red);
}

.report-comment {
    font-size: 8px;
    color: var(--mc-gray);
    line-height: 1.5;
}

.demo-link {
    color: var(--mc-aqua);
    text-decoration: none;
    border-bottom: 1px solid var(--mc-aqua);
}

.demo-link:hover {
    color: var(--mc-gold);
    border-bottom-color: var(--mc-gold);
}

/* View Container */
.view-container {
    display: none;
}

.view-container.active {
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    .mc-title {
        font-size: 16px;
    }
    
    .advancements-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .agent-info {
        grid-template-columns: 1fr;
    }
}

/* Loading State */
.loading {
    text-align: center;
    padding: 40px;
    font-size: 12px;
    color: var(--mc-gray);
}

.loading::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Demo Videos Section */
.demo-videos {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.demo-video-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    color: white;
    border: 2px solid #990000;
    border-radius: 4px;
    cursor: pointer;
    font-size: 8px;
    font-weight: 600;
    font-family: 'Press Start 2P', cursive;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.demo-video-btn:hover {
    background: linear-gradient(135deg, #cc0000 0%, #aa0000 100%);
    border-color: #ff0000;
    transform: translateY(-2px);
    box-shadow: 
        0 4px 8px rgba(255, 0, 0, 0.4),
        inset -1px -1px 0 rgba(0,0,0,0.3),
        inset 1px 1px 0 rgba(255,255,255,0.2);
}

.demo-video-btn:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.3),
        inset 1px 1px 0 rgba(0,0,0,0.3);
}

.demo-video-btn svg {
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.demo-video-btn:hover svg {
    transform: scale(1.2);
}