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

body {
    font-family: 'Press Start 2P', cursive;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 32px, rgba(0,0,0,0.1) 32px, rgba(0,0,0,0.1) 64px),
        repeating-linear-gradient(90deg, transparent, transparent 32px, rgba(0,0,0,0.1) 32px, rgba(0,0,0,0.1) 64px);
    height: 100vh;
    color: #fff;
    overflow-x: hidden;
    overflow-y: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.minecraft-header {
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.6);
    border: 4px solid #8b7355;
    border-radius: 8px;
    box-shadow: 
        0 0 20px rgba(139, 115, 85, 0.5),
        inset 0 0 20px rgba(0, 0, 0, 0.3);
    position: relative;
    flex-shrink: 0;
}

.minecraft-header::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #8b7355, #a0826d, #8b7355);
    border-radius: 8px;
    z-index: -1;
    opacity: 0.7;
}

.title {
    font-size: 2.5em;
    color: #ffd700;
    text-shadow: 
        3px 3px 0px #8b7355,
        6px 6px 0px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(255, 215, 0, 0.8);
    margin-bottom: 10px;
    letter-spacing: 2px;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 
            3px 3px 0px #8b7355,
            6px 6px 0px rgba(0, 0, 0, 0.5),
            0 0 20px rgba(255, 215, 0, 0.8);
    }
    to {
        text-shadow: 
            3px 3px 0px #8b7355,
            6px 6px 0px rgba(0, 0, 0, 0.5),
            0 0 30px rgba(255, 215, 0, 1),
            0 0 40px rgba(255, 215, 0, 0.6);
    }
}

.subtitle {
    font-size: 0.8em;
    color: #c0c0c0;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.5);
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
    flex: 1;
    min-height: 0;
}

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

.video-section {
    background: rgba(0, 0, 0, 0.7);
    border: 3px solid #8b7355;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 
        0 0 15px rgba(139, 115, 85, 0.4),
        inset 0 0 15px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.video-container {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

#videoPlayer,
.youtube-embed {
    width: 100%;
    height: 100%;
    border: 2px solid #8b7355;
    border-radius: 4px;
    background: #000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    flex: 1;
    min-height: 0;
}

#videoPlayer:not(.youtube-embed) {
    object-fit: contain;
}

.yt-unavailable-msg {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    text-align: center;
    color: #c0c0c0;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6em;
    line-height: 2;
}

.yt-unavailable-msg p { margin: 0.5em 0; }

.yt-unavailable-msg a {
    color: #ffd700;
    text-decoration: none;
}

.yt-unavailable-msg a:hover {
    text-decoration: underline;
}

.yt-unavailable-msg code {
    background: rgba(255,255,255,0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

.video-controls {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.minecraft-btn {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7em;
    padding: 12px 20px;
    background: linear-gradient(180deg, #8b7355 0%, #6b5a47 100%);
    border: 3px solid #5a4a3a;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.5);
    box-shadow: 
        0 4px 0px #5a4a3a,
        inset 0 1px 0px rgba(255, 255, 255, 0.2);
    transition: all 0.1s;
    flex: 1;
    min-width: 120px;
}

.minecraft-btn:hover:not(:disabled) {
    transform: translateY(2px);
    box-shadow: 
        0 2px 0px #5a4a3a,
        inset 0 1px 0px rgba(255, 255, 255, 0.2);
}

.minecraft-btn:active:not(:disabled) {
    transform: translateY(4px);
    box-shadow: 
        0 0 0px #5a4a3a,
        inset 0 1px 0px rgba(255, 255, 255, 0.2);
}

.minecraft-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.terminal-section {
    background: rgba(0, 0, 0, 0.9);
    border: 3px solid #00ff00;
    border-radius: 8px;
    box-shadow: 
        0 0 20px rgba(0, 255, 0, 0.3),
        inset 0 0 20px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.terminal-header {
    background: #1a1a1a;
    padding: 10px 15px;
    border-bottom: 2px solid #00ff00;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.terminal-title {
    font-size: 0.7em;
    color: #00ff00;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.8);
}

.terminal-controls {
    display: flex;
    gap: 8px;
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.terminal-dot.red {
    background: #ff5f56;
}

.terminal-dot.yellow {
    background: #ffbd2e;
}

.terminal-dot.green {
    background: #27c93f;
}

.terminal-body {
    padding: 15px;
    flex: 1;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    line-height: 1.6;
    background: #000;
    color: #00ff00;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
    min-height: 0;
}

.terminal-line {
    margin-bottom: 8px;
    word-wrap: break-word;
}

.terminal-prompt {
    color: #00ff00;
    margin-right: 8px;
}

.terminal-text {
    color: #00ff00;
}

.terminal-line .movement {
    color: #ffff00;
}

.terminal-line .timestamp {
    color: #00ffff;
}

.terminal-line .action {
    color: #ff00ff;
}

.stats-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
    flex-shrink: 0;
}

.stat-card {
    background: rgba(0, 0, 0, 0.7);
    border: 3px solid #8b7355;
    border-radius: 8px;
    padding: 35px;
    text-align: center;
    box-shadow: 
        0 0 15px rgba(139, 115, 85, 0.3),
        inset 0 0 15px rgba(0, 0, 0, 0.3);
}

.stat-label {
    font-size: 0.9em;
    color: #c0c0c0;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.stat-value {
    font-size: 2.2em;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

/* Scrollbar styling */
.terminal-body::-webkit-scrollbar {
    width: 10px;
}

.terminal-body::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.terminal-body::-webkit-scrollbar-thumb {
    background: #00ff00;
    border-radius: 5px;
}

.terminal-body::-webkit-scrollbar-thumb:hover {
    background: #00cc00;
}

/* Animation for new terminal lines */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.terminal-line {
    animation: fadeIn 0.3s ease-out;
}
