/* RPG Game Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'MedievalSharp', cursive;
    background: #0a0a1a;
    color: #e0e0ff;
    overflow-x: hidden;
    background: linear-gradient(135deg, #0a0a1a 0%, #1a1a3a 100%);
}

/* Game Background with Parallax */
.game-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.parallax-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
}

.layer-1 {
    background: linear-gradient(45deg, #0a0a1a, #1a1a3a);
    animation: float 20s infinite linear;
}

.layer-2 {
    background: radial-gradient(circle at 20% 50%, rgba(74, 144, 226, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(226, 74, 74, 0.1) 0%, transparent 50%);
    animation: float 15s infinite linear reverse;
}

.layer-3 {
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="1" fill="%234a90e2" opacity="0.3"/></svg>') repeat;
    animation: twinkle 10s infinite linear;
}

@keyframes float {
    0% { transform: translateX(0) translateY(0); }
    100% { transform: translateX(-100px) translateY(-50px); }
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

/* Game Container */
.game-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* Game Header */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(16, 16, 40, 0.8);
    border: 2px solid #4a90e2;
    border-radius: 15px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.game-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.5rem;
    color: #4a90e2;
    text-shadow: 0 0 10px #4a90e2;
}

.game-version {
    background: #e24a4a;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    margin-left: 10px;
}

.game-stats {
    display: flex;
    gap: 20px;
}

.stat {
    background: rgba(74, 144, 226, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid #4a90e2;
    font-weight: bold;
}

/* Main Game Layout */
.game-main {
    display: grid;
    grid-template-columns: 300px 1fr 300px;
    gap: 20px;
    min-height: 80vh;
}

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

/* Character Panel */
.character-panel {
    background: rgba(16, 16, 40, 0.8);
    border: 2px solid #4a90e2;
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.character-card {
    text-align: center;
    margin-bottom: 20px;
}

.character-avatar {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 15px;
}

.character-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid #4a90e2;
    background: #1a1a3a;
}

.level-badge {
    position: absolute;
    bottom: -5px;
    right: -5px;
    background: #e24a4a;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 2px solid white;
}

.health-bar, .xp-bar {
    position: relative;
    height: 20px;
    background: #1a1a3a;
    border-radius: 10px;
    margin: 10px 0;
    overflow: hidden;
    border: 1px solid #333;
}

.health-fill {
    height: 100%;
    background: linear-gradient(90deg, #e24a4a, #ff6b6b);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.xp-fill {
    height: 100%;
    background: linear-gradient(90deg, #4a90e2, #6bc5ff);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.health-text, .xp-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px black;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.stat-item {
    background: rgba(74, 144, 226, 0.1);
    padding: 10px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #4a90e2;
}

.stat-icon {
    font-size: 1.5rem;
    display: block;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: bold;
    display: block;
    color: #4a90e2;
}

.stat-label {
    font-size: 0.8rem;
    color: #a0a0ff;
}

/* Game Content */
.game-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.location-card {
    background: rgba(16, 16, 40, 0.8);
    border: 2px solid #4a90e2;
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.location-image {
    height: 200px;
    background: linear-gradient(45deg, #1a1a3a, #2a2a5a);
    border-radius: 10px;
    margin-top: 15px;
    border: 1px solid #4a90e2;
}

.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.action-btn {
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-family: 'MedievalSharp', cursive;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.combat-btn {
    background: linear-gradient(45deg, #e24a4a, #ff6b6b);
    color: white;
}

.quest-btn {
    background: linear-gradient(45deg, #4ae24a, #6bff6b);
    color: white;
}

.trade-btn {
    background: linear-gradient(45deg, #e2e24a, #ffff6b);
    color: #333;
}

.mine-btn {
    background: linear-gradient(45deg, #4a4ae2, #6b6bff);
    color: white;
}

.game-log {
    background: rgba(16, 16, 40, 0.8);
    border: 2px solid #4a90e2;
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(10px);
    flex-grow: 1;
}

.log-content {
    height: 200px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
}

.log-entry {
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

/* Inventory Panel */
.inventory-panel {
    background: rgba(16, 16, 40, 0.8);
    border: 2px solid #4a90e2;
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.inventory-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 15px 0;
}

.inventory-slot {
    background: rgba(74, 144, 226, 0.1);
    border: 2px solid #4a90e2;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.inventory-slot.empty {
    opacity: 0.5;
    border-style: dashed;
}

.inventory-slot i {
    font-size: 1.5rem;
    color: #4a90e2;
}

.nft-collection {
    margin-top: 20px;
}

.nft-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.nft-slot {
    background: rgba(226, 74, 226, 0.1);
    border: 2px solid #e24ae2;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
}

/* 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);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #1a1a3a, #2a2a5a);
    margin: 5% auto;
    padding: 30px;
    border: 3px solid #4a90e2;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

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

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 2rem;
    cursor: pointer;
    color: #e24a4a;
}

/* Combat Interface */
.combat-interface {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0;
}

.combatant {
    text-align: center;
    flex: 1;
}

.combatant img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid #4a90e2;
    margin-bottom: 10px;
}

.vs-text {
    font-size: 2rem;
    font-weight: bold;
    color: #e24a4a;
    margin: 0 20px;
}

.combat-health {
    height: 20px;
    background: #1a1a3a;
    border-radius: 10px;
    margin: 10px 0;
    overflow: hidden;
    border: 1px solid #333;
}

.combat-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 20px 0;
}

.combat-action {
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-family: 'MedievalSharp', cursive;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.attack-btn { background: #e24a4a; color: white; }
.defend-btn { background: #4a90e2; color: white; }
.special-btn { background: #e24ae2; color: white; }
.flee-btn { background: #4ae24a; color: white; }

.combat-log {
    height: 100px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border-radius: 5px;
    margin-top: 20px;
}

/* Quest Styles */
.quest-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.quest-item {
    background: rgba(74, 144, 226, 0.1);
    border: 2px solid #4a90e2;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quest-item:hover {
    background: rgba(74, 144, 226, 0.2);
    transform: translateX(5px);
}

.quest-reward {
    color: #4ae24a;
    font-weight: bold;
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .game-stats {
        justify-content: center;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .combat-interface {
        flex-direction: column;
        gap: 20px;
    }
    
    .vs-text {
        margin: 10px 0;
    }
}

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

.pulse {
    animation: pulse 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.3s ease;
}