/* ============================================= */
/*    S U P E R  M A R I O  6 4   +   C O N T R A   R E T R O   S T Y L E    */
/* ============================================= */

/* --- Шрифты --- */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Pixelify+Sans&display=swap');

body {
    font-family: 'Press Start 2P', 'Pixelify Sans', monospace;
    color: #f8f8f8;
    background-color: #000000;
    background-image:
        url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjAiIGhlaWdodD0iMTAwIiB2aWV3Qm94PSIwIDAgMTIwIDEwMCI+PHJlY3Qgd2lkdGg9IjEwMCIgaGVpZ2h0PSIxMDAiIGZpbGw9IiNmZmYiLz48L3N2Zz4='), /* Тёмный фон */
        url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjAiIGhlaWdodD0iMTAwIiB2aWV3Qm94PSIwIDAgMTIwIDEwMCI+PHBhdGggZD0iTTIwIDIwTDEyMCAyMCAxMjAgMTAgMjAgMTAgMjAgMTAgMjAgMTAgMjAgMTAgMjAgMTAgMjAgMTAgMjAgMTAgMjAgMTAgMjAgMTAgMjAgMTAgMjAgMTAgMjAgMTAgMjAgMTAgMjAgMTAgMjAgMTAgMjAgMTAgMjAgMTAgMjAgMTAgMTAgMjAgMTAgMjAgMTAgMTAiIGZpbGw9IiNmZmYiLz48L3N2Zz4='); /* Сканлайны */
    background-size: 100% 100%, 10px 10px;
    margin: 0;
    padding: 0;
    line-height: 1.4;
    -webkit-font-smoothing: none;
    -moz-osx-font-smoothing: none;
}

/* --- Анимация сканлайнов --- */
@keyframes scanlines {
    0% { background-position: 0 0; }
    100% { background-position: 0 1px; }
}
body {
    animation: scanlines 0.5s linear infinite;
}

/* --- Стиль заголовков (в стиле Super Mario 64) --- */
h1, h2, h3, h4 {
    font-family: 'Press Start 2P', cursive;
    color: #ffd700;
    text-shadow: 2px 2px 0 #000, 4px 4px 0 #000;
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
}
h1::after {
    content: "&#9670;";
    margin-left: 10px;
    color: #ff0000;
}

/* --- Панель форума (стиль Contra) --- */
.forumheader, .thead {
    background: linear-gradient(to bottom, #5e2e12, #3a1f0b);
    color: #ffd700;
    border-bottom: 2px solid #ff0000;
    padding: 8px;
    font-weight: bold;
    position: relative;
}
.forumheader::before {
    content: "&#9679;";
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #ff0000;
    font-size: 1.2em;
}

/* --- Топики и сообщения (стиль Mario) --- */
.td_title {
    background-color: #2a2a2a;
    border-left: 4px solid #ff0000;
    padding: 8px;
    font-weight: bold;
    color: #ffffff;
}
.td_content {
    background-color: #1a1a1a;
    border: 1px solid #3a3a3a;
    padding: 12px;
    margin: 5px 0;
    line-height: 1.5;
}

/* --- Кнопки (стиль аркадных автоматов) --- */
.button {
    background-color: #00008b;
    color: #ffd700;
    border: 2px solid #ff0000;
    padding: 8px 16px;
    font-family: 'Press Start 2P', monospace;
    border-radius: 2px;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    transition: all 0.1s;
    position: relative;
    overflow: hidden;
}
.button::before {
    content: "A";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.8em;
    opacity: 0.3;
    color: #ffffff;
}
.button:hover {
    background-color: #ff5500;
    color: #000000;
    box-shadow: 0 0 10px #ff0000;
    transform: scale(1.05);
}

/* --- Аватарки (спрайты Марио) --- */
.avatar-container {
    width: 56px;
    height: 56px;
    border: 2px solid #ff0000;
    border-radius: 4px;
    background-color: #000000;
    overflow: hidden;
    box-shadow: 2px 2px 0 #000;
    margin-right: 10px;
    position: relative;
}
.avatar-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: drop-shadow(1px 1px 0 #ff0000);
}

/* --- Полоса репутации (в стиле health bar из Contra) --- */
.reputation-bar {
    height: 8px;
    background-color: #1a1a1a;
    border: 1px solid #ff0000;
    border-radius: 2px;
    margin: 5px 0;
    overflow: hidden;
}
.reputation-fill {
    height: 100%;
    background: linear-gradient(to right, #00ff00, #ffff00, #ff0000);
    width: 100%;
    transition: width 0.5s;
}

/* --- Форма вход/регистрация (стиль Mario) --- */
.formcontainer {
    background-color: #2a2a2a;
    border: 2px solid #ff0000;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 2px 2px 0 #000;
}
.formrow label {
    display: inline-block;
    width: 180px;
    color: #ffd700;
    font-weight: bold;
    text-align: right;
    margin-right: 10px;
}
.formrow input, .formrow select {
    background-color: #1a1a1a;
    border: 1px solid #ff5500;
    color: #ffffff;
    padding: 5px;
    font-family: 'Press Start 2P', monospace;
}

/* --- Навигация (стиль меню из Super Mario 64) --- */
.navbar {
    background-color: #5e2e12;
    padding: 8px;
    border-radius: 4px;
    margin-bottom: 15px;
    border: 1px solid #ff0000;
}
.navbar a {
    color: #ffd700;
    margin: 0 10px;
    text-decoration: none;
    font-weight: bold;
    position: relative;
}
.navbar a::after {
    content: "&#8594;";
    margin-left: 5px;
    font-size: 0.7em;
    opacity: 0.7;
}
.navbar a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* --- Ошибки (Game Over) --- */
.error-box {
    background-color: #2a2a2a;
    border: 2px solid #ff0000;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    text-align: center;
    animation: shake 0.5s;
}
.error-box h3 {
    color: #ff0000;
    font-family: 'Press Start 2P', cursive;
    margin-top: 0;
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

/* --- Вкладки (стиль Mario Kart) --- */
.tabs {
    display: flex;
    margin-bottom: 10px;
    border-bottom: 2px solid #ff0000;
}
.tab {
    padding: 8px 16px;
    background-color: #5e2e12;
    color: #ffd700;
    margin-right: 2px;
    cursor: pointer;
    border-radius: 2px 2px 0 0;
    position: relative;
}
.tab.active {
    background-color: #ff5500;
    color: #000000;
    font-weight: bold;
}
.tab::before {
    content: "&#9670;";
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.7;
}

/* --- Футер (стиль Contra) --- */
footer {
    text-align: center;
    padding: 10px;
    color: #888;
    font-size: 0.8em;
    border-top: 1px solid #3a3a3a;
}
footer a {
    color: #ffd700;
    text-decoration: none;
}
