/* 
 * Grimório Digital - Global Styles
 * Estilos base e utilitários responsivos avançados
 */

:root {
    --bg-primary: #050507;
    --bg-panel: rgba(15, 15, 18, 0.7);
    --bg-panel-solid: #0f0f12;
    --border-color: rgba(42, 42, 46, 0.6);
    --border-color-solid: #2a2a2e;
    --text-primary: #e8e4dc;
    --text-secondary: #a0a0a0;
    
    /* Neon Cores / Acentos */
    --accent-blue: #4a9eff;
    --accent-red: #dc2626;
    --accent-green: #22c55e;
    --accent-purple: #8b5cf6;
    --accent-yellow: #f59e0b;
    --accent-orange: #ff6b35;
    --destiny-gold: #d4a76a;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Scrollbar Customizada Premium */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #050507;
}
::-webkit-scrollbar-thumb {
    background: #1f1f25;
    border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
    background: #4a9eff;
    box-shadow: 0 0 10px rgba(74, 158, 255, 0.5);
}

/* Base Util Classes */
.font-cinzel { 
    font-family: 'Cinzel', serif; 
}

/* UI Elements - Premium Glassmorphism */
.section-panel, .glass-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 1.5rem; padding: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.feature-card, .card-hover, .category-card, .attribute-card, .derived-card, .sentiment-card, .item-card, .skill-card {
    background: linear-gradient(135deg, rgba(20, 20, 25, 0.6) 0%, rgba(10, 10, 15, 0.8) 100%);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
    border-radius: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.feature-card:hover, .card-hover:hover {
    transform: translateY(-4px);
    border-color: rgba(74, 158, 255, 0.4);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 15px rgba(74, 158, 255, 0.15);
}

/* Form Inputs Comuns */
.form-input, .custom-input, .form-select, .attribute-input, input[type="text"], input[type="number"], textarea, select {
    width: 100%;
    background: #e8e4dc !important; /* Force light background */
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: #050507 !important; /* Force black text */
    font-weight: 500;
    transition: all 0.3s;
    padding: 0.75rem 1rem;
}

.form-input:focus, .custom-input:focus, .form-select:focus, input[type="text"]:focus, input[type="number"]:focus, textarea:focus, select:focus {
    border-color: var(--accent-blue);
    outline: none;
    box-shadow: 0 0 0 1px var(--accent-blue), 0 0 15px rgba(74, 158, 255, 0.4);
    background: #ffffff !important;
    color: #000000 !important;
}

/* Utilidades Responsivas */
.container-adaptive {
    width: 100%;
    margin: 0 auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

@media (min-width: 2560px) {
    .container-adaptive {
        max-width: 2400px;
        padding-left: 3rem;
        padding-right: 3rem;
    }
    
    html {
        font-size: 18px; /* Scala global para resoluções gigantes */
    }
    
    .section-panel {
        padding: 3rem;
    }
}

@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Modals Modernos */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--bg-panel-solid);
    background-image: linear-gradient(180deg, rgba(30,30,40,0.5) 0%, rgba(15,15,20,1) 100%);
    border-radius: 1.5rem; padding: 1.5rem;
    padding: 2rem;
    width: 100%;
    max-width: 550px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid rgba(74, 158, 255, 0.2);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal.active .modal-content {
    transform: scale(1);
}

/* Avatar / Imagens Dinâmicas */
.avatar-placeholder {
    background: linear-gradient(135deg, #1f1f25 0%, #0a0a0f 100%);
    border: 2px dashed rgba(74, 158, 255, 0.4);
    transition: all 0.3s;
}

.avatar-placeholder:hover {
    border-color: rgba(74, 158, 255, 0.8);
    box-shadow: inset 0 0 20px rgba(74, 158, 255, 0.1);
}

/* Navegação Global (Navbar e Dropdowns) */
.nav-container {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dropdown-container {
    position: relative;
}

.dropdown-content {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    background: rgba(15, 15, 18, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
}

.dropdown-content.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.chevron { 
    transition: transform 0.3s ease; 
}
.chevron.rotate { 
    transform: rotate(180deg); 
}

/* ANIMAÇÕES GLOBAIS HTML */
.anim-entry { animation: fadeInUp 0.6s ease-out forwards; opacity: 0; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.slide-in { animation: slideInX 0.3s ease-out forwards; opacity: 0; }
@keyframes slideInX { from { opacity: 0; transform: translateY(-20px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* INVENTÁRIO PROGRESSO */
.progress-bar { transition: width 0.5s ease; border-radius: 9999px; }
.progress-bar-danger { background: linear-gradient(90deg, #dc2626 0%, #ef4444 100%); }
.progress-bar-warning { background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%); }
.progress-bar-safe { background: linear-gradient(90deg, #22c55e 0%, #4ade80 100%); }

/* ITEM CARDS */
.item-card { border-left: 3px solid; transition: all 0.3s ease; }
.item-card:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3); }

/* MASCOTE ESPECÍFICOS */
.profile-image-container { width: 120px; height: 120px; border: 3px solid #ec4899; border-radius: 12px; overflow: hidden; position: relative; background: #0f0f12; }
.profile-image { width: 100%; height: 100%; object-fit: cover; }
.image-upload-btn { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0, 0, 0, 0.8); color: white; padding: 4px; font-size: 12px; cursor: pointer; transition: all 0.3s; text-align: center; }
.image-upload-btn:hover { background: rgba(236, 72, 153, 0.8); }
.import-export-btns { display: flex; gap: 8px; margin-top: 10px; }
.feedback-mascote { position: fixed; top: 20px; right: 20px; z-index: 1000; animation: slideInRight 0.3s ease-out; }
