/* ==========================================================================
   HAPPY TREE FRIENDS: SEASON 2 PROJECT HUB - MASTER STYLESHEET
   ========================================================================== */

/* --- 1. GLOBAL LAYOUT CORE RESETS --- */
body {
    margin: 0;
    padding: 0;
    background-color: #ffd275; /* Warm classic retro yellow backdrop */
    font-family: "Trebuchet MS", Arial, sans-serif;
    font-size: 13px;
    color: #511c00; /* Dark chocolate brown text color */
}

/* --- 2. MAIN WEBSITE CONTAINER BOX --- */
#portal-container {
    width: 800px;
    margin: 40px auto; /* Centers the whole website on the monitor screen */
    background-color: #ffebbc; /* Cream interior content panels color */
    border-left: 4px solid #d45d00;
    border-right: 4px solid #d45d00;
    box-shadow: 0px 0px 15px rgba(0,0,0,0.3);
    position: relative; /* Keeps our elements and headers stacked perfectly inside rules */
}

/* --- 3. HEADER & LOGO GRID PANELS --- */
header {
    background-color: #f7a01a;
    padding: 20px;
    text-align: center;
    border-bottom: 4px solid #511c00;
}

.htf-logo {
    font-size: 42px;
    font-weight: bold;
    color: #bd3100; /* Gory dark red tint */
    letter-spacing: 2px;
    text-shadow: 2px 2px 0px #511c00;
}

.sub-logo {
    font-size: 14px;
    font-weight: bold;
    color: #511c00;
    margin-top: 5px;
    letter-spacing: 1px;
}

/* --- 4. CLASSIC PURPLE RETRO NAVBAR --- */
nav {
    background-color: #a45399; /* Mondo Media purple accent link color */
    padding: 10px;
    text-align: center;
    color: #ffebbc;
    font-weight: bold;
    border-bottom: 4px solid #511c00;
}

nav a {
    color: #ffffff;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.2s;
}

nav a:hover {
    color: #ffb631; /* Pops gold on mouse hover */
    text-decoration: underline;
}

/* --- 5. TWO-COLUMN LAYOUT STRUCTURE --- */
.main-content {
    display: flex;
    padding: 20px;
    gap: 20px;
}

/* Left Sidebar Column (Teaser and Account Chat Boxes) */
.left-column {
    width: 280px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Right Content Showcase Area (Sniffles Area) */
.right-column {
    flex: 1;
    background-color: #ffffff;
    border: 3px solid #511c00;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 4px 4px 0px #ffb631;
}

.content-heading {
    margin-top: 0;
    color: #bd3100;
    border-bottom: 2px dashed #ffb631;
    padding-bottom: 5px;
}

/* --- 6. INDIVIDUAL PORTAL BOX CONTAINER MODULES --- */
.portal-box {
    background-color: #ffffff;
    border: 3px solid #511c00;
    border-radius: 4px;
    box-shadow: 4px 4px 0px #ffb631;
    overflow: hidden;
}

.box-title {
    background-color: #ffb631;
    padding: 6px 10px;
    font-weight: bold;
    color: #511c00;
    border-bottom: 3px solid #511c00;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

.box-body {
    padding: 12px;
    line-height: 1.4;
}

/* --- 7. RETRO SYSTEM STYLED ACTION BUTTONS --- */
.retro-btn {
    background-color: #f7a01a;
    color: #511c00;
    border: 2px solid #511c00;
    padding: 4px 10px;
    font-weight: bold;
    font-family: "Trebuchet MS", sans-serif;
    border-radius: 3px;
    box-shadow: 2px 2px 0px #511c00;
    transition: all 0.1s ease;
}

.retro-btn:hover {
    background-color: #ffb631;
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0px #511c00;
}

.retro-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 0px 0px 0px #511c00;
}

/* --- 8. ACCOUNT SYSTEM INPUT FIELD CUSTOM ACCENTS --- */
#auth-panel input[type="text"], 
#auth-panel input[type="password"],
#chat-message-input {
    width: 90%;
    background-color: #ffffff;
    border: 2px solid #511c00 !important;
    border-radius: 3px;
    color: #511c00;
    font-family: Arial, sans-serif;
    outline: none;
}

#auth-panel input:focus,
#chat-message-input:focus {
    border-color: #a45399 !important; /* Highlights active field purple */
    background-color: #fffdf6;
}

/* --- 9. STRIPED ORANGE LOADING PROGRESSIVE BAR COMPONENTS --- */
.loading-bar-track {
    width: 95%;
    height: 14px;
    background-color: #ffebbc;
    border: 2px solid #511c00;
    border-radius: 3px;
    margin: 4px auto 0 auto;
    overflow: hidden;
    position: relative;
}

.loading-bar-fill {
    width: 0%; /* Transitions width values dynamically handled via script timers */
    height: 100%;
    background-color: #ff9031; /* Bright retro orange loader fill */
    background-image: linear-gradient(45deg, rgba(255,255,255,.2) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.2) 50%, rgba(255,255,255,.2) 75%, transparent 75%, transparent);
    background-size: 15px 15px;
    transition: width 0.1s linear;
}

/* --- 10. RETRO CHAT WINDOW SCROLLBAR ACCENTS --- */
#chat-log-window {
    scrollbar-face-color: #ffb631;
    scrollbar-track-color: #ffebbc;
    scrollbar-arrow-color: #511c00;
}

/* Modern Webkit Scrollbar layout mapping engine fallback rules */
#chat-log-window::-webkit-scrollbar {
    width: 10px;
}
#chat-log-window::-webkit-scrollbar-track {
    background: #ffebbc;
    border-left: 1px solid #511c00;
}
#chat-log-window::-webkit-scrollbar-thumb {
    background: #ffb631;
    border: 1px solid #511c00;
    border-radius: 2px;
}
#chat-log-window::-webkit-scrollbar-thumb:hover {
    background: #d45d00;
}

/* --- 11. CHARACTER ASSET EMBED DISPLAY WRAPPERS --- */
.hero-character-box {
    text-align: center;
    margin-top: 15px;
}

/* --- 12. FLOATING BACKGROUND SIDEBAR MARGIN CHARACTERS --- */
.sidebar-character-left {
    position: absolute;
    right: 102%; /* Hooks Nutty perfectly right against the left container spine */
    top: 150px;
    width: 200px;
    height: auto;
    z-index: 1;
}

.sidebar-character-right {
    position: absolute;
    left: 102%; /* Hooks Fliqpy perfectly right against the right container spine */
    top: 130px;
    width: 230px;
    height: auto;
    z-index: 1;
}

/* --- 13. MATURE AUDIENCE WARNING FOOTER ACCENTS --- */
footer {
    background-color: #511c00;
    padding: 15px;
    color: #ffebbc;
    text-align: center;
    border-top: 4px solid #d45d00;
}

.warning-section {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.warning-badge {
    background-color: #bd3100;
    color: #ffffff;
    font-weight: bold;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 11px;
    border: 1px solid #ffebbc;
}

.warning-text {
    font-size: 11px;
    font-weight: bold;
}

.footer-links {
    font-size: 11px;
}

.footer-links a {
    color: #ff9031;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* --- 14. INTERACTIVE KEYBOARD CHEAT CODE CRASH STYLES --- */
body.site-grashed {
    overflow: hidden !important;
    animation: screenshake 0.15s infinite;
}

body.site-grashed #portal-container {
    transform: rotate(180deg) scale(0.9); /* Flips layout upside down! */
    filter: invert(1) hue-rotate(90deg); /* Distorts colors into a creepy negative tint */
    transition: transform 0.2s ease-in;
    pointer-events: none; /* Disables all link interactions while grashed */
}

body.site-grashed::before {
    content: "FATAL ERROR: COOLCOOLERL HAS DESTROYED THE SERVER.";
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-5deg);
    color: #ff0000;
    font-family: 'Impact', sans-serif;
    font-size: 48px;
    text-shadow: 4px 4px #000;
    z-index: 999999;
    width: 80%;
    text-align: center;
}

@keyframes screenshake {
    0% { transform: translate(2px, 1px) rotate(0deg); }
    10% { transform: translate(-1px, -2px) rotate(-1deg); }
    20% { transform: translate(-3px, 0px) rotate(1deg); }
    30% { transform: translate(0px, 2px) rotate(0deg); }
    40% { transform: translate(1px, -1px) rotate(1deg); }
    50% { transform: translate(-1px, 2px) rotate(-1deg); }
    60% { transform: translate(-3px, 1px) rotate(0deg); }
    70% { transform: translate(2px, 1px) rotate(-1deg); }
    80% { transform: translate(-1px, -1px) rotate(1deg); }
    100% { transform: translate(1px, -2px) rotate(0deg); }
}
