/* =========================
   ChatFurry – Full Fixed Header A+ Theme
========================= */

/* Variables */
:root {
    --primary: #5C3E8A;
    --secondary: #A67BCF;
    --accent: #FFB86C;
    --hover-line: #FFB86C; /* Orange line hover color */
    --background: #1A1A1D;
    --panel-bg: #2B2B33;
    --text: #E0E0E0;
    --shadow: rgba(0, 0, 0, 0.5);
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    min-height: 100vh;
    color: var(--text);
    line-height: 1.6;
    background: url('/default_images/forest.png') no-repeat center center fixed;
    background-size: cover;
    position: relative;
    will-change: transform;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.35);
    z-index: -1;
    pointer-events: none;
}

/* =========================
   Header – Fixed
========================= */
.site-header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    padding: 0.8rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    border-radius: 0 0 12px 12px;
    z-index: 50;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.site-logo {
    width: 180px;
    height: auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
}

.site-logo:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
    filter: brightness(1.1);
}

.menu-toggle {
    font-size: 1.4rem;
    background: var(--panel-bg);
    color: var(--accent);
    padding: 0.4rem 0.6rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    background: var(--primary);
    color: #fff;
    transform: scale(1.1);
}

/* =========================
   Side Menu (Left Side)
========================= */
/* Side Menu Full Height Scrollable */
.side-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 320px;
    height: 100%; /* changed from 100vh to 100% */
    max-height: 100%; /* ensure it cannot exceed screen */
    background: var(--panel-bg);
    padding: 1.2rem 0; /* padding top/bottom */
    box-shadow: 6px 0 20px var(--shadow);
    transition: left 0.3s ease;
    overflow-y: auto; /* allow scroll if content exceeds height */
    border-radius: 0 0 12px 0;
    z-index: 999;
}

/* Submenu inside */
.side-menu .submenu {
    max-height: none; /* allow natural height */
    overflow: visible; /* show all items */
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}


.side-menu.open {
    left: 0;
}

/* Side Menu Links */
.side-menu a {
    display: block;
    position: relative;
    padding: 0.6rem 1rem;
    margin: 0.5rem 0;
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s ease;
}

/* Lined hover effect */
.side-menu a::before,
.side-menu a::after {
    content: "";
    display: block;
    height: 2px;
    background: transparent;
    transition: background 0.3s ease, transform 0.3s ease;
    position: absolute;
    left: 0;
    right: 0;
}

.side-menu a::before {
    top: 0;
}

.side-menu a::after {
    bottom: 0;
}

.side-menu a:hover::before,
.side-menu a:hover::after {
    background: var(--hover-line);
}

/* Submenu container */
.side-menu .submenu {
    max-height: 0;                /* collapsed by default */
    overflow: hidden;             /* hide until expanded */
    transition: max-height 0.4s ease;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;        /* spacing below submenu */
}

/* Show submenu */
.side-menu a.open + .submenu {
    max-height: 1000px;           /* large enough to show all links */
    overflow-y: auto;             /* allow scroll if submenu is very long */
}

/* Submenu links */
.side-menu .submenu a {
    position: relative;
    padding: 0.8rem 1rem 0.8rem 2.6rem; /* top right bottom left */
    margin-bottom: 0.5rem;               /* space between links */
    line-height: 1.6;                    /* ensures hover line does not cut text */
    display: block;
    overflow: visible;                    /* allow hover lines */
    z-index: 2;
}

/* Hover lines for submenu */
.side-menu .submenu a::after,
.side-menu .submenu a::before {
    content: "";
    position: absolute;
    height: 2px;
    background: var(--hover-line);
    left: 0;
    right: 0;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

/* Top line */
.side-menu .submenu a::before {
    top: 0;
    transform-origin: left;
}

/* Bottom line */
.side-menu .submenu a::after {
    bottom: 0;
    transform-origin: right;
}

/* Animate lines on hover */
.side-menu .submenu a:hover::before,
.side-menu .submenu a:hover::after {
    transform: scaleX(1);
}

/* Paw icon for submenu */
.side-menu .submenu a .paw-icon {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    pointer-events: none;
    color: var(--text);
}

.side-menu .submenu a:hover .paw-icon {
    color: var(--accent);
}

/* Ensure submenu scroll works and doesn't overlap other content */
.side-menu {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* smooth scrolling on mobile */
}

/* Menu overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.35);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    z-index: 998;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* =========================
   Main Content
========================= */
.main-content,
.main-box {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    margin-top: 100px;
}

/* Hero */
.hero {
    text-align: center;
    padding: 3rem 2rem;
    background: url('/default_images/forest.png') no-repeat center center fixed;
    background-size: cover;
    border-radius: 20px;
    box-shadow: 0 6px 20px var(--shadow);
    background-color: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(4px);
    color: #F0F0F0;
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 900;
}

.hero p {
    margin-top: 1rem;
    font-size: 1.1rem;
    color: #F0F0F0;
}

/* Article Buttons */
.article-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.article-btn {
    display: inline-block;
    background: #4caf50;
    color: #fff;
    padding: 12px 25px;
    margin: 10px 10px 0 0;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s, transform 0.2s;
}

.article-btn:hover {
    background: #3e8e41;
    transform: translateY(-3px);
}

/* Panels / Cards */
.about-me,
.article,
.faq,
.community-overview,
.rooms {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--panel-bg);
    border-radius: 15px;
    box-shadow: 0 8px 20px var(--shadow);
}

h2,
h3,
h4 {
    color: var(--accent);
    margin-bottom: 1rem;
}

/* Community Overview Section */
.community-overview {
    padding: 50px 20px;
    background: linear-gradient(145deg, #d9f5e1, #a3e1a7);
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    margin: 40px 0;
    color: #1b3a2a;
}

.community-overview h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 20px;
}

.community-overview h3 {
    font-size: 1.75rem;
    margin-top: 25px;
    margin-bottom: 15px;
    color: #2a5d38;
}

.community-overview p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.community-overview ul {
    list-style-type: disc;
    padding-left: 40px;
    margin-bottom: 20px;
}

.community-overview ul li {
    margin-bottom: 10px;
}

/* Rooms Section */
.room-card {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 15px;
    background: #3B3B4B;
    box-shadow: 0 4px 12px var(--shadow);
}

.room-bubble {
    display: inline-block;
    margin: 0.5rem 0;
    padding: 0.8rem 1rem;
    background: var(--secondary);
    color: #fff;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.room-bubble:hover {
    background: var(--accent);
    transform: translateY(-2px);
}

/* Forms */
.application-form {
    display: flex;
    flex-direction: column;
    max-width: 600px;
    margin: 2rem auto;
    padding: 1.5rem;
    background: #3B3B4B;
    border-radius: 12px;
    box-shadow: 0 4px 12px var(--shadow);
}

.application-form label {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--accent);
}

.application-form input,
.application-form textarea {
    padding: 0.7rem;
    border-radius: 8px;
    border: none;
    background: #2B2B33;
    color: #fff;
    font-size: 1rem;
    resize: vertical;
    margin-bottom: 1rem;
}

.application-form input:focus,
.application-form textarea:focus {
    outline: none;
    box-shadow: 0 0 8px var(--accent);
}

.application-form button {
    padding: 0.8rem;
    border: none;
    border-radius: 8px;
    background: var(--accent);
    color: var(--panel-bg);
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.application-form button:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}

/* Footer */
footer {
    margin-top: 4rem;
    padding: 2rem;
    background: var(--panel-bg);
    color: #E0E0E0;
    text-align: center;
    border-top: 1px solid var(--primary);
    box-shadow: 0 -4px 15px var(--shadow);
}

footer a {
    color: var(--accent);
    transition: 0.3s ease;
}

footer a:hover {
    color: var(--primary);
}

/* Audio Player Button */
#playBtn {
    display: inline-block;
    padding: 0.8rem 1.2rem;
    margin: 1rem 0;
    background: var(--accent);
    color: var(--panel-bg);
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

#playBtn:hover {
    background: var(--primary);
    color: #fff;
}

/* Floating Add-to-Home */
.add-home-popup {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--accent);
    color: var(--panel-bg);
    padding: 1rem 1.5rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px var(--shadow);
    display: none;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    z-index: 1000;
}

.add-home-popup .floating-paw {
    font-size: 1.5rem;
}

/* Responsive */
@media(max-width:768px) {
    .site-header {
        padding: 0.5rem 0.6rem;
    }

    .site-logo {
        width: 140px;
    }

    .menu-toggle {
        font-size: 1.3rem;
        padding: 0.2rem 0.4rem;
    }

    .side-menu {
        width: 100%;
        padding: 1rem;
    }

    .main-content,
    .main-box {
        margin-top: 120px;
    }

    .hero h1 {
        font-size: 2rem;
    }
}
