/* --- IMPORTS --- */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@700&display=swap');

@import url('components/nav.css');
@import url('components/card.css');
@import url('components/forms.css');
@import url('components/modal.css');
@import url('pages/homepage.css');
@import url('pages/lounge.css');
@import url('pages/polls.css');
@import url('pages/blurbs.css');
@import url('pages/profile.css');
@import url('pages/admin.css');
@import url('pages/game.css');
@import url('pages/messages.css');
@import url('pages/notifications.css');
@import url('pages/magic-shop.css');

/* --- NEW: Animated Property for Highlighted Link --- */
@property --gradient-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

/* --- GLOBAL VARIABLES --- */
:root {
    --bg-gradient: #f1c6c4;/*linear-gradient(55deg, #f1c6c4, #f7b2af);*/
    --text-color: #333;
    --nav-text-color: #555;
    --nav-hover-bg: #ffc1d3;
    --nav-hover-text: white;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --danger-color: #e74c3c;
    --danger-hover-color: #c0392b;
    --card-bg: #f7efda;
    --border-color: rgba(255, 255, 255, 1.0);
    --title-pill-bg: rgba(255, 255, 255, 0.80);
    --title-pill-text: #f872c3;/*#c74da8;*/
    --shoutout-highlight: rgba(255, 255, 255, 0.7);
    --shoutout-lowlight: rgba(50, 50, 50, 0.25);
    --completed-color: #008844;
    --accent-pink: #e97a9b;
    --banner-glow-color: #f872c3;
    --border-anim-color-1: #e97a9b; /* Base pink */
    --border-anim-color-2: #e97a9b; /* Lighter pink */
}

html.dark-mode body {
    --bg-gradient: #0e060f;/*linear-gradient(135deg, #1b0e27, #20092b)*/;
    --text-color: #e6ddeb;
    --nav-text-color: #c9bacc;
    --nav-hover-bg: #97588c;
    --nav-hover-text: #fff;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --danger-color: #ff6b6b;
    --danger-hover-color: #e43d3d;
    --card-bg: #251427;
    --border-color: rgba(255, 255, 255, 0.1);
    --title-pill-bg: rgba(0, 0, 0, 0.2);
    --title-pill-text: #e6ddeb;
    --shoutout-highlight: rgba(0, 0, 0, 0.25);
    --shoutout-lowlight: rgba(255, 255, 255, 0.15);
    --completed-color: #00ff80;
    --accent-pink: #ff8dd1;
    --banner-glow-color: var(--accent-pink);
    --border-anim-color-1: #53205f;   /* Base purple */
    --border-anim-color-2: #53205f; /* Lighter purple */
    /*background-image: url('../dark-pattern.png');*/ /* Corrected path */
}


/* --- BASE STYLES --- */
html {
    background-color: #1b0e27; 
}

html.dark-mode {
    color-scheme: dark;
}

body {
    font-family: 'Nunito', sans-serif;
    text-align: center;
    margin: 0;
    padding: 20px 0;
    background: var(--bg-gradient); 
    color: var(--text-color);
    min-height: 100vh;
    box-sizing: border-box;
    transition: background 0.3s ease, color 0.3s ease;
    /*background-image: url('../light-pattern.png');*/ /* Corrected path */
    background-repeat: repeat;
    background-attachment: fixed;
    background-size: 500px;
}

main {
    margin-left: auto;
    margin-right: auto;
}

body.modal-open {
    overflow: hidden;
}

#app-wrapper {
    width: 100%;
    overflow-x: clip;
    padding: 0 20px;
    box-sizing: border-box;
}

@media (max-width: 1062px) {
    #app-wrapper {
        padding: 0 10px;
    }
}

@media (min-width: 901px) {
    body {
        padding-top: 10; 
        padding-bottom: 20px; /* Adds space at the bottom so the pattern shows */
    }
}


/* --- GLOBAL HELPERS & MISC COMPONENTS --- */
.admin-only {
    display: none;
}

#maintenance-mode-banner {
    background-color: #e74c3c;
    color: white;
    font-weight: 700;
    text-align: center;
    padding: 10px;
    position: sticky;
    top: 0;
    z-index: 9999;
    width: 100%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

#mini-stream-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 400px;
    box-shadow: 0 8px 30px var(--shadow-color);
    z-index: 100;
    border-radius: 15px;
}

#mini-stream-embed {
    width: 100%;
    height: 225px;
    border-radius: 15px;
    overflow: hidden;
}

#mini-stream-close-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 30px;
    height: 30px;
    background-color: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-color);
    font-size: 20px;
    font-weight: bold;
    line-height: 26px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    z-index: 101;
}

#mini-stream-close-btn:hover {
    background-color: #ff8dd1;
    color: white;
    transform: scale(1.1);
}

#cloud-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.cloud-wrapper {
    position: absolute;
    animation-name: moveCloud;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.background-cloud-image {
    width: 100%;
    height: 100%;
}

.cloud-text {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70%;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    color: #4c3a5b;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.7);
    text-align: center;
    font-size: calc(var(--cloud-size-vw, 10) * 0.072vw);
    line-height: 1.2;
    word-break: break-word;
    user-select: none;
}

@keyframes moveCloud {
    from {
        transform: translateX(110vw);
    }

    to {
        transform: translateX(calc(-100vw - 100%));
    }
}

/* --- OBS MODE --- */
body.obs-mode {
    background: transparent !important;
    margin: 0;
    padding: 0;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

html.obs-mode {
    background: transparent !important;
}

body.obs-mode #obsCanvas {
    position: relative;
    aspect-ratio: 16 / 9;
    max-width: 100%;
    max-height: 100%;
}