/* Thème Minecraft - Textures et effets */

/* Import de la police Minecraft */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

/* Police de secours - Minecraftia (optionnelle, si vous téléchargez la police) */
/* Pour télécharger: https://www.dafont.com/minecraftia.font */
/* Décommentez et placez le fichier dans public/fonts/ si vous voulez l'utiliser */
/*
@font-face {
    font-family: 'Minecraftia';
    src: url('../fonts/Minecraftia-Regular.ttf') format('truetype');
}
*/

/* Background avec texture */
body {
    background-image: 
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><rect width="100" height="100" fill="%231a1a1a"/><rect x="0" y="0" width="50" height="50" fill="%231f1f1f"/><rect x="50" y="50" width="50" height="50" fill="%231f1f1f"/></svg>');
    background-size: 100px 100px;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.03) 2px, rgba(0,0,0,0.03) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(0,0,0,0.03) 2px, rgba(0,0,0,0.03) 4px);
    pointer-events: none;
    z-index: -1;
}

/* Effet de pixelisation pour les images */
.minecraft-pixelated {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

/* Utiliser Press Start 2P comme police principale */
body, .minecraft-button, .minecraft-form input {
    font-family: 'Press Start 2P', monospace;
}

/* Animation de hover pour les boutons */
@keyframes button-press {
    0% { transform: translateY(0); }
    50% { transform: translateY(2px); }
    100% { transform: translateY(0); }
}

.minecraft-button:active {
    animation: button-press 0.1s;
}

/* Effet de brillance sur les panels */
.minecraft-panel {
    position: relative;
    overflow: hidden;
}

.minecraft-panel::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.05) 50%,
        transparent 70%
    );
    animation: shine 3s infinite;
    pointer-events: none;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* Barre de vie style Minecraft */
.health-bar {
    width: 100%;
    height: 20px;
    background: #2d2d2d;
    border: 2px solid #8b8b8b;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.health-bar-fill {
    height: 100%;
    background: linear-gradient(to bottom, #4caf50 0%, #2e7d32 100%);
    transition: width 0.3s;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Inventaire style Minecraft */
.inventory-grid {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 2px;
    background: #2d2d2d;
    border: 3px solid #8b8b8b;
    padding: 5px;
    border-radius: 4px;
}

.inventory-slot {
    aspect-ratio: 1;
    background: #555;
    border: 2px solid #8b8b8b;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.inventory-slot:hover {
    background: #666;
    border-color: #6b9e2f;
}

.inventory-slot img {
    width: 80%;
    height: 80%;
    image-rendering: pixelated;
}

/* Effet de particules (optionnel) */
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #fff;
    border-radius: 50%;
    pointer-events: none;
    animation: particle-float 2s ease-out forwards;
}

@keyframes particle-float {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-50px) scale(0);
    }
}

/* Animation de fade in */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.page.active {
    animation: fadeIn 0.3s ease-out;
}

.minecraft-panel {
    animation: fadeIn 0.5s ease-out;
}

/* Scrollbar style Minecraft */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #2d2d2d;
    border: 2px solid #8b8b8b;
}

::-webkit-scrollbar-thumb {
    background: #555;
    border: 2px solid #8b8b8b;
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background: #666;
}

/* Effet de glow pour les éléments importants */
.glow {
    box-shadow: 0 0 10px rgba(107, 158, 47, 0.5);
}

.glow:hover {
    box-shadow: 0 0 20px rgba(107, 158, 47, 0.8);
}

/* Badge de statut */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border: 2px solid;
    border-radius: 4px;
    font-size: 0.7rem;
    text-transform: uppercase;
}

.status-badge.online {
    border-color: #4caf50;
    color: #4caf50;
    background: rgba(76, 175, 80, 0.1);
}

.status-badge.offline {
    border-color: #f44336;
    color: #f44336;
    background: rgba(244, 67, 54, 0.1);
}

/* Animation de pulsation pour le statut online */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-online {
    animation: pulse 2s infinite;
}

