/* Forge & Crafting UI Styles */

.forge-window {
    padding: 25px;
    background: linear-gradient(135deg, #0b0c10 0%, #1f2833 100%);
    border: 2px solid var(--gold);
    border-radius: 15px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.9), 0 0 20px rgba(255, 215, 0, 0.1);
    max-width: 900px;
    width: 90vw;
    margin: 0 auto;
    color: #fff;
    font-family: 'Inter', sans-serif;
}

.forge-header {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.forge-back-btn {
    position: absolute;
    left: 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #444;
    color: #ccc;
    padding: 6px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    font-family: 'Cinzel', serif;
}

.forge-back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: var(--gold);
    transform: translateX(-3px);
}

/* Menu Screen */
.forge-menu-screen {
    display: flex;
    gap: 25px;
    padding: 30px 0;
    justify-content: center;
}

.forge-option-card {
    flex: 1;
    max-width: 350px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 215, 0, 0.1);
    border-radius: 15px;
    padding: 40px 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    position: relative;
    overflow: hidden;
}

.forge-option-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at center, rgba(255, 215, 0, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.forge-option-card:hover {
    background: rgba(255, 215, 0, 0.07);
    border-color: var(--gold);
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(255, 215, 0, 0.2);
}

.forge-option-card:hover::before {
    opacity: 1;
}

.forge-option-icon {
    font-size: 50px;
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.4));
    z-index: 1;
}

.forge-option-title {
    font-family: 'Cinzel', serif;
    color: var(--gold);
    font-size: 1.5em;
    letter-spacing: 1px;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.forge-option-desc {
    font-size: 14px;
    color: #aaa;
    line-height: 1.5;
    z-index: 1;
}

/* Layout */
.forge-layout {
    display: flex;
    gap: 30px;
    height: 520px;
    animation: fadeIn 0.4s ease-out;
}

.forge-inventory {
    flex: 1.3;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-right: 1px solid rgba(255,255,255,0.05);
    padding-right: 20px;
}

.inv-grid-forge {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    padding-right: 8px;
}

.inv-grid-forge::-webkit-scrollbar { width: 4px; }
.inv-grid-forge::-webkit-scrollbar-thumb { background: #333; border-radius: 2px; }

.forge-item-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255,255,255,0.05);
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.forge-item-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: #444;
}

.forge-item-card.selected {
    border-color: var(--gold);
    background: rgba(255, 215, 0, 0.1);
    box-shadow: inset 0 0 10px rgba(255, 215, 0, 0.1);
}

.forge-item-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.6);
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.1);
}

.forge-item-info {
    flex: 1;
}

.forge-item-name {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 3px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.forge-item-meta {
    font-size: 11px;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.forge-item-reason {
    position: absolute;
    right: 12px;
    font-size: 10px;
    color: var(--danger);
    background: rgba(0,0,0,0.5);
    padding: 3px 8px;
    border-radius: 10px;
    border: 1px solid rgba(255,0,0,0.2);
}

/* Workspace */
.forge-workspace {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}

.forge-group-title {
    font-family: 'Cinzel', serif;
    color: #888;
    font-size: 0.9em;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.forge-slots-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 15px 0;
}

.forge-slot {
    width: 85px;
    height: 85px;
    border: 2px dashed rgba(255,255,255,0.1);
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.forge-slot.big {
    width: 130px;
    height: 130px;
}

.forge-slot:hover {
    border-color: var(--gold);
    background: rgba(255, 215, 0, 0.05);
    transform: scale(1.03);
}

.forge-slot.filled {
    border-style: solid;
    border-color: rgba(255,255,255,0.2);
    background: rgba(255, 255, 255, 0.03);
    box-shadow: 0 0 15px rgba(0,0,0,0.3);
}

.slot-item-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.slot-item-label {
    font-size: 10px;
    white-space: nowrap;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #888;
}

.slot-empty-label {
    font-size: 28px;
    color: #222;
    font-weight: bold;
}

.forge-arrow {
    font-size: 24px;
    margin: 15px 0;
    color: var(--gold);
    filter: drop-shadow(0 0 5px var(--gold));
}

.forge-result-preview {
    width: 100%;
    min-height: 100px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 215, 0, 0.1);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.5);
}

.preview-card {
    animation: fadeIn 0.4s ease-out;
}

.forge-action-btn {
    background: linear-gradient(to bottom, var(--gold), #b8860b);
    color: #000;
    border: none;
    padding: 18px;
    border-radius: 10px;
    font-family: 'Cinzel', serif;
    font-weight: bold;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
    letter-spacing: 1px;
}

.forge-action-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
    filter: brightness(1.1);
}

.forge-action-btn:active:not(:disabled) {
    transform: translateY(-1px);
}

.forge-action-btn:disabled {
    background: #2a2a2a;
    color: #555;
    cursor: not-allowed;
    box-shadow: none;
    filter: none;
}

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

@keyframes popIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
