/* Veyy game skin. Uses legacy Travium artwork from /assets. */

:root {
    --veyy-bg: #1a140d;
    --veyy-panel: #2a2118;
    --veyy-panel-2: #33291d;
    --veyy-border: #5a4a33;
    --veyy-text: #e8dcc0;
    --veyy-muted: #a89878;
    --veyy-green: #4c8a2a;
    --veyy-green-hi: #6db33f;
    --veyy-gold: #ffcc33;
    --veyy-red: #b33a3a;
    --veyy-link: #ffdd88;
}

* { box-sizing: border-box; }

body.veyy {
    margin: 0;
    background: var(--veyy-bg) url('/assets/gpack/travian_default/img/layout/bgV.jpg') repeat-y center top;
    background-color: #14100a;
    color: var(--veyy-text);
    font-family: Verdana, Geneva, sans-serif;
    font-size: 13px;
    min-height: 100vh;
}

body.veyy a { color: var(--veyy-link); text-decoration: none; }
body.veyy a:hover { text-decoration: underline; }

/* ---- top bar ---- */
.veyy-topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 16px;
    background: linear-gradient(#3a2d1d, #241b10);
    border-bottom: 2px solid var(--veyy-border);
}

.veyy-logo { font-size: 22px; font-weight: bold; color: var(--veyy-gold); letter-spacing: 2px; }
.veyy-logo a { color: var(--veyy-gold); }

.veyy-player { margin-left: auto; color: var(--veyy-muted); display: flex; align-items: center; gap: 12px; }
.veyy-player .gold { color: var(--veyy-gold); font-weight: bold; }

/* ---- resource bar ---- */
.veyy-resources {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    padding: 8px 16px;
    background: #20180f;
    border-bottom: 1px solid var(--veyy-border);
    font-size: 12px;
}

.veyy-res { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.veyy-res img { width: 18px; height: 14px; }
.veyy-res .cap { color: var(--veyy-muted); }

/* ---- nav ---- */
.veyy-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    padding: 6px 12px;
    background: #171208;
}

.veyy-nav a {
    padding: 6px 12px;
    background: var(--veyy-panel);
    border: 1px solid var(--veyy-border);
    border-radius: 4px 4px 0 0;
    color: var(--veyy-text);
    font-size: 12px;
}

.veyy-nav a:hover { background: var(--veyy-panel-2); text-decoration: none; }
.veyy-nav a.active { background: var(--veyy-green); border-color: var(--veyy-green-hi); color: #fff; }

/* ---- layout ---- */
.veyy-main { max-width: 1100px; margin: 0 auto; padding: 16px; }

.veyy-flash { padding: 8px 12px; margin-bottom: 12px; border-radius: 4px; }
.veyy-flash.status { background: #2a4a1a; border: 1px solid var(--veyy-green-hi); }
.veyy-flash.warning { background: #4a3a1a; border: 1px solid var(--veyy-gold); }
.veyy-errors { background: #4a1a1a; border: 1px solid var(--veyy-red); padding: 8px 12px; border-radius: 4px; margin-bottom: 12px; }
.veyy-errors ul { margin: 0; padding-left: 18px; }

/* ---- content cards ---- */
.veyy-main h1 { font-size: 18px; color: var(--veyy-gold); border-bottom: 1px solid var(--veyy-border); padding-bottom: 6px; }
.veyy-main h2 { font-size: 15px; color: var(--veyy-link); }

.veyy-main article, .veyy-card {
    background: var(--veyy-panel);
    border: 1px solid var(--veyy-border);
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 12px;
}

/* ---- tables ---- */
.veyy-main table { border-collapse: collapse; width: 100%; background: var(--veyy-panel); }
.veyy-main th, .veyy-main td { border: 1px solid var(--veyy-border); padding: 6px 8px; font-size: 12px; }
.veyy-main th { background: var(--veyy-panel-2); }

/* ---- map grid ---- */
.veyy-map { border-collapse: collapse; margin: 12px 0; }
.veyy-map td { width: 34px; height: 30px; text-align: center; padding: 0; border: 1px solid #3a2f1f; }
.veyy-map td a { display: block; width: 100%; height: 100%; line-height: 30px; }
.veyy-tile-village { background: #3a5a1a; font-weight: bold; }
.veyy-tile-oasis { background: #1a4a5a; }
.veyy-tile-free { background: #241c12; color: var(--veyy-muted); }

/* ---- forms & buttons ---- */
.veyy-main label { display: block; margin: 6px 0; }
.veyy-main input[type="text"], .veyy-main input[type="number"],
.veyy-main input[type="email"], .veyy-main input[type="password"],
.veyy-main select, .veyy-main textarea {
    background: #14100a;
    color: var(--veyy-text);
    border: 1px solid var(--veyy-border);
    border-radius: 4px;
    padding: 5px 8px;
    font-size: 13px;
}

.veyy-main button, .veyy-btn {
    background: linear-gradient(var(--veyy-green-hi), var(--veyy-green));
    color: #fff;
    border: 1px solid #2a4a1a;
    border-radius: 4px;
    padding: 6px 14px;
    cursor: pointer;
    font-size: 13px;
}

.veyy-main button:hover { filter: brightness(1.15); }
.veyy-main form { margin: 8px 0; padding: 8px; background: rgba(0, 0, 0, 0.2); border-radius: 4px; }

/* ---- auth ---- */
.veyy-auth { max-width: 420px; margin: 60px auto; background: var(--veyy-panel); border: 1px solid var(--veyy-border); border-radius: 8px; padding: 24px; }
.veyy-auth h1 { text-align: center; border: none; font-size: 22px; }

/* ---- footer ---- */
.veyy-footer { text-align: center; color: var(--veyy-muted); font-size: 11px; padding: 16px; border-top: 1px solid var(--veyy-border); margin-top: 24px; }

@media (max-width: 700px) {
    .veyy-resources { gap: 10px; font-size: 11px; }
    .veyy-main { padding: 8px; }
}

/* ---- village header ---- */
.veyy-village-head { display: flex; align-items: center; gap: 12px; }
.veyy-village-head img { height: 40px; }
.veyy-village-head h2 { margin: 0; }
.veyy-village-meta { color: var(--veyy-muted); font-size: 12px; margin: 4px 0 12px; }

/* ---- resource fields ---- */
.veyy-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.veyy-field-group { background: rgba(0, 0, 0, 0.25); border: 1px solid var(--veyy-border); border-radius: 4px; padding: 8px; }
.veyy-field-group h3 { margin: 0 0 6px; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.veyy-field-group h3 img { width: 18px; height: 14px; }
.veyy-field { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 12px; }
.veyy-field .slot { color: var(--veyy-muted); width: 52px; }
.veyy-field form { margin: 0; padding: 0; background: none; }
.veyy-lvl { background: var(--veyy-panel-2); border: 1px solid var(--veyy-border); border-radius: 8px; padding: 0 7px; font-size: 11px; }
.veyy-up { padding: 2px 8px !important; font-size: 12px !important; }

/* ---- buildings table ---- */
.veyy-bicon { width: 32px; height: 32px; vertical-align: middle; }

/* ---- bars ---- */
.veyy-bar { background: #14100a; border: 1px solid var(--veyy-border); border-radius: 4px; height: 14px; margin: 4px 0 8px; overflow: hidden; }
.veyy-bar > span { display: block; height: 100%; }
.veyy-bar.health > span { background: linear-gradient(#6db33f, #4c8a2a); }
.veyy-bar.xp > span { background: linear-gradient(#e8c33a, #a8801a); }
.veyy-hero-head { display: flex; align-items: center; gap: 14px; }
.veyy-hero-head img.portrait { height: 64px; border: 1px solid var(--veyy-border); border-radius: 4px; background: #14100a; }

/* ---- hero items ---- */
.veyy-items { display: flex; flex-wrap: wrap; gap: 8px; }
.veyy-item { width: 76px; text-align: center; font-size: 10px; color: var(--veyy-muted); background: rgba(0, 0, 0, 0.25); border: 1px solid var(--veyy-border); border-radius: 4px; padding: 4px; }
.veyy-item img { width: 48px; height: 48px; }

/* ---- map ---- */
.veyy-map th { background: #171208; color: var(--veyy-muted); font-size: 10px; padding: 2px 4px; border: 1px solid #3a2f1f; }
.veyy-map td.own { outline: 2px solid var(--veyy-gold); outline-offset: -2px; }
.veyy-map td.tribe-1 a { color: #7ab8ff; }
.veyy-map td.tribe-2 a { color: #ff9a7a; }
.veyy-map td.tribe-3 a { color: #9ae87a; }
.veyy-map td.tribe-4 { background: #333; }
.veyy-legend { font-size: 12px; color: var(--veyy-muted); }

/* ---- collapsible manage ---- */
.veyy-main details { background: rgba(0, 0, 0, 0.2); border: 1px solid var(--veyy-border); border-radius: 4px; margin: 8px 0; padding: 6px 10px; }
.veyy-main summary { cursor: pointer; color: var(--veyy-link); font-weight: bold; }

/* ---- inbox ---- */
.veyy-unread td { font-weight: bold; }
.veyy-unread td:first-child::before { content: "✉ "; color: var(--veyy-gold); }

/* ---- dorf1 village map (faithful to Travium T4.4) ---- */
.veyy-village-wrap { max-width: 500px; }
#village_map { position: relative; width: 473px; height: 304px; background-position: center bottom; background-repeat: no-repeat; max-width: 100%; }
#village_map.f1 { background-image: url('/assets/img/village/resourceField1.png'); }
#village_map.f2 { background-image: url('/assets/img/village/resourceField2.png'); }
#village_map.f3 { background-image: url('/assets/img/village/resourceField3.png'); }
#village_map.f4 { background-image: url('/assets/img/village/resourceField4.png'); }
#village_map.f5 { background-image: url('/assets/img/village/resourceField5.png'); }
#village_map.f6 { background-image: url('/assets/img/village/resourceField6.png'); }
#village_map.f7 { background-image: url('/assets/img/village/resourceField7.png'); }
#village_map.f8 { background-image: url('/assets/img/village/resourceField8.png'); }
#village_map.f9 { background-image: url('/assets/img/village/resourceField9.png'); }
#village_map.f10 { background-image: url('/assets/img/village/resourceField10.png'); }
#village_map.f11 { background-image: url('/assets/img/village/resourceField11.png'); }
#village_map.f12 { background-image: url('/assets/img/village/resourceField12.png'); }
#resfeld { width: 473px; height: 304px; display: block; }
#village_map .level.colorLayer { position: absolute; border: 1px solid #333; background-image: linear-gradient(to top, #606060, #c8c8c8 100%); margin: 1px; width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 2px 0 white; }
#village_map .colorLayer.notNow { border-color: #988b42; background-image: linear-gradient(to top, #988b42, #fdf15f 100%); }
#village_map .colorLayer.good { border-color: #506d00; background-image: linear-gradient(to top, #7da100, #c7e94f 100%); }
#village_map .colorLayer.maxLevel { border-color: #0d648e; background-image: linear-gradient(to top, #0d648e, #b1e4ff 100%); }
#village_map .colorLayer.underConstruction { outline: 2px dashed #fff; outline-offset: 1px; }
#village_map .colorLayer .labelLayer { position: relative; top: 4px; left: 4px; width: 18px; height: 18px; background: #fff; border-radius: 50%; line-height: 17px; font-size: 11px; font-family: Verdana, sans-serif; text-align: center; color: #000; }

/* ---- dorf1 info boxes ---- */
#map_details { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
#map_details .boxes { background: var(--veyy-panel); border: 1px solid var(--veyy-border); border-radius: 6px; padding: 10px; min-width: 200px; flex: 1; }
#map_details table { width: 100%; border-collapse: collapse; font-size: 12px; }
#map_details th { text-align: left; color: var(--veyy-gold); padding-bottom: 6px; }
#map_details td { padding: 3px 4px; }
#map_details td.num { text-align: right; }
#map_details img.unit { width: 24px; height: 24px; }

.veyy-village-wrap { position: relative; width: 473px; max-width: 100%; }
.veyy-village-wrap #village_map { position: absolute; inset: 0; }
