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

body {
    font-family: 'VT323', monospace;
    background: #0d0d0d;
    color: #e0e0e0;
    min-height: 100vh;
    overflow-x: hidden;
}

.app-container {
    position: relative;
    min-height: 100vh;
    background: 
        radial-gradient(ellipse at center, #1a0a0a 0%, #0d0d0d 70%),
        linear-gradient(180deg, #0d0d0d 0%, #1a0505 100%);
}

/* Scanlines */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15) 0px,
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    z-index: 1000;
}

/* Fire Particles */
.fire-particle {
    position: fixed;
    width: 4px;
    height: 4px;
    background: #ff4500;
    border-radius: 50%;
    bottom: 0;
    animation: rise linear infinite;
    opacity: 0.7;
    z-index: 1;
    box-shadow: 0 0 6px #ff4500, 0 0 12px #ff0000;
}

@keyframes rise {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0.8;
    }
    100% {
        transform: translateY(-100vh) scale(0);
        opacity: 0;
    }
}

/* Header */
.header {
    text-align: center;
    padding: 40px 20px;
    position: relative;
    background: linear-gradient(180deg, #1a0505 0%, transparent 100%);
    border-bottom: 4px solid #8b0000;
}

.anniversary-badge {
    display: inline-block;
    background: #ff0000;
    color: #000;
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    padding: 8px 16px;
    margin-bottom: 20px;
    animation: pulse 1s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.main-title {
    font-family: 'Press Start 2P', cursive;
    font-size: clamp(24px, 8vw, 64px);
    color: #ff0000;
    text-shadow: 
        4px 4px 0 #8b0000,
        8px 8px 0 #4a0000,
        0 0 40px rgba(255, 0, 0, 0.5);
    letter-spacing: 4px;
    margin-bottom: 10px;
}

.subtitle {
    font-family: 'VT323', monospace;
    font-size: clamp(16px, 4vw, 24px);
    color: #ff4500;
    text-shadow: 0 0 10px rgba(255, 69, 0, 0.5);
}

.header-decoration {
    width: 200px;
    height: 4px;
    background: linear-gradient(90deg, transparent, #ff0000, transparent);
    margin: 20px auto 0;
}

/* Controls */
.controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.5);
    border-top: 2px solid #333;
    border-bottom: 2px solid #333;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    color: #ff4500;
}

.doom-select {
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    background: #1a1a1a;
    color: #e0e0e0;
    border: 2px solid #8b0000;
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.doom-select:hover {
    background: #2a1a1a;
    border-color: #ff0000;
}

.random-button {
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    background: linear-gradient(180deg, #8b0000 0%, #4a0000 100%);
    color: #fff;
    border: 2px solid #ff0000;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s;
    text-shadow: 2px 2px 0 #000;
}

.random-button:hover {
    background: linear-gradient(180deg, #ff0000 0%, #8b0000 100%);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
}

/* Monster Grid */
.monster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Monster Card */
.monster-card {
    background: linear-gradient(145deg, #2a2218 0%, #1a1510 100%);
    border: 4px solid #4a3a2a;
    border-radius: 4px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.monster-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent 0px,
            transparent 10px,
            rgba(0,0,0,0.1) 10px,
            rgba(0,0,0,0.1) 11px
        );
    pointer-events: none;
}

.monster-card:hover {
    transform: scale(1.03);
    border-color: #ff0000;
    box-shadow: 
        0 0 30px rgba(255, 0, 0, 0.3),
        inset 0 0 20px rgba(255, 0, 0, 0.1);
}

.card-inner {
    position: relative;
    z-index: 1;
}

.sprite-container {
    background: radial-gradient(circle, rgba(139, 0, 0, 0.2) 0%, transparent 70%);
    position: relative;
}

.sprite-image {
    max-width: 100%;
    max-height: 128px;
    transition: all 0.3s;
}

.sprite-image.loading {
    opacity: 0;
}

.sprite-image.loaded {
    opacity: 1;
}

.monster-card:hover .sprite-image {
    transform: scale(1.1);
    filter: drop-shadow(0 0 10px rgba(255, 0, 0, 0.5));
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #333;
    border-top-color: #ff0000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-spinner.large {
    width: 60px;
    height: 60px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.monster-name {
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    color: #ff4500;
    text-shadow: 2px 2px 0 #000;
}

.monster-description {
    color: #888;
    line-height: 1.4;
}

.skull-active {
    filter: drop-shadow(0 0 5px #ff0000);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: linear-gradient(180deg, #1a0a0a 0%, #0d0505 100%);
    border: 4px solid #8b0000;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.3s ease;
}

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

.modal-header {
    background: linear-gradient(90deg, #8b0000, #4a0000);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #ff0000;
}

.modal-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 16px;
    color: #fff;
    text-shadow: 2px 2px 0 #000;
}

.close-button {
    font-family: 'Press Start 2P', cursive;
    font-size: 8px;
    background: #ff0000;
    color: #fff;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.close-button:hover {
    background: #ff4500;
    transform: scale(1.05);
}

.modal-body {
    padding: 20px;
}

.sprite-display {
    text-align: center;
    padding: 30px;
    background: radial-gradient(circle, rgba(139, 0, 0, 0.3) 0%, transparent 70%);
    margin-bottom: 20px;
}

.large-sprite {
    max-width: 256px;
    image-rendering: pixelated;
    transition: all 0.3s;
}

.large-sprite.loading {
    opacity: 0;
}

.large-sprite.loaded {
    opacity: 1;
    filter: drop-shadow(0 0 20px rgba(255, 0, 0, 0.5));
}

.stats-panel {
    background: #0a0505;
    border: 2px solid #4a3a2a;
    padding: 15px;
    margin-bottom: 20px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #2a2218;
}

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

.stat-label {
    font-family: 'Press Start 2P', cursive;
    font-size: 8px;
    color: #888;
}

.stat-value {
    font-family: 'VT323', monospace;
    font-size: 20px;
    color: #e0e0e0;
}

.stat-value.health {
    color: #00ff00;
}

.stat-value.ammo {
    color: #ffff00;
}

.stat-value.armor {
    color: #0080ff;
}

.lore-section {
    background: #050505;
    border: 2px solid #333;
    padding: 15px;
    margin-bottom: 20px;
}

.lore-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    color: #00ff00;
    margin-bottom: 10px;
}

.lore-text {
    font-family: 'VT323', monospace;
    font-size: 18px;
    line-height: 1.5;
    color: #aaa;
}

.share-button {
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    background: #333;
    color: #fff;
    border: 2px solid #666;
    padding: 12px 20px;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s;
}

.share-button:hover {
    background: #444;
    border-color: #888;
}

/* DOOM HUD Footer */
.doom-hud {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, #4a3a2a 0%, #2a2218 50%, #1a1510 100%);
    border-top: 4px solid #6a5a4a;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 20px;
    z-index: 1500;
}

.hud-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hud-value {
    font-family: 'Press Start 2P', cursive;
    font-size: clamp(12px, 4vw, 24px);
    color: #e0e0e0;
    text-shadow: 2px 2px 0 #000;
}

.hud-label {
    font-family: 'Press Start 2P', cursive;
    font-size: clamp(6px, 2vw, 10px);
    color: #888;
    margin-top: 5px;
}

.doomguy-face {
    font-size: clamp(30px, 8vw, 50px);
    background: #1a1510;
    border: 3px solid #4a3a2a;
    padding: 5px 15px;
    border-radius: 4px;
}

/* Berrry Link */
.berrry-link {
    text-align: center;
    padding: 20px;
    padding-bottom: 100px;
}

.berrry-link a {
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
}

.berrry-link a:hover {
    color: #ff4500;
}

/* Easter Egg */
.easter-egg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(139, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    animation: flashRed 0.5s ease;
}

@keyframes flashRed {
    0%, 100% { background: rgba(139, 0, 0, 0.95); }
    50% { background: rgba(255, 0, 0, 0.95); }
}

.easter-egg-content {
    text-align: center;
}

.easter-egg-content h2 {
    font-family: 'Press Start 2P', cursive;
    font-size: 32px;
    color: #fff;
    text-shadow: 4px 4px 0 #000;
    margin-bottom: 20px;
}

.easter-egg-content p {
    font-family: 'VT323', monospace;
    font-size: 20px;
    color: #ff4500;
    font-style: italic;
}

.icon-sin-image {
    font-size: 100px;
    margin-top: 30px;
    animation: pulse 0.5s ease-in-out infinite;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .monster-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        padding: 15px;
        gap: 15px;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    .doom-hud {
        padding: 8px 10px;
    }
    
    .hud-stat {
        display: none;
    }
    
    .hud-stat:first-child,
    .hud-stat:last-child {
        display: flex;
    }
    
    .doomguy-face {
        display: block;
    }
    
    .modal-content {
        max-height: 85vh;
    }
}

@media (max-width: 480px) {
    .monster-grid {
        grid-template-columns: 1fr;
    }
    
    .main-title {
        font-size: 20px;
    }
    
    .header {
        padding: 20px 10px;
    }
}

/* Vignette */
.app-container::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    background: radial-gradient(ellipse at center, transparent 50%, rgba(139, 0, 0, 0.3) 100%);
    z-index: 999;
}