/* ================================================= */
/* ROOT VARIABLES */
/* ================================================= */

:root {
    --twitch-purple: #9146FF;
    --twitch-dark: #18181b;
    --bg-gray: #323233;
    --sidebar-width: 280px;
}

/* ================================================= */
/* GLOBAL RESET */
/* ================================================= */

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;

    /* Base Background (USED SITE-WIDE) */
    background: linear-gradient(
                    rgba(0, 0, 0, 0.7),
                    rgba(0, 0, 0, 0.7)
                ),
                url('https://nitthenat.com/image/offline');

    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;

    min-height: 100vh;
}

/* ================================================= */
/* SIDEBAR */
/* ================================================= */

.sidebar {
    height: 100%;
    width: var(--sidebar-width);
    position: fixed;
    z-index: 2000;
    top: 0;
    left: 0;
    background-color: var(--twitch-dark);
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding-top: 20px;
    box-shadow: 5px 0 15px rgba(0,0,0,0.5);
}

.sidebar.active {
    transform: translateX(0);
}

.sidebar-header {
    display: flex;
    justify-content: flex-end;
    padding: 10px 20px;
}

.close-menu {
    color: white;
    font-size: 24px;
    cursor: pointer;
    background: none;
    border: none;
}

.nav-content {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.sidebar a,
.dropdown-btn {
    padding: 15px 25px;
    text-decoration: none;
    font-size: 1.1rem;
    color: white;
    display: block;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease;
    box-sizing: border-box; 
}

.sidebar a:hover,
.dropdown-btn:hover {
    background-color: var(--twitch-purple);
}

.dropdown-container {
    max-height: 0;
    overflow: hidden;
    background-color: #26262c;
    transition: max-height 0.3s ease-out;
}

.dropdown-container a {
    padding-left: 50px;
    font-size: 0.95rem;
}

.fa-caret-down {
    float: right;
    margin-top: 5px;
    transition: transform 0.3s ease;
}


.sidebar {
    display: flex;
    flex-direction: column;
}

.nav-content {
    flex: 1; /* pushes watermark to bottom */
}

.sidebar-watermark {
    position: absolute;
    bottom: 30px;
    left: 0;
    width: 100%;
    text-align: center;

    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.2);
    letter-spacing: 1px;

    user-select: none;
    pointer-events: none;
}
/* ================================================= */
/* MENU BUTTON */
/* ================================================= */

.menu-btn {
    position: fixed;
    top: 15px;
    left: 15px;
    font-size: 20px;
    color: white;
    background: var(--twitch-purple);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 10px;
    cursor: pointer;
    z-index: 1900;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-btn:active {
    transform: scale(0.9);
}

#overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1950;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(2px);
}

/* ================================================= */
/* PAGE WRAPPER (DEFAULT CENTERING) */
/* ================================================= */

.page-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 20px 40px;
    min-height: 100vh;
    box-sizing: border-box;
}

/* ================================================= */
/* HOME PAGE (PROFILE CARD) */
/* ================================================= */

.profile-card {
    background: rgba(41, 40, 40, 0.95);
    width: 100%;
    max-width: 450px;
    border-radius: 16px;
    border: 2px solid var(--twitch-purple);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    text-align: center;
    padding-bottom: 30px;
    backdrop-filter: blur(5px);
}
.live-card {
    color: white;
    background: rgba(41, 40, 40, 0.95);
    max-width: 450px;
    border-radius: 16px;
    border: 2px solid var(--twitch-purple);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    text-align: center;
    backdrop-filter: blur(5px);
    margin-bottom: 25px;
}
.live-card h1 {
    padding: 25px;
    margin: 0;
    color: inherit;
    text-decoration: none;
}
.live-card h1 a {
    color: inherit;
    text-decoration: none;
}

.header-banner {
    background-color: var(--twitch-purple);
    padding: 30px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    color: white;
}

.profile-pic {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    border: 3px solid white;
    background: #222;
}

.header-text h1 {
    margin: 0;
    font-size: 1.8rem;
    text-align: left;
}

.header-text p {
    margin: 0;
    opacity: 0.9;
    font-size: 1rem;
    text-align: left;
}

.tag-container {
    padding: 20px 20px 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.tag {
    background: #f0e6ff;
    color: var(--twitch-purple);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid var(--twitch-purple);
}

.bio {
    padding: 0 30px;
    color: var(--twitch-purple);
    font-weight: bold;
    line-height: 1.5;
    font-size: 0.95rem;
}

.social-links {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-icon {
    width: 45px;
    height: 45px;
    background: var(--twitch-purple);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.2rem;
    transition: transform 0.2s, background 0.2s;
}

.social-icon:hover {
    transform: translateY(-3px);
    background: #772ce8;
}


/* ================================================= */
/* RESPONSIVE */
/* ================================================= */

@media (max-width: 600px) {

    .hero-banner h1 {
        font-size: 1.8rem;
    }

    .content-panel {
        padding: 30px 20px;
    }
    form {
        padding: 25px;
    }

    form input,
    form select {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* ================================================= */
/* URL SHORTENER */
/* ================================================= */

.shortener-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.shortener-card {
    background: rgba(41, 40, 40, 0.95);
    width: 100%;
    max-width: 500px;
    padding: 40px;
    border-radius: 16px;
    border: 2px solid var(--twitch-purple);
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    color: white;
}

.shortener-card h1 {
    margin-top: 0;
    margin-bottom: 30px;
    color: var(--twitch-purple);
}

.shortener-card form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.shortener-card input {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #444;
    background: #1a1a1c;
    color: white;
    font-size: 1rem;
}

.shortener-card input:focus {
    outline: none;
    border-color: var(--twitch-purple);
}

.shortener-card button {
    padding: 12px;
    border-radius: 8px;
    border: none;
    background: var(--twitch-purple);
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

.shortener-card button:hover {
    background: #772ce8;
}

.shortener-card button:active {
    transform: scale(0.95);
}

.result-box {
    margin-top: 25px;
    padding: 15px;
    background: #1a1a1c;
    border-radius: 10px;
    border: 1px solid var(--twitch-purple);
}

.result-box a {
    color: var(--twitch-purple);
    font-weight: bold;
    word-break: break-all;
}

/* ================================================= */
/* 404 PAGE */
/* ================================================= */

.error-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.error-card {
    background: rgba(41, 40, 40, 0.95);
    width: 100%;
    max-width: 500px;
    padding: 50px 40px;
    border-radius: 20px;
    border: 2px solid var(--twitch-purple);
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    color: white;
}

.error-card h1 {
    font-size: 4rem;
    margin: 0;
    color: var(--twitch-purple);
}

.error-card h2 {
    margin-top: 10px;
    margin-bottom: 20px;
}

.error-card p {
    color: #d1d1d1;
    margin-bottom: 30px;
}

.error-button {
    display: inline-block;
    margin: 10px;
    padding: 12px 25px;
    border-radius: 8px;
    background: var(--twitch-purple);
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.2s ease, transform 0.1s ease;
}

.error-button:hover {
    background: #772ce8;
}

.error-button:active {
    transform: scale(0.95);
}

.error-button.secondary {
    background: #333;
    border: 1px solid var(--twitch-purple);
}