@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;700;900&display=swap');

:root {
    --m2-border: #4e3e31;
    --m2-bg: #1c1410;
    --m2-text: #f1c40f;
    --m2-btn-bg: #3a2e24;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
}

body {
    background: #000 url('https://i.ibb.co/hV7vB2K/metin2-bg-desert.jpg') no-repeat center center fixed;
    background-size: cover;
    color: #fff;
    font-family: 'Tahoma', 'Arial', sans-serif;
    overflow: hidden;
    cursor: url('https://cur.cursors-4u.net/games/gam-4/gam372.cur'), auto;
}

/* Metin2 Window Style */
.m2-window {
    background: rgba(28, 20, 16, 0.95);
    border: 2px solid #5a4a3a;
    box-shadow: inset 0 0 10px #000, 0 10px 30px rgba(0, 0, 0, 0.8);
    border-radius: 3px;
    position: relative;
}

.m2-window-header {
    background: linear-gradient(to bottom, #5a4a3a, #3a2a1a);
    padding: 5px 15px;
    font-size: 0.85rem;
    color: #e2d2c2;
    font-weight: bold;
    border-bottom: 1px solid #2a1a0a;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Blacksmith NPC */
.npc-blacksmith {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 350px;
    filter: drop-shadow(0 0 20px rgba(0, 0, 0, 0.5));
    pointer-events: none;
}

/* Refine Window (The specific upgrade box) */
.refine-window {
    width: 280px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -80%);
    z-index: 100;
}

.refine-slot {
    width: 32px;
    height: 96px;
    /* 3 slots for Sam sword */
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #4a3a2a;
    margin: 20px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.refine-slot img {
    max-width: 100%;
}

/* In-game Buttons */
.m2-game-btn {
    background: #3c2f25;
    border: 1px solid #6e5e51;
    color: #cbbba1;
    padding: 3px 15px;
    font-size: 0.75rem;
    cursor: pointer;
    text-align: center;
    transition: background 0.2s;
}

.m2-game-btn:hover {
    background: #5c4f45;
    color: #fff;
}

/* Chat Box */
.m2-chat {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 450px;
    height: 150px;
    background: rgba(0, 0, 0, 0.4);
    font-family: 'Tahoma', sans-serif;
    font-size: 12px;
    padding: 10px;
    overflow-y: hidden;
    color: #fff;
    pointer-events: none;
}

.chat-line {
    margin-bottom: 2px;
}

.chat-system {
    color: #ffff00;
}

.chat-notice {
    color: #ff00ff;
}

/* In-game Tooltip */
.m2-tooltip {
    position: absolute;
    background: rgba(10, 10, 10, 0.95);
    border: 1px solid #555;
    padding: 8px;
    z-index: 1000;
    color: #7dd3fc;
    font-size: 12px;
    width: 200px;
    pointer-events: none;
}

/* Failed Screen Overlay */
.failed-notice {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    color: #ff0000;
    font-weight: 900;
    text-shadow: 0 0 10px #000;
    z-index: 2000;
    display: none;
    font-family: 'Cairo', sans-serif;
}