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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #8b1a1a 0%, #4a0e0e 100%);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

#game-container {
    max-width: 1000px;
    width: 100%;
}

#game-title {
    text-align: center;
    margin-bottom: 20px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

#game-title h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

#game-title p {
    font-size: 1.2em;
    opacity: 0.9;
}

#game-wrapper {
    position: relative;
    display: inline-block;
}

#game {
    border: 4px solid #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    background: #000;
}

#game canvas {
    display: block;
    width: 800px !important;
    height: 600px !important;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

#character-display {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    border: 3px solid #8b1a1a;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.7);
}

#character-portrait {
    width: 64px;
    height: 64px;
    background: #000;
    border: 2px solid #fff;
    border-radius: 5px;
    margin-bottom: 8px;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

#character-name {
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

#controls {
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    font-size: 0.9em;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal.hidden {
    display: none;
}

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

.modal-content {
    background: linear-gradient(135deg, #2c1810 0%, #1a0e08 100%);
    padding: 30px;
    border: 3px solid #8b1a1a;
    border-radius: 15px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.7);
    animation: slideIn 0.3s;
}

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

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2em;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover {
    color: #ff6b6b;
}

#modal-title {
    font-size: 2em;
    margin-bottom: 15px;
    color: #fff;
    padding-right: 30px;
}

#modal-badges {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.badge {
    background: #8b1a1a;
    color: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
    display: inline-block;
    margin: 5px;
}

.badge-link {
    transition: transform 0.2s, box-shadow 0.2s;
}

.badge-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    color: #fff;
}

#modal-description {
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #ddd;
}

#modal-video {
    margin-bottom: 20px;
}

#modal-video iframe {
    width: 100%;
    height: 315px;
    border: none;
    border-radius: 10px;
}

.learn-more-btn {
    display: inline-block;
    background: #8b1a1a;
    color: #fff;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background 0.3s;
}

.learn-more-btn:hover {
    background: #a52222;
}

/* Responsive Design */
@media (max-width: 768px) {
    #game-title h1 {
        font-size: 1.8em;
    }
    
    #game-title p {
        font-size: 1em;
    }
    
    .modal-content {
        padding: 20px;
        width: 95%;
    }
    
    #modal-title {
        font-size: 1.5em;
    }
}
