@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-blue: #1eaf31;
    --primary-blue-light: #3bf654;
    --secondary-blue: #52d81d;
    --accent-cyan: #06d463;
    --success-green: #10b981;
    --warning-yellow: #f59e0b;
    --danger-red: #ef4444;
    
    --bg-primary: rgba(15, 42, 15, 0.75);
    --bg-secondary: rgba(30, 59, 31, 0.65);
    --bg-tertiary: rgba(54, 85, 51, 0.45);
    --bg-glass: rgba(59, 246, 75, 0.08);
    --bg-glass-strong: rgba(59, 246, 90, 0.12);
    
    --border-primary: rgba(59, 246, 75, 0.3);
    --border-secondary: rgba(148, 184, 151, 0.2);
    
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 20px rgba(59, 246, 59, 0.3);
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes subtleGlow {
    0% {
        box-shadow: 0 0 20px rgba(30, 175, 49, 0.3), 0 0 40px rgba(59, 246, 84, 0.2);
    }
    50% {
        box-shadow: 0 0 30px rgba(6, 212, 99, 0.4), 0 0 60px rgba(16, 185, 129, 0.3);
    }
    100% {
        box-shadow: 0 0 20px rgba(30, 175, 49, 0.3), 0 0 40px rgba(59, 246, 84, 0.2);
    }
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: transparent;
    overflow: hidden;
    user-select: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.crafting-interface {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95);
    transition: opacity 0.3s ease-out, visibility 0.3s ease-out, transform 0.3s ease-out;
    z-index: 1000;
    background: transparent;
    pointer-events: none;
}

.crafting-interface::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(15, 42, 16, 0.85), rgba(30, 41, 59, 0.75));
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.25s ease-out;
    z-index: -1;
}

.crafting-interface.show {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    pointer-events: auto;
}

.crafting-interface.show::before {
    opacity: 1;
}

.crafting-interface.closing {
    opacity: 0;
    transform: scale(0.98);
    transition: opacity 0.2s ease-in, transform 0.2s ease-in;
}

.crafting-interface.closing::before {
    opacity: 0;
    transition: opacity 0.15s ease-in;
}

.crafting-interface.closing .main-container {
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    transition: all 0.2s ease-in;
}

.close-button {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    background: var(--bg-glass);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 24px;  /* Aumentado para mejor visibilidad */
    font-weight: 700; /* Añadido para hacer la X más gruesa */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    z-index: 1001;
    line-height: 1; /* Añadido para centrar mejor */
}

.close-button:hover {
    background: var(--bg-glass-strong);
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
    color: #ff4444; /* Añadido: rojo en hover para indicar que cierra */
}

.main-container {
    display: flex;
    gap: 24px;
    max-width: 1400px;
    width: 95vw;
    max-height: 90vh;
    animation: slideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(60px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.left-panel {
    flex: 2;
    background: linear-gradient(45deg, 
        rgba(15, 42, 15, 0.75), 
        rgba(30, 59, 31, 0.65), 
        rgba(54, 85, 51, 0.45), 
        rgba(16, 185, 129, 0.4), 
        rgba(6, 212, 99, 0.35),
        rgba(30, 175, 49, 0.6)
    );
    background-size: 400% 400%;
    animation: gradientShift 8s ease-in-out infinite;
    border: 1px solid var(--border-primary);
    border-radius: 24px;
    padding: 32px;
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    gap: 24px;
    box-shadow: var(--shadow-lg);
    animation: subtleGlow 4s ease-in-out infinite, gradientShift 8s ease-in-out infinite;
}

.panel-header {
    text-align: center;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--border-primary);
}

.panel-header h1 {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -1px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--primary-blue-light), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.panel-header .subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.category-tabs {
    display: flex;
    gap: 8px;
    background: linear-gradient(135deg, 
        rgba(15, 42, 15, 0.7), 
        rgba(30, 59, 31, 0.6), 
        rgba(54, 85, 51, 0.4)
    );
    background-size: 300% 300%;
    animation: gradientShift 14s ease-in-out infinite;
    border-radius: 16px;
    padding: 8px;
    border: 1px solid var(--border-secondary);
    backdrop-filter: blur(15px);
}

.category-tab {
    flex: 1;
    padding: 14px 20px;
    background: transparent;
    border: none;
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.category-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(6, 212, 99, 0.2), transparent);
    transition: left 0.4s ease;
}

.category-tab:hover::before {
    left: 100%;
}

.category-tab.active {
    background: linear-gradient(135deg, 
        rgba(30, 175, 49, 0.8), 
        rgba(16, 185, 129, 0.7), 
        rgba(6, 212, 99, 0.6)
    );
    background-size: 200% 200%;
    animation: gradientShift 6s ease-in-out infinite;
    color: white;
    box-shadow: 0 0 20px rgba(6, 212, 99, 0.4), 0 0 40px rgba(16, 185, 129, 0.2);
    transform: translateY(-1px);
}

.category-tab:hover:not(.active) {
    background: linear-gradient(135deg, 
        rgba(6, 212, 99, 0.15), 
        rgba(16, 185, 129, 0.12), 
        rgba(30, 175, 49, 0.1)
    );
    background-size: 200% 200%;
    animation: gradientShift 8s ease-in-out infinite;
    color: var(--text-primary);
    transform: translateY(-1px);
}

.items-container {
    flex: 1;
    overflow: hidden;
    margin-top: 20px;
    position: relative;
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    max-height: 420px;
    overflow-y: auto;
    padding-right: 8px;
    position: relative;
    transform: translateY(0);
    transition: none;
}

.item-card {
    background: linear-gradient(135deg, 
        rgba(15, 42, 15, 0.7), 
        rgba(30, 59, 31, 0.6), 
        rgba(54, 85, 51, 0.4), 
        rgba(16, 185, 129, 0.3)
    );
    background-size: 250% 250%;
    animation: gradientShift 15s ease-in-out infinite;
    border: 2px solid var(--border-secondary);
    border-radius: 16px;
    padding: 20px 16px;
    text-align: center;
    cursor: pointer;
    backdrop-filter: blur(15px);
    position: relative;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.item-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(6, 212, 99, 0.3), transparent);
    transition: left 0.5s ease;
}

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

.item-card:hover {
    border-color: var(--primary-blue-light);
    box-shadow: 0 0 20px rgba(6, 212, 99, 0.4), 0 0 40px rgba(16, 185, 129, 0.2);
    background: linear-gradient(135deg, 
        rgba(6, 212, 99, 0.2), 
        rgba(16, 185, 129, 0.25), 
        rgba(30, 175, 49, 0.15)
    );
    background-size: 200% 200%;
    animation: gradientShift 8s ease-in-out infinite;
}

.item-card.selected {
    border-color: var(--accent-cyan);
    background: linear-gradient(135deg, 
        rgba(6, 212, 99, 0.25), 
        rgba(16, 185, 129, 0.3), 
        rgba(30, 175, 49, 0.2)
    );
    background-size: 200% 200%;
    animation: gradientShift 10s ease-in-out infinite;
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.3), 0 0 25px rgba(6, 212, 99, 0.5);
}

.item-card img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    margin-bottom: 12px;
    border-radius: 8px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.item-card:hover img {
    transform: scale(1.05);
}

.item-card h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.3;
}

.item-card p {
    font-size: 12px;
    color: var(--text-muted);
    opacity: 0.9;
}

.right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.item-details {
    background: linear-gradient(135deg, 
        rgba(15, 42, 15, 0.75), 
        rgba(30, 59, 31, 0.65), 
        rgba(54, 85, 51, 0.45), 
        rgba(16, 185, 129, 0.35), 
        rgba(6, 212, 99, 0.3)
    );
    background-size: 300% 300%;
    animation: gradientShift 10s ease-in-out infinite;
    border: 1px solid var(--border-primary);
    border-radius: 24px;
    padding: 28px;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
    min-height: 400px;
    animation: subtleGlow 6s ease-in-out infinite, gradientShift 10s ease-in-out infinite;
}

.no-selection {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    opacity: 0.7;
}

.no-selection .icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-selection h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.no-selection p {
    font-size: 14px;
    color: var(--text-secondary);
}

.item-preview {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 28px;
    padding: 24px;
    background: var(--bg-glass);
    border-radius: 16px;
    border: 1px solid var(--border-primary);
}

.item-preview img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 12px;
    background: var(--bg-secondary);
    padding: 12px;
    border: 2px solid var(--border-primary);
}

.item-info h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.item-info p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.materials-section h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-cyan);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.materials-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.material-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-secondary);
    transition: all 0.2s ease;
}

.material-item.available {
    border-color: var(--success-green);
    background: rgba(16, 185, 129, 0.1);
}

.material-item.missing {
    border-color: var(--danger-red);
    background: rgba(239, 68, 68, 0.1);
}

.material-item img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 6px;
    background: var(--bg-tertiary);
    padding: 4px;
}

.material-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.material-amount {
    font-size: 13px;
    font-weight: 700;
}

.material-amount.available {
    color: var(--success-green);
}

.material-amount.missing {
    color: var(--danger-red);
}

.quantity-section {
    margin-bottom: 24px;
}

.quantity-section h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-cyan);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.qty-btn {
    width: 44px;
    height: 44px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.qty-btn:hover {
    background: var(--bg-glass);
    border-color: var(--primary-blue-light);
    transform: scale(1.05);
}

#quantityInput {
    flex: 1;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 12px;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    backdrop-filter: blur(15px);
}

#quantityInput:focus {
    outline: none;
    border-color: var(--primary-blue-light);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.craft-button {
    width: 100%;
    height: 52px;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    border: none;
    border-radius: 16px;
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: var(--shadow-md);
}

.craft-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.craft-button:disabled {
    background: var(--bg-tertiary);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.crafting-queue {
    background: linear-gradient(135deg, 
        rgba(15, 42, 15, 0.75), 
        rgba(30, 59, 31, 0.65), 
        rgba(54, 85, 51, 0.45), 
        rgba(16, 185, 129, 0.35), 
        rgba(6, 212, 99, 0.3)
    );
    background-size: 300% 300%;
    animation: gradientShift 12s ease-in-out infinite;
    border: 1px solid var(--border-primary);
    border-radius: 24px;
    padding: 24px;
    backdrop-filter: blur(20px);
    flex: 1;
    box-shadow: var(--shadow-lg);
    animation: subtleGlow 8s ease-in-out infinite, gradientShift 12s ease-in-out infinite;
}

.queue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-secondary);
}

.queue-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.clear-queue {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    padding: 8px 16px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
}

.clear-queue:hover {
    background: var(--danger-red);
    color: white;
}

.queue-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.queue-empty {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: 24px;
}

.queue-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-secondary);
    transition: all 0.3s ease;
}

.queue-item.completed {
    border-color: var(--success-green);
    background: rgba(16, 185, 129, 0.1);
}

.queue-item.failed {
    border-color: var(--danger-red);
    background: rgba(239, 68, 68, 0.1);
}

.queue-item img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 6px;
}

.queue-info {
    flex: 1;
}

.queue-info h5 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.queue-info p {
    font-size: 12px;
    color: var(--text-secondary);
}

.queue-status {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    color: var(--text-primary); /* AGREGADO: Color por defecto para el texto */
}

.queue-status.completed {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success-green);
}

.queue-status.failed {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger-red);
}

.queue-status.waiting {
    background: rgba(59, 246, 75, 0.1);
    color: var(--accent-cyan);
}

.queue-status.crafting {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning-yellow);
}

.progress-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    z-index: 2000;
}

.progress-content {
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: 20px;
    padding: 32px;
    width: 450px;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
}

.progress-content h3 {
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
    text-align: center;
}

.progress-item {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.progress-item img {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    border: 2px solid var(--border-primary);
    object-fit: contain;
    background: var(--bg-secondary);
    padding: 8px;
}

.progress-info {
    flex: 1;
}

.progress-info h4 {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: var(--bg-secondary);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-cyan));
    border-radius: 6px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-info p {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.cancel-craft {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 12px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cancel-craft:hover {
    background: var(--danger-red);
    border-color: var(--danger-red);
}

@media (max-width: 768px) {
    .main-container {
        width: 98vw;
    }
    
    .left-panel,
    .right-panel {
        padding: 20px;
    }
    
    .items-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
    }
}

.xp-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
}

.level-badge {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    border-radius: 20px;
    padding: 6px 16px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.xp-bar {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    height: 24px;
    overflow: hidden;
}

.xp-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success-green), #10b981);
    transition: width 0.3s ease;
    border-radius: 11px;
}

.xp-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    z-index: 2;
}

@keyframes levelUpPulse {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.level-up-notification {
    animation: levelUpPulse 2s ease-in-out !important;
}

.level-up-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.level-up-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.level-up-content h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
}

.level-up-content p {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.loading-skeleton {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 16px;
    font-weight: 500;
    grid-column: 1/-1;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px dashed var(--border-secondary);
    position: relative;
    overflow: hidden;
}

.loading-skeleton::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* ===== ESTILOS DE SCROLL PERSONALIZADOS ===== */
/* Scroll para .items-grid */
.items-grid::-webkit-scrollbar {
    width: 8px;
}

.items-grid::-webkit-scrollbar-track {
    background: rgba(15, 42, 15, 0.3);
    border-radius: 10px;
}

.items-grid::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, 
        var(--primary-blue), 
        var(--secondary-blue), 
        var(--accent-cyan)
    );
    border-radius: 10px;
    border: 1px solid rgba(59, 246, 75, 0.2);
}

.items-grid::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, 
        var(--primary-blue-light), 
        var(--accent-cyan), 
        var(--success-green)
    );
    box-shadow: 0 0 10px rgba(6, 212, 99, 0.5);
}

/* Scroll para .queue-items */
.queue-items::-webkit-scrollbar {
    width: 8px;
}

.queue-items::-webkit-scrollbar-track {
    background: rgba(15, 42, 15, 0.3);
    border-radius: 10px;
}

.queue-items::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, 
        var(--primary-blue), 
        var(--secondary-blue), 
        var(--accent-cyan)
    );
    border-radius: 10px;
    border: 1px solid rgba(59, 246, 75, 0.2);
}

.queue-items::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, 
        var(--primary-blue-light), 
        var(--accent-cyan), 
        var(--success-green)
    );
    box-shadow: 0 0 10px rgba(6, 212, 99, 0.5);
}

/* Scroll general para cualquier elemento con scroll en el menú */
.crafting-interface *::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.crafting-interface *::-webkit-scrollbar-track {
    background: rgba(15, 42, 15, 0.3);
    border-radius: 10px;
}

.crafting-interface *::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, 
        var(--primary-blue), 
        var(--secondary-blue), 
        var(--accent-cyan)
    );
    border-radius: 10px;
    border: 1px solid rgba(59, 246, 75, 0.2);
    transition: all 0.3s ease;
}

.crafting-interface *::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, 
        var(--primary-blue-light), 
        var(--accent-cyan), 
        var(--success-green)
    );
    box-shadow: 0 0 10px rgba(6, 212, 99, 0.5);
}

.crafting-interface *::-webkit-scrollbar-corner {
    background: rgba(15, 42, 15, 0.3);
}

.crafting-interface * {
    will-change: auto;
}

.crafting-interface.show * {
    will-change: transform, opacity;
}

.crafting-interface.closing * {
    will-change: transform, opacity;
}

.item-card img,
.material-item img {
    image-rendering: optimizeSpeed;
}