/* V Rising Dark Theme - Black & Red */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Creepster&family=Orbitron:wght@400;700&display=swap');

/* CSS Variables */
:root {
    --vrising-black: #000000;
    --vrising-dark: #0a0a0a;
    --vrising-darker: #1a1a1a;
    --vrising-red: #dc143c;
    --vrising-red-dark: #8b0000;
    --vrising-red-light: #ff4757;
    --vrising-gold: red;
    --vrising-silver: #c0c0c0;
    --vrising-gray: #2a2a2a;
    --vrising-gray-light: #3a3a3a;
    
    --font-gothic: 'Creepster', cursive;
    --font-medieval: 'Cinzel', serif;
    --font-tech: 'Orbitron', monospace;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-medieval);
    background: var(--vrising-black);
    color: var(--vrising-silver);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background Effects */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.floating-particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--vrising-red);
    border-radius: 50%;
    opacity: 0.3;
    animation: float 20s infinite linear;
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

.blood-mist {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        ellipse at 30% 70%, 
        rgba(220, 20, 60, 0.1) 0%, 
        transparent 50%
    ),
    radial-gradient(
        ellipse at 70% 30%, 
        rgba(139, 0, 0, 0.1) 0%, 
        transparent 50%
    );
    animation: mistMove 30s ease-in-out infinite;
}

@keyframes mistMove {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

.shadow-vignette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        circle at center,
        transparent 0%,
        rgba(0, 0, 0, 0.3) 70%,
        rgba(0, 0, 0, 0.8) 100%
    );
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        var(--vrising-black) 0%,
        var(--vrising-darker) 50%,
        var(--vrising-black) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-content {
    text-align: center;
    color: var(--vrising-red);
}

.loading-skull {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: pulse 2s ease-in-out infinite;
}

.loading-text {
    font-family: var(--font-medieval);
    font-size: 1.5rem;
    font-weight: 600;
    text-shadow: 0 0 20px var(--vrising-red);
}

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

/* Main Container */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 3rem 2rem;
    background: linear-gradient(
        135deg,
        rgba(26, 26, 26, 0.9) 0%,
        rgba(42, 42, 42, 0.8) 50%,
        rgba(26, 26, 26, 0.9) 100%
    );
    border: 2px solid var(--vrising-red);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 0 30px rgba(220, 20, 60, 0.3),
        inset 0 0 30px rgba(0, 0, 0, 0.5);
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        transparent,
        rgba(220, 20, 60, 0.1),
        transparent,
        rgba(220, 20, 60, 0.1),
        transparent
    );
    animation: rotate 20s linear infinite;
}

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

.header-ornaments {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.ornament-left,
.ornament-right {
    font-size: 3rem;
    color: var(--vrising-red);
    animation: float-ornament 4s ease-in-out infinite;
}

.ornament-right {
    animation-delay: 2s;
}

@keyframes float-ornament {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(5deg);
    }
}

.title-section {
    flex: 1;
    max-width: 800px;
}

.main-title {
    font-family: var(--font-gothic);
    font-size: 4rem;
    color: var(--vrising-red);
    text-shadow: 
        0 0 20px var(--vrising-red),
        0 0 40px var(--vrising-red),
        0 0 60px var(--vrising-red);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.title-skull {
    font-size: 5rem;
    animation: skull-glow 3s ease-in-out infinite;
}

@keyframes skull-glow {
    0%, 100% {
        text-shadow: 0 0 20px var(--vrising-red);
        transform: scale(1);
    }
    50% {
        text-shadow: 0 0 40px var(--vrising-red), 0 0 60px var(--vrising-red);
        transform: scale(1.1);
    }
}

.subtitle {
    font-family: var(--font-medieval);
    font-size: 1.8rem;
    color: var(--vrising-silver);
    margin-bottom: 1rem;
    text-shadow: 0 0 10px rgba(192, 192, 192, 0.5);
}

.description {
    font-family: var(--font-medieval);
    font-size: 1rem;
    color: rgba(192, 192, 192, 0.8);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* Main Content */
.main-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: start;
}

/* Panel Base Styles */
.calculator-panel,
.results-panel {
    background: linear-gradient(
        135deg,
        rgba(26, 26, 26, 0.95) 0%,
        rgba(42, 42, 42, 0.9) 50%,
        rgba(26, 26, 26, 0.95) 100%
    );
    border: 2px solid var(--vrising-red);
    border-radius: 15px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 0 20px rgba(220, 20, 60, 0.2),
        inset 0 0 20px rgba(0, 0, 0, 0.3);
}

.calculator-panel::before,
.results-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(220, 20, 60, 0.05) 50%,
        transparent 70%
    );
    pointer-events: none;
}

/* Calculator Panel */
.panel-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--vrising-red-dark);
}

.panel-header i {
    font-size: 1.5rem;
    color: var(--vrising-red);
    animation: icon-glow 2s ease-in-out infinite;
}

@keyframes icon-glow {
    0%, 100% {
        text-shadow: 0 0 10px var(--vrising-red);
    }
    50% {
        text-shadow: 0 0 20px var(--vrising-red), 0 0 30px var(--vrising-red);
    }
}

.panel-header h3 {
    font-family: var(--font-medieval);
    font-size: 1.5rem;
    color: var(--vrising-silver);
    text-shadow: 0 0 10px rgba(192, 192, 192, 0.3);
}

/* Form Styles */
.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-medieval);
    font-size: 1.1rem;
    color: var(--vrising-silver);
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.form-group label i {
    color: var(--vrising-red);
    font-size: 1rem;
}

/* Select Wrapper - Melhorado */
.select-wrapper {
    position: relative;
    margin-bottom: 1rem;
}

.medieval-select {
    width: 100%;
    padding: 1.2rem 4rem 1.2rem 3.5rem;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.95) 0%,
        rgba(26, 26, 26, 0.98) 30%,
        rgba(42, 42, 42, 0.95) 70%,
        rgba(0, 0, 0, 0.95) 100%
    );
    border: 3px solid var(--vrising-red-dark);
    border-radius: 18px;
    color: var(--vrising-silver);
    font-family: var(--font-medieval);
    font-size: 1.15rem;
    font-weight: 600;
    appearance: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        inset 0 0 20px rgba(0, 0, 0, 0.8),
        0 0 15px rgba(220, 20, 60, 0.2),
        0 4px 15px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.medieval-select::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(220, 20, 60, 0.3),
        rgba(255, 71, 87, 0.2),
        rgba(220, 20, 60, 0.3),
        transparent
    );
    transition: left 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 1;
}

.medieval-select::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(
        45deg,
        var(--vrising-red-dark),
        var(--vrising-red),
        var(--vrising-red-light),
        var(--vrising-red),
        var(--vrising-red-dark)
    );
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: -1;
}

.medieval-select:hover::before {
    left: 100%;
}

.medieval-select:hover::after {
    opacity: 0.6;
    animation: border-glow 2s ease-in-out infinite;
}

.medieval-select:focus::after {
    opacity: 0.8;
    animation: border-glow 1.5s ease-in-out infinite;
}

@keyframes border-glow {
    0%, 100% {
        opacity: 0.4;
        filter: blur(2px);
    }
    50% {
        opacity: 0.8;
        filter: blur(4px);
    }
}

.medieval-select:focus {
    outline: none;
    border-color: var(--vrising-red);
    box-shadow: 
        0 0 30px rgba(220, 20, 60, 0.5),
        inset 0 0 20px rgba(0, 0, 0, 0.8),
        0 0 50px rgba(220, 20, 60, 0.3),
        0 8px 25px rgba(0, 0, 0, 0.6);
    transform: translateY(-3px) scale(1.02);
}

.medieval-select:hover {
    border-color: var(--vrising-red);
    box-shadow: 
        0 0 25px rgba(220, 20, 60, 0.4),
        inset 0 0 20px rgba(0, 0, 0, 0.8),
        0 4px 20px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px) scale(1.01);
}

/* Estilos para opções do select com ícones PNG */
.medieval-select option {
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.98) 0%,
        rgba(26, 26, 26, 0.98) 50%,
        rgba(0, 0, 0, 0.98) 100%
    );
    color: var(--vrising-silver);
    padding: 12px 16px;
    font-family: var(--font-medieval);
    font-size: 1.1rem;
    font-weight: 500;
    border: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    line-height: 1.4;
}

.medieval-select option:hover {
    background: linear-gradient(
        135deg,
        rgba(220, 20, 60, 0.2) 0%,
        rgba(139, 0, 0, 0.3) 50%,
        rgba(220, 20, 60, 0.2) 100%
    );
    color: var(--vrising-red-light);
}

.medieval-select option:checked {
    background: linear-gradient(
        135deg,
        rgba(220, 20, 60, 0.4) 0%,
        rgba(139, 0, 0, 0.5) 50%,
        rgba(220, 20, 60, 0.4) 100%
    );
    color: var(--vrising-silver);
    font-weight: 600;
}

/* Ícones PNG nas opções */
.medieval-select option .item-icon {
    vertical-align: middle;
    margin-right: 8px;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.8));
}

.select-icon {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--vrising-red);
    font-size: 1.4rem;
    pointer-events: none;
    animation: icon-pulse 3s ease-in-out infinite;
    filter: drop-shadow(0 0 8px var(--vrising-red));
    z-index: 2;
}

@keyframes icon-pulse {
    0%, 100% {
        text-shadow: 
            0 0 15px var(--vrising-red),
            0 0 25px var(--vrising-red);
        transform: translateY(-50%) scale(1);
    }
    50% {
        text-shadow: 
            0 0 25px var(--vrising-red), 
            0 0 40px var(--vrising-red),
            0 0 60px var(--vrising-red-light);
        transform: translateY(-50%) scale(1.1);
    }
}

.select-arrow {
    position: absolute;
    right: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--vrising-red);
    font-size: 1.2rem;
    pointer-events: none;
    transition: all 0.4s ease;
}

.select-wrapper:hover .select-arrow {
    transform: translateY(-50%) rotate(180deg) scale(1.2);
    color: var(--vrising-red-light);
    text-shadow: 0 0 15px var(--vrising-red);
}

.select-wrapper:focus-within .select-arrow {
    transform: translateY(-50%) rotate(180deg) scale(1.3);
    animation: arrow-glow 1s ease-in-out infinite;
}

@keyframes arrow-glow {
    0%, 100% {
        text-shadow: 0 0 15px var(--vrising-red);
    }
    50% {
        text-shadow: 0 0 25px var(--vrising-red), 0 0 35px var(--vrising-red);
    }
}

/* Input Styles */
.medieval-input {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.8) 0%,
        rgba(26, 26, 26, 0.9) 100%
    );
    border: 2px solid var(--vrising-red-dark);
    border-radius: 10px;
    color: var(--vrising-silver);
    font-family: var(--font-medieval);
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.medieval-input:focus {
    outline: none;
    border-color: var(--vrising-red);
    box-shadow: 
        0 0 15px rgba(220, 20, 60, 0.3),
        inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.medieval-input::placeholder {
    color: rgba(192, 192, 192, 0.5);
}

/* Gothic Button */
.gothic-button {
    position: relative;
    width: 100%;
    padding: 1.2rem 2rem;
    background: linear-gradient(
        135deg,
        var(--vrising-red-dark) 0%,
        var(--vrising-red) 50%,
        var(--vrising-red-dark) 100%
    );
    border: 2px solid var(--vrising-red);
    border-radius: 12px;
    color: var(--vrising-silver);
    font-family: var(--font-medieval);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 
        0 0 20px rgba(220, 20, 60, 0.3),
        inset 0 0 20px rgba(0, 0, 0, 0.3);
}

.gothic-button:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 5px 25px rgba(220, 20, 60, 0.4),
        inset 0 0 20px rgba(0, 0, 0, 0.3);
}

.gothic-button:active {
    transform: translateY(0);
}

.gothic-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    position: relative;
    z-index: 1;
}

.btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.6s ease;
}

.gothic-button:hover .btn-glow {
    left: 100%;
}

/* Material Info */
.material-info {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--vrising-red-dark);
    border-radius: 10px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.material-info h4 {
    font-family: var(--font-medieval);
    color: var(--vrising-silver);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.material-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.material-name {
    font-family: var(--font-medieval);
    color: var(--vrising-red);
    font-size: 1.2rem;
    font-weight: 600;
}

.material-fragments {
    font-family: var(--font-tech);
    color: red;
    font-size: 0.9rem;
}

/* Results Panel */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: rgba(192, 192, 192, 0.6);
}

.empty-icon {
    font-size: 4rem;
    color: var(--vrising-red);
    margin-bottom: 2rem;
    opacity: 0.5;
    animation: float-icon 3s ease-in-out infinite;
}

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

.empty-state h3 {
    font-family: var(--font-medieval);
    font-size: 2rem;
    margin-bottom: 1rem;
    color: rgba(192, 192, 192, 0.7);
}

.empty-state p {
    font-family: var(--font-medieval);
    font-size: 1rem;
    line-height: 1.6;
    max-width: 500px;
    margin: 0 auto;
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.summary-card {
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.8) 0%,
        rgba(26, 26, 26, 0.9) 100%
    );
    border: 1px solid var(--vrising-red-dark);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.summary-card:hover {
    border-color: var(--vrising-red);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(220, 20, 60, 0.2);
}

.summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(220, 20, 60, 0.1),
        transparent
    );
    transition: left 0.6s ease;
}

.summary-card:hover::before {
    left: 100%;
}

.card-icon {
    font-size: 2rem;
    color: var(--vrising-red);
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

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

.card-label {
    display: block;
    font-family: var(--font-medieval);
    font-size: 0.9rem;
    color: rgba(192, 192, 192, 0.8);
    margin-bottom: 0.5rem;
}

.card-value {
    display: block;
    font-family: var(--font-tech);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--vrising-red);
    text-shadow: 0 0 10px rgba(220, 20, 60, 0.3);
}

/* Section Headers */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--vrising-red-dark);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-header i {
    font-size: 1.5rem;
    color: var(--vrising-red);
}

.section-header h3 {
    font-family: var(--font-medieval);
    font-size: 1.5rem;
    color: var(--vrising-silver);
    text-shadow: 0 0 10px rgba(192, 192, 192, 0.3);
}

/* Export Button */
.export-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: linear-gradient(
        135deg,
        rgba(139, 0, 0, 0.8) 0%,
        rgba(220, 20, 60, 0.9) 100%
    );
    border: 1px solid var(--vrising-red);
    border-radius: 8px;
    color: var(--vrising-silver);
    font-family: var(--font-medieval);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.export-btn:hover {
    background: linear-gradient(
        135deg,
        rgba(220, 20, 60, 0.9) 0%,
        rgba(139, 0, 0, 0.8) 100%
    );
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 20, 60, 0.3);
}

/* Árvore de Habilidades - Skill Tree */
.skill-tree {
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a1a 50%, #2d2d2d 100%);
    border: 3px solid #444;
    border-radius: 20px;
    padding: 40px;
    margin: 20px 0;
    box-shadow: 
        0 15px 50px rgba(0, 0, 0, 0.8),
        inset 0 2px 10px rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: visible;
    min-height: 400px;
}

.skill-tree::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255, 0, 0, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(138, 43, 226, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.skill-tree-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    position: relative;
    z-index: 1;
}

.skill-level {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
    position: relative;
}

.level-connector {
    width: 2px;
    height: 20px;
    background: linear-gradient(180deg, #666 0%, #999 50%, #666 100%);
    position: relative;
    margin: 0 auto;
}

.level-connector::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: red;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.6);
    animation: connectorPulse 2s ease-in-out infinite;
}

@keyframes connectorPulse {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.3);
        box-shadow: 0 0 20px rgba(255, 0, 0, 0.8);
    }
}

/* Nós da Árvore de Habilidades */
.skill-node {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid #555;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    box-shadow: 
        0 5px 15px rgba(0, 0, 0, 0.5),
        inset 0 2px 5px rgba(255, 255, 255, 0.1);
    margin-bottom: 15px;
}

.skill-node:hover {
    transform: scale(1.1);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.7),
        0 0 20px rgba(255, 0, 0, 0.3);
    border-color: red;
}

/* Produto Final */
.skill-node.final-product {
    width: 100px;
    height: 100px;
    border: 4px solid #e74c3c;
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 50%, #c0392b 100%);
    box-shadow: 
        0 8px 25px rgba(231, 76, 60, 0.4),
        inset 0 2px 8px rgba(255, 255, 255, 0.2);
    animation: finalProductGlow 3s ease-in-out infinite;
}

@keyframes finalProductGlow {
    0%, 100% {
        box-shadow: 
            0 8px 25px rgba(231, 76, 60, 0.4),
            inset 0 2px 8px rgba(255, 255, 255, 0.2);
    }
    50% {
        box-shadow: 
            0 8px 35px rgba(231, 76, 60, 0.6),
            0 0 30px rgba(231, 76, 60, 0.4),
            inset 0 2px 8px rgba(255, 255, 255, 0.3);
    }
}

.skill-node.final-product:hover {
    border-color: #ff6b6b;
    box-shadow: 
        0 10px 35px rgba(231, 76, 60, 0.7),
        0 0 40px rgba(231, 76, 60, 0.5);
}

/* Material Intermediário */
.skill-node.intermediate {
    border: 3px solid #3498db;
    background: linear-gradient(135deg, #2980b9 0%, #3498db 50%, #2980b9 100%);
    box-shadow: 
        0 5px 15px rgba(52, 152, 219, 0.3),
        inset 0 2px 5px rgba(255, 255, 255, 0.15);
}

.skill-node.intermediate:hover {
    border-color: #5dade2;
    box-shadow: 
        0 8px 25px rgba(52, 152, 219, 0.5),
        0 0 20px rgba(52, 152, 219, 0.3);
}

/* Material Básico */
.skill-node.basic-material {
    border: 3px solid #27ae60;
    background: linear-gradient(135deg, #229954 0%, #27ae60 50%, #229954 100%);
    box-shadow: 
        0 5px 15px rgba(39, 174, 96, 0.3),
        inset 0 2px 5px rgba(255, 255, 255, 0.15);
}

.skill-node.basic-material:hover {
    border-color: #58d68d;
    box-shadow: 
        0 8px 25px rgba(39, 174, 96, 0.5),
        0 0 20px rgba(39, 174, 96, 0.3);
}

/* Ícone e Quantidade do Nó */
.skill-icon {
    font-size: 2em;
    margin-bottom: 2px;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.7));
    animation: skillIconFloat 3s ease-in-out infinite;
}

@keyframes skillIconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.skill-quantity {
    position: absolute;
    top: -10px;
    right: -5px;
    font-size: 0.7em;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    background: rgba(220, 20, 60, 0.9);
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 10;
}

/* Ingredientes Mini dentro do Nó */
.node-ingredients {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 2px;
}

.ingredient-mini {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 1px 3px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 18px;
    transition: all 0.2s ease;
    cursor: help;
}

.ingredient-mini:hover {
    transform: translateY(-1px);
    background: rgba(0, 0, 0, 0.9);
    border-color: #555;
}

.ingredient-mini-icon {
    font-size: 0.6em;
    line-height: 1;
    margin-bottom: 2px;
}

.ingredient-mini-qty {
    font-size: 0.6em;
    color: #ffd700;
    font-weight: bold;
    line-height: 1;
}

/* Ingrediente Básico (Verde) */
.ingredient-mini.basic-ingredient {
    border-color: #27ae60;
    background: rgb(11 65 34);
    
}

.ingredient-mini.basic-ingredient:hover {
    border-color: #58d68d;
    background: rgba(39, 174, 96, 0.3);
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.4);
}

/* Estilos para ícones de imagem */
.item-icon {
    display: inline-block;
    vertical-align: middle;
    margin-right: 4px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
    transition: all 0.2s ease;
}

.item-icon:hover {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5)) brightness(1.1);
    transform: scale(1.1);
}

/* Skill Node Expansion */
.skill-expansion {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 8px;
    margin-top: 10px;
    border: 2px solid #2c3e50;
    position: relative;
    z-index: 1;
}

.skill-node.expanded .skill-expansion {
    max-height: 600px !important;
    opacity: 1 !important;
    border: 2px solid red;
    display: block !important;
    overflow: visible !important;
    position: fixed;
    z-index: 9999;
    width: 300px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
    left: auto;
    top: auto;
}

.expansion-header {
     background: linear-gradient(135deg, #2c3e50, #34495e);
     color: white;
     padding: 12px 15px;
     display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 6px 6px 0 0;
    font-weight: bold;
}

.expansion-header h4 {
    margin: 0;
    font-size: 16px;
}

.expansion-quantity {
     background: rgba(255, 0, 0, 0.2);
     color: white;
     padding: 4px 8px;
     border-radius: 12px;
    font-size: 14px;
    font-weight: bold;
}

.expansion-body {
    padding: 15px;
}

.expansion-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.expansion-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: rgba(52, 73, 93, 0.3);
    border-radius: 6px;
    border: 1px solid #34495e;
}

.info-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.info-text {
    color: #ecf0f1;
    font-size: 13px;
    font-weight: 500;
}

.expansion-necessita {
    margin-top: 15px;
}

.necessita-header {
    color: red;
    font-weight: bold;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #34495e;
}

.necessita-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.necessita-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(52, 73, 93, 0.4);
    border-radius: 6px;
    border-left: 3px solid red;
}

.ingredient-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.ingredient-name {
    flex: 1;
    color: #ecf0f1;
    font-size: 14px;
}

.ingredient-qty {
    color: #ffd700;
    font-weight: bold;
    font-size: 14px;
}

.skill-node {
    position: relative;
}

.skill-node.expanded {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
    z-index: 9998;
    position: relative;
    border: 2px solid red !important;
    color: red;
}

/* Seção do Objetivo */
.goal-section {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    border: 3px solid #27ae60;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.3);
    animation: goalPulse 3s ease-in-out infinite;
}

@keyframes goalPulse {
    0%, 100% { box-shadow: 0 8px 25px rgba(39, 174, 96, 0.3); }
    50% { box-shadow: 0 8px 35px rgba(39, 174, 96, 0.5), 0 0 20px rgba(39, 174, 96, 0.2); }
}

.goal-header h3 {
    color: #fff;
    font-size: 1.4em;
    margin: 0 0 10px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.goal-header p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 20px 0;
    font-size: 1.1em;
}

.goal-card {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    backdrop-filter: blur(10px);
}

.goal-icon {
    font-size: 3em;
    animation: goalIconSpin 4s linear infinite;
}

@keyframes goalIconSpin {
    0% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(90deg) scale(1.1); }
    50% { transform: rotate(180deg) scale(1); }
    75% { transform: rotate(270deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1); }
}

.goal-info {
    flex: 1;
}

.goal-name {
    color: #fff;
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 8px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.goal-quantity {
    color: red;
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 5px;
}

.goal-time {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1em;
}

/* Seção de Passos de Produção */
.production-steps {
    background: linear-gradient(135deg, red 0%, red 100%);
    border: 3px solid red;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(230, 126, 34, 0.3);
}

.steps-header h3 {
    color: #fff;
    font-size: 1.4em;
    margin: 0 0 10px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.steps-header p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 25px 0;
    font-size: 1.1em;
}

.steps-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.production-step {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    animation: stepSlideIn 0.6s ease-out;
}

@keyframes stepSlideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.production-step:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(10px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.step-number {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2em;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.step-icon {
    font-size: 2em;
    animation: stepIconBounce 2s ease-in-out infinite;
}

@keyframes stepIconBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.step-info {
    flex: 1;
}

.step-title {
    color: #fff;
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 8px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.step-details {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.step-quantity {
    color: #f1c40f;
    font-weight: bold;
}

.step-time {
    color: #e74c3c;
    font-weight: bold;
}

.step-machine {
    color: #9b59b6;
    font-weight: bold;
}

.step-arrow {
    text-align: center;
    font-size: 2em;
    color: #fff;
    margin: 10px 0;
    animation: arrowBounce 1.5s ease-in-out infinite;
}

@keyframes arrowBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}

/* Ingredientes do Passo */
.step-ingredients {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
}

.ingredients-title {
    color: #fff;
    font-weight: bold;
    display: block;
    margin-bottom: 10px;
}

.ingredients-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ingredient-item {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.ingredient-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.ingredient-icon {
    font-size: 1.2em;
}

.ingredient-name {
    color: #fff;
    font-size: 0.9em;
}

.ingredient-quantity {
    color: #f1c40f;
    font-weight: bold;
    font-size: 0.9em;
}

.node-content {
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.8) 0%,
        rgba(26, 26, 26, 0.9) 50%,
        rgba(0, 0, 0, 0.8) 100%
    );
    border: 2px solid var(--vrising-red-dark);
    border-radius: 15px;
    padding: 2rem;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.node-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(220, 20, 60, 0.1),
        transparent
    );
    transition: left 0.6s ease;
}

.node-content:hover::before {
    left: 100%;
}

.node-content:hover {
    border-color: var(--vrising-red);
    box-shadow: 
        0 0 25px rgba(220, 20, 60, 0.3),
        inset 0 0 20px rgba(0, 0, 0, 0.5);
    transform: translateY(-3px) scale(1.02);
}

.node-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.node-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.node-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(
        135deg,
        var(--vrising-red-dark) 0%,
        var(--vrising-red) 50%,
        var(--vrising-red-light) 100%
    );
    border: 3px solid var(--vrising-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--vrising-silver);
    font-size: 1.5rem;
    position: relative;
    box-shadow: 
        0 0 20px rgba(220, 20, 60, 0.4),
        inset 0 0 10px rgba(0, 0, 0, 0.3);
    animation: iconRotate 10s linear infinite;
}

@keyframes iconRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.node-icon::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: conic-gradient(
        from 0deg,
        var(--vrising-red),
        var(--vrising-red-light),
        var(--vrising-red),
        var(--vrising-red-dark),
        var(--vrising-red)
    );
    border-radius: 50%;
    z-index: -1;
    animation: borderRotate 3s linear infinite;
}

@keyframes borderRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.node-icon:hover {
    transform: scale(1.1);
    box-shadow: 
        0 0 30px rgba(220, 20, 60, 0.6),
        inset 0 0 15px rgba(0, 0, 0, 0.4);
}

.node-details h4 {
    font-family: var(--font-medieval);
    color: var(--vrising-silver);
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.node-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: rgba(192, 192, 192, 0.7);
}

.node-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.node-quantity {
    font-family: var(--font-tech);
    color: var(--vrising-red);
    font-weight: 700;
    font-size: 1.1rem;
}

/* Seção de Recursos Necessários */
.resources-section {
    background: linear-gradient(135deg, #8e44ad 0%, #9b59b6 100%);
    border: 3px solid #8e44ad;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(142, 68, 173, 0.3);
}

.resources-header h3 {
    color: #fff;
    font-size: 1.4em;
    margin: 0 0 10px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.resources-header p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 25px 0;
    font-size: 1.1em;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.resource-card {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    animation: resourceSlideIn 0.6s ease-out;
}

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

.resource-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.resource-icon {
    font-size: 2.5em;
    animation: resourceIconFloat 3s ease-in-out infinite;
}

@keyframes resourceIconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.resource-info {
    flex: 1;
}

.resource-name {
    color: #fff;
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.resource-quantity {
    color: #f1c40f;
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 5px;
}

.resource-hint {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9em;
    font-style: italic;
}

/* Basic Materials Grid - Melhorada */
.basic-materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
}

.material-item {
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.8) 0%,
        rgba(26, 26, 26, 0.9) 50%,
        rgba(0, 0, 0, 0.8) 100%
    );
    border: 2px solid var(--vrising-red-dark);
    border-radius: 15px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    animation: materialSlideIn 0.6s ease;
}

@keyframes materialSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.material-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(220, 20, 60, 0.1),
        transparent
    );
    transition: left 0.6s ease;
}

.material-item:hover::before {
    left: 100%;
}

.material-item:hover {
    border-color: var(--vrising-red);
    transform: translateY(-5px) scale(1.03);
    box-shadow: 
        0 10px 25px rgba(220, 20, 60, 0.3),
        inset 0 0 20px rgba(0, 0, 0, 0.4);
}

.material-info-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.material-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(
        135deg,
        var(--vrising-red-dark) 0%,
        var(--vrising-red) 100%
    );
    border: 2px solid var(--vrising-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 0 15px rgba(220, 20, 60, 0.3);
    animation: materialIconPulse 2s ease-in-out infinite;
}

@keyframes materialIconPulse {
    0%, 100% {
        box-shadow: 0 0 15px rgba(220, 20, 60, 0.3);
    }
    50% {
        box-shadow: 0 0 25px rgba(220, 20, 60, 0.5);
        transform: scale(1.05);
    }
}

.material-name {
    font-family: var(--font-medieval);
    color: var(--vrising-silver);
    font-size: 1.1rem;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(192, 192, 192, 0.3);
}

.material-quantity {
    font-family: var(--font-tech);
    color: var(--vrising-red);
    font-weight: 700;
    font-size: 1.4rem;
    text-shadow: 0 0 15px rgba(220, 20, 60, 0.4);
    background: linear-gradient(
        135deg,
        rgba(220, 20, 60, 0.1) 0%,
        rgba(139, 0, 0, 0.2) 100%
    );
    padding: 0.5rem 1rem;
    border-radius: 25px;
    border: 1px solid var(--vrising-red-dark);
    position: relative;
    z-index: 1;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.toast {
    background: linear-gradient(
        135deg,
        rgba(26, 26, 26, 0.95) 0%,
        rgba(42, 42, 42, 0.9) 100%
    );
    border: 1px solid var(--vrising-red);
    border-radius: 10px;
    padding: 1rem 1.5rem;
    color: var(--vrising-silver);
    font-family: var(--font-medieval);
    font-size: 0.9rem;
    box-shadow: 
        0 0 20px rgba(220, 20, 60, 0.3),
        inset 0 0 10px rgba(0, 0, 0, 0.3);
    animation: toastSlideIn 0.3s ease;
    max-width: 350px;
    position: relative;
    overflow: hidden;
}

.toast.success {
    border-color: red;
    box-shadow: 
        0 0 20px rgba(212, 175, 55, 0.3),
        inset 0 0 10px rgba(0, 0, 0, 0.3);
}

.toast.error {
    border-color: var(--vrising-red-light);
    box-shadow: 
        0 0 20px rgba(255, 71, 87, 0.3),
        inset 0 0 10px rgba(0, 0, 0, 0.3);
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.removing {
    animation: toastSlideOut 0.3s ease;
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Custom Scrollbar */
.skill-tree::-webkit-scrollbar,
.medieval-select::-webkit-scrollbar {
    width: 8px;
}

.skill-tree::-webkit-scrollbar-track,
.medieval-select::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.skill-tree::-webkit-scrollbar-thumb,
.medieval-select::-webkit-scrollbar-thumb {
    background: var(--vrising-red-dark);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.skill-tree::-webkit-scrollbar-thumb:hover,
.medieval-select::-webkit-scrollbar-thumb:hover {
    background: var(--vrising-red);
}

/* Estilos para o dropdown do select */
.medieval-select {
    background-color: var(--vrising-black) !important;
}

.medieval-select option {
    background-color: var(--vrising-black) !important;
    background-image: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.98) 0%,
        rgba(26, 26, 26, 0.95) 30%,
        rgba(42, 42, 42, 0.92) 70%,
        rgba(0, 0, 0, 0.98) 100%
    ) !important;
    color: var(--vrising-silver) !important;
    padding: 12px 16px !important;
    border: none !important;
    font-family: var(--font-medieval) !important;
    font-size: 1.1rem !important;
    font-weight: 500 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8) !important;
    border-bottom: 1px solid rgba(220, 20, 60, 0.2) !important;
}

.medieval-select option:hover {
    background-color: var(--vrising-red-dark) !important;
    background-image: linear-gradient(
        135deg,
        rgba(220, 20, 60, 0.3) 0%,
        rgba(139, 0, 0, 0.4) 50%,
        rgba(220, 20, 60, 0.3) 100%
    ) !important;
    color: var(--vrising-red-light) !important;
    text-shadow: 0 0 10px rgba(220, 20, 60, 0.5) !important;
}

.medieval-select option:checked,
.medieval-select option:selected {
    background-color: var(--vrising-red) !important;
    background-image: linear-gradient(
        135deg,
        rgba(220, 20, 60, 0.6) 0%,
        rgba(139, 0, 0, 0.7) 50%,
        rgba(220, 20, 60, 0.6) 100%
    ) !important;
    color: var(--vrising-silver) !important;
    font-weight: 700 !important;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.3) !important;
}

/* Força o tema escuro no dropdown */
select.medieval-select {
    color-scheme: dark;
}

/* Webkit específico para dropdown */
.medieval-select::-webkit-list-button {
    background: var(--vrising-black) !important;
    color: var(--vrising-silver) !important;
}

.medieval-select::-webkit-listbox {
    background: var(--vrising-black) !important;
    border: 2px solid var(--vrising-red-dark) !important;
    border-radius: 10px !important;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.8),
        0 0 20px rgba(220, 20, 60, 0.3) !important;
}

.medieval-select::-webkit-listbox-option {
    background: var(--vrising-black) !important;
    color: var(--vrising-silver) !important;
    padding: 12px 16px !important;
    border-bottom: 1px solid rgba(220, 20, 60, 0.2) !important;
}

.medieval-select::-webkit-listbox-option:hover {
    background: var(--vrising-red-dark) !important;
    color: var(--vrising-red-light) !important;
}

/* Melhorias de Performance e Animações */
.medieval-select,
.material-item,
.node-content,
.summary-card {
    will-change: transform;
}

/* Efeitos de Hover Melhorados */
.summary-card:hover .card-icon {
    animation: cardIconSpin 1s ease-in-out;
}

@keyframes cardIconSpin {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.2); }
    100% { transform: rotate(360deg) scale(1); }
}

.gothic-button:hover .btn-content i {
    animation: buttonIconBounce 0.6s ease;
}

@keyframes buttonIconBounce {
    0%, 100% { transform: translateY(0); }
    25% { transform: translateY(-3px); }
    75% { transform: translateY(-1px); }
}

/* Melhorias na Árvore de Produção */
.tree-node:nth-child(even) {
    animation-delay: 0.1s;
}

.tree-node:nth-child(odd) {
    animation-delay: 0.2s;
}

/* Responsive Design Melhorado */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .summary-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .basic-materials-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .main-container {
        padding: 1rem;
    }
    
    .header {
        padding: 2rem 1rem;
    }
    
    .header-ornaments {
        flex-direction: column;
        gap: 1rem;
    }
    
    .ornament-left,
    .ornament-right {
        font-size: 2rem;
    }
    
    .main-title {
        font-size: 2.5rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .title-skull {
        font-size: 3rem;
    }
    
    .subtitle {
        font-size: 1.3rem;
    }
    
    .calculator-panel,
    .results-panel {
        padding: 1.5rem;
    }
    
    .summary-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .basic-materials-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .material-item {
        padding: 1rem;
    }
    
    .material-icon {
        width: 35px;
        height: 35px;
        font-size: 1.1rem;
    }
    
    .node-content {
        padding: 1.5rem;
    }
    
    .node-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .toast-container {
        top: 1rem;
        right: 1rem;
        left: 1rem;
    }
    
    .toast {
        max-width: none;
        padding: 0.8rem 1rem;
    }
    
    .select-wrapper {
        margin-bottom: 0.5rem;
    }
    
    .medieval-select {
        padding: 1rem 3.5rem 1rem 3rem;
        font-size: 1rem;
    }
    
    .select-icon {
        left: 1rem;
        font-size: 1.1rem;
    }
    
    .select-arrow {
        right: 1rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .header-ornaments {
        flex-direction: column;
        gap: 1rem;
    }
    
    .ornament-left,
    .ornament-right {
        font-size: 2rem;
    }
    
    .main-title {
        font-size: 2rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .title-skull {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1.1rem;
    }
    
    .calculator-panel,
    .results-panel {
        padding: 1.5rem;
    }
    
    .skill-tree {
        padding: 20px;
        min-height: 300px;
    }
    
    .skill-tree-container {
        gap: 20px;
    }
    
    .skill-level {
        gap: 20px;
    }
    
    .skill-node {
        width: 60px;
        height: 60px;
    }
    
    .skill-node.final-product {
        width: 80px;
        height: 80px;
    }
    
    .skill-icon {
        font-size: 1.5em;
    }
    
    .skill-quantity {
        font-size: 0.6em;
        padding: 1px 4px;
    }
    
    .skill-expansion {
        margin-top: 8px;
    }
    
    .expansion-header {
        padding: 10px 12px;
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .expansion-header h4 {
        font-size: 14px;
    }
    
    .expansion-quantity {
        font-size: 12px;
        padding: 3px 6px;
    }
    
    .expansion-body {
        padding: 12px;
    }
    
    .expansion-info-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 8px;
        margin-bottom: 12px;
    }
    
    .expansion-info-item {
        padding: 6px;
        flex-direction: column;
        gap: 4px;
        text-align: center;
    }
    
    .info-icon {
        font-size: 14px;
    }
    
    .info-text {
        font-size: 11px;
    }
    
    .necessita-header {
        font-size: 13px;
        margin-bottom: 8px;
    }
    
    .necessita-item {
        padding: 6px 8px;
        gap: 8px;
    }
    
    .ingredient-icon {
        font-size: 14px;
    }
    
    .ingredient-name {
        font-size: 12px;
    }
    
    .ingredient-qty {
        font-size: 12px;
    }
    
    .skill-node.expanded {
        transform: scale(1.02);
    }
    
    .level-connector {
        height: 15px;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 2rem;
    }
    
    .title-skull {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1.1rem;
    }
    
    .description {
        font-size: 0.9rem;
    }
    
    .calculator-panel,
    .results-panel {
        padding: 1rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

.slide-up {
    animation: slideUp 0.5s ease;
}

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

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(192, 192, 192, 0.3);
    border-radius: 50%;
    border-top-color: var(--vrising-red);
    animation: spin 1s ease-in-out infinite;
}

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

/* Focus Styles for Accessibility */
.gothic-button:focus,
.medieval-select:focus,
.medieval-input:focus,
.export-btn:focus {
    outline: 2px solid var(--vrising-red);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --vrising-red: #ff0000;
        --vrising-silver: #ffffff;
    }
    
    .calculator-panel,
    .results-panel {
        border-width: 3px;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}