@import "./attributes.table.css";
@import "./skills.table.css";
@import "./perks.table.css";
@import "./jobs.table.css";
@import "./achievements.table.css";
@import "./description.css";
@import "./responsive.css";

:root {
    /* Colors */
    --ui-metal-text: #c7b98a;
    --ui-rank-green: #38ff4a;

    /* Fonts */
    --font-label: "Roboto Condensed", "Arial Narrow", Arial, sans-serif;
    --font-rank: "IBM Plex Mono", "Courier New", monospace;
    --font-value: "Roboto Mono", "Courier New", monospace;

    /* Scale for responsiveness */
    --base-width: 1669px;
    /* 1920 / 1.15 ≈ 1669 */
    --scale: 1;
    /* No scaling by default (above 800px) */
}

/* Enable scaling only below 800px */
@media (max-width: 800px) {
    :root {
        --scale: calc(100vw / var(--base-width));
    }
}

img {
    -webkit-user-drag: none;
    /* user-drag: none; */
}

/* Fix for overscroll bounce showing white background */
html {
    background-color: #000;
}

body {
    font-family: 'Courier New', monospace;
    margin: 0;
    padding: 0;
    background: radial-gradient(ellipse at center, #1a1a1a 0%, #000000 100%);
    color: #00ff00;
    box-sizing: border-box;
}

/* Prevent horizontal scroll only on screens wider than the content */
@media (min-width: 1700px) {
    body {
        overflow-x: hidden;
    }
}

.container {
    position: relative;
    margin: 0 auto;
    filter: drop-shadow(4px 8px 12px black);
    transform: scale(var(--scale));
    transform-origin: top center;
    background-image: url("../assets/images/general_background.webp");
    background-size: 1669px auto;
    background-repeat: no-repeat;
    background-position: top center;
    width: 1669px;
}


header {
    position: relative;
    height: 97px;
}

.name-background {
    display: block;
    margin: 0 auto;
    position: relative;
    left: 0;
    width: auto;
    height: auto;
    object-fit: none;
    top: -30px;
    transform: scaleY(0.60) scaleX(1.1);
}

.character-name {
    display: block;
    margin: 0 0 0 115px;
    max-width: 600px;
    width: auto;
    height: auto;
    position: absolute;
    z-index: 1;
    top: 5px;
}

.content {
    margin-top: 1px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

.panels-row {
    display: flex;
    align-items: flex-start;
    width: fit-content;
    margin-left: -48px;
}

.left-panel {
    width: 425px;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 8px 12px black;
}

.age-gender {
    width: 375px;
    margin: 2px 0 2px 50px;
    height: auto;
}

.experience {
    width: 375px;
    margin: 0 0 0 50px;
    height: auto;
}

.photo-frame {
    position: relative;
    width: 375px;
    height: 355px;
    margin: 0 0 3px 50px;
}

.photo-frame img:first-child {
    display: block;
    width: 100%;
    height: auto;
}

.photo-frame-default {
    position: relative;
    width: 375px;
    height: 400px;
    object-fit: cover;
    z-index: 0;
    transition: opacity 0.1s;
}

.photo-frame-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 375px;
    object-fit: cover;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.1s;
}

.photo-frame:hover .photo-frame-default {
    opacity: 0;
}

.photo-frame:hover .photo-frame-hover {
    opacity: 1;
}

.my-photo {
    position: absolute;
    top: 2px;
    /* отступ от верха фрейма */
    left: 22px;
    /* отступ от лева */
    width: calc(100% - 40px);
    /* ширина минус отступы */
    height: calc(100% - 15px);
    /* высота минус отступы */
    object-fit: cover;
    /* масштабирует, сохраняя пропорции */
    z-index: 1;
    scale: 0.85;
    transition: opacity 0.1s;
}

.my-photo-hover {
    position: absolute;
    top: 2px;
    /* отступ от верха фрейма */
    left: 24px;
    /* отступ от лева */
    width: calc(100% - 40px);
    /* ширина минус отступы */
    height: calc(100% - 15px);
    /* высота минус отступы */
    object-fit: cover;
    /* масштабирует, сохраняя пропорции */
    z-index: 2;
    scale: 0.83;
    opacity: 0;
    transition: opacity 0.1s;
}

.photo-frame:hover .my-photo {
    opacity: 0;
}

.photo-frame:hover .my-photo-hover {
    opacity: 1;
}

.middle-panel {
    width: 600px;
    box-shadow: 4px 8px 12px black;
}

.right-panel {
    width: 470px;
    position: relative;
    box-shadow: 4px 8px 12px black;
}

.skills-panel-container {
    position: absolute;
    top: 0;
    left: 0;
    width: auto;
    height: auto;
}

.skills-panel {
    width: auto;
    height: 630px;
    box-shadow: 4px 8px 12px black;
}

.skillsTable {
    position: absolute;
    top: 70px;
    left: 40px;
    right: 40px;
}

.bottom-row {
    display: flex;
    align-items: flex-start;
    width: fit-content;
    box-shadow: 4px 8px 12px black;
}

.tabs-panel {
    position: relative;
    width: 750px;
    height: auto;
}

.tabs-strip {
    position: absolute;
    top: 5px;
    width: 100%;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    gap: 0;
}

.tabs-background {
    width: 100%;
    height: 384px;
    display: block;
    margin-top: 42px;
    object-fit: fill;
}

.perks-button,
.jobs-button,
.achievements-button {
    position: relative;
    width: 172px;
    height: 45px;
    background-image: url('../assets/images/button_inactive.webp');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0 20px;
    margin: 0;
}

.perks-button {
    margin-left: 0;
}

.jobs-button {
    margin-left: 0;
}

.achievements-button {
    margin-left: 0;
}

.perks-button span,
.jobs-button span,
.achievements-button span {
    font-family: 'Overseer', monospace;
    font-weight: bold;
    color: #D8C58A;
    font-size: 18px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.perks-button:hover span,
.jobs-button:hover span,
.achievements-button:hover span {
    text-shadow: 0 0 20px rgba(32, 255, 58, 0.8);
}

.perks-button.active span,
.jobs-button.active span,
.achievements-button.active span {
    color: #20ff3a;
    text-shadow:
        0 0 30px rgba(32, 255, 58, 0.9),
        0 0 25px rgba(32, 255, 58, 0.8),
        0 0 20px rgba(32, 255, 58, 0.7),
        0 0 15px rgba(32, 255, 58, 0.6),
        0 0 10px rgba(32, 255, 58, 0.5),
        0 0 5px rgba(32, 255, 58, 0.4);
}

.tab-content {
    position: absolute;
    top: 75px;
    left: 70px;
    width: 620px;
    height: 320px;
    z-index: 1;
    font-family: "Overseer", "VT323", "Share Tech Mono", "Courier New", monospace;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #20ff3a;
    text-shadow:
        0 0 6px rgba(32, 255, 58, 0.35),
        0 0 1px rgba(0, 0, 0, 0.8);
}

.description-panel {
    width: 692px;
    height: 432px;
    margin-top: -4px;
}