/* =====================================================
   VAULT V11 - Frogiee-Style Design System
   Complete Recreation with Pink/Cyan Accent Theme
   ===================================================== */

/* Local Fonts - Satoshi */
@font-face {
    font-family: 'Satoshi';
    src: url('/assets/fonts/Satoshi-Variable.woff2') format('woff2');
    font-weight: 300 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Satoshi';
    src: url('/assets/fonts/Satoshi-VariableItalic.woff2') format('woff2');
    font-weight: 300 900;
    font-style: italic;
    font-display: swap;
}

/* =====================================================
   CSS Variables
   ===================================================== */
:root {
    /* Background Colors */
    --bg-primary: rgb(14, 14, 14);
    --bg-secondary: rgba(29, 29, 29, 0.7);
    --bg-tertiary: #1a1a1a;
    --bg-input: #080808;
    --bg-overlay: rgba(0, 0, 0, 0.42);
    
    /* Accent Colors - Pink Theme for Vault */
    --accent-primary: #ff6b9d;
    --accent-secondary: #ff8fb3;
    --accent-glow: #ff6b9d;
    --accent-shadow: 0 0 10px #ff6b9d, 0 0 20px #ff6b9d, 0 0 30px #ff6b9d;
    --accent-shadow-light: 0 0 5px #ff6b9d, 0 0 15px #ff6b9d, 0 0 25px #ff6b9d;
    
    /* Secondary Accent - Discord Purple */
    --accent-discord: #6842ff;
    --accent-discord-glow: #5c74ff;
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-link: #67a1ff;
    --text-link-hover: #b8ffcd;
    
    /* Border Colors */
    --border-primary: #3b3b3b;
    --border-accent: #ff6b9d;
    --border-input: #141414;
    
    /* Status Colors */
    --success: #00ff9d;
    --warning: #ffc107;
    --danger: #e74c3c;
    
    /* Spacing */
    --header-height: 56px;
    --footer-height: 50px;
    --nav-width: 30%;
    --nav-max-width: 1600px;
    
    /* Typography - Satoshi */
    --font-primary: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-bold: 'Satoshi', sans-serif;
    
    /* Transitions */
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.2s ease;
    --transition-slow: 0.4s ease-in;
    
    /* Z-Index Layers */
    --z-background: 1;
    --z-fade: 2;
    --z-content: 10;
    --z-sidebar: 7777;
    --z-frame: 7777;
    --z-header: 9998;
    --z-popup: 9999;
    --z-loading: 10000;
}

/* =====================================================
   Base Styles
   ===================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    font-family: var(--font-primary);
    font-weight: 500;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    cursor: default;
}

/* =====================================================
   Typography
   ===================================================== */
h1 {
    font-family: var(--font-bold);
    font-weight: 700;
    font-size: 40px;
}

h2 {
    font-family: var(--font-bold);
    font-weight: 700;
    font-size: 1.5rem;
}

h3, h4 {
    font-family: var(--font-bold);
    font-weight: 600;
}

h5, h6 {
    font-family: var(--font-bold);
    font-weight: 600;
}

p {
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: large;
    color: var(--text-secondary);
}

/* =====================================================
   Links
   ===================================================== */
a {
    color: var(--text-link);
    text-decoration: none;
    transition: var(--transition-normal);
    text-underline-offset: 10000px;
}

a:hover {
    color: var(--text-link-hover);
    cursor: pointer;
}

/* =====================================================
   Custom Scrollbar
   ===================================================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 20px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-secondary);
}

/* Text Selection */
::selection {
    background-color: var(--accent-primary);
    color: var(--bg-primary);
}

/* =====================================================
   Loading Screen
   ===================================================== */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #121212;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: var(--z-loading);
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#loading-screen h1 {
    font-size: 24px;
    font-family: var(--font-bold);
    font-weight: 700;
    margin: 0;
}

#loadingbar {
    bottom: 0;
    height: 5px;
    width: 0%;
    position: absolute;
    z-index: var(--z-loading);
    background-color: var(--accent-primary);
    transition: all 0.3s ease-in-out;
    left: 0;
}

#dabottom {
    bottom: 130px;
    position: fixed;
}

#dabottom a {
    cursor: pointer;
}

/* Spinner Animation */
.spinner {
    width: 17.6px;
    height: 17.6px;
    animation: spinner-rotate 1.4s infinite linear;
}

.spinner div {
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--accent-primary);
    border-radius: 50%;
    animation: spinner-bounce 1.75s infinite ease;
}

.spinner div:nth-child(1) { --rotation: 90; }
.spinner div:nth-child(2) { --rotation: 180; }
.spinner div:nth-child(3) { --rotation: 270; }
.spinner div:nth-child(4) { --rotation: 360; }

@keyframes spinner-bounce {
    0%, 100% {
        transform: rotate(calc(var(--rotation) * 1deg)) translateY(0);
    }
    50% {
        transform: rotate(calc(var(--rotation) * 1deg)) translateY(300%);
    }
}

@keyframes spinner-rotate {
    to {
        transform: rotate(360deg);
    }
}

/* =====================================================
   Header Navigation
   ===================================================== */
#header {
    position: fixed;
    top: 6.5px;
    left: 50%;
    backdrop-filter: blur(3px);
    background-color: var(--bg-secondary);
    border: 0px solid var(--accent-primary);
    transform: translateX(-50%);
    transition: var(--transition-slow);
    width: var(--nav-width);
    max-width: var(--nav-max-width);
    display: flex;
    justify-content: space-between;
    text-align: center;
    overflow: clip;
    color: var(--text-primary);
    padding: 7px 16px;
    z-index: var(--z-header);
    border-radius: 20px;
}

#header .right {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* =====================================================
   Footer Navigation
   ===================================================== */
#footer {
    position: fixed;
    bottom: 6.5px;
    left: 50%;
    backdrop-filter: blur(3px);
    background-color: var(--bg-secondary);
    border: 0px solid var(--accent-primary);
    transform: translateX(-50%);
    transition: var(--transition-slow);
    width: var(--nav-width);
    max-width: var(--nav-max-width);
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    overflow: hidden;
    color: var(--text-primary);
    padding: 7px 12px;
    z-index: var(--z-header);
    border-radius: 20px;
}

#footer .right {
    display: flex;
    align-items: center;
    gap: 4px;
}

#online {
    font-family: var(--font-primary);
    font-size: smaller;
    font-weight: 700;
    color: var(--text-secondary);
}

/* =====================================================
   Header/Footer Icons
   ===================================================== */
.headericons {
    width: 35px;
    height: 35px;
    border-radius: 15px;
    transition: var(--transition-normal);
    border: 5px solid transparent;
    cursor: pointer;
    object-fit: contain;
}

.headericons:hover {
    border: 5px solid transparent;
    transform: scale(1.1);
    filter: brightness(1.3);
}

/* Logo styling */
.headericons[alt="Logo"],
.logo-icon {
    filter: none;
}

.headericons[alt="Logo"]:hover,
.logo-icon:hover {
    filter: brightness(1.2);
}

/* =====================================================
   Main Content Boxes
   ===================================================== */
#roddyricchboxhome {
    overflow: clip;
    text-align: center;
    z-index: var(--z-content);
    position: fixed;
    justify-content: center;
    border-radius: 15px;
    transform: translateX(-50%);
    left: 50vw;
    top: 25vh;
    width: 100vw;
    height: 100vh;
    padding: 20px;
}

#roddyricchboxselect {
    text-align: center;
    z-index: var(--z-content);
    position: relative;
    padding-top: 60px;
    min-height: 100vh;
}

#maintitle {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

/* =====================================================
   Buttons
   ===================================================== */
button {
    background-color: var(--bg-tertiary);
    height: 70px;
    outline: none;
    border: solid 5px var(--border-primary);
    color: var(--text-primary);
    font-family: var(--font-bold);
    font-weight: 600;
    font-size: 1.2em;
    border-radius: 15px;
    transition: var(--transition-fast);
    cursor: pointer;
    margin: 10px;
    padding: 0 20px;
}

button:hover {
    background-color: rgba(255, 107, 157, 0.3);
    border: solid 5px var(--accent-primary);
    box-shadow: var(--accent-shadow);
}

button:active {
    transform: scale(0.8);
}

button:disabled {
    cursor: not-allowed;
    background-color: var(--bg-primary);
    border: solid 5px #292929;
    transform: scale(1);
    box-shadow: none;
}

.smallbutton {
    width: 150px;
    height: 50px;
    font-size: 0.8em;
}

/* Discord Style Button */
#discord:hover {
    background-color: var(--accent-discord);
    border: solid 5px var(--accent-discord-glow);
    box-shadow: 0 0 10px var(--accent-discord-glow), 0 0 20px var(--accent-discord-glow), 0 0 30px var(--accent-discord-glow);
}

/* =====================================================
   Game/App Images
   ===================================================== */
img {
    max-width: 100%;
    height: auto;
}

.game-img, .app-img {
    width: 180px;
    height: 180px;
    border-radius: 15px;
    transition: var(--transition-normal);
    border: 5px solid transparent;
    cursor: pointer;
    object-fit: cover;
}

.game-img:hover, .app-img:hover {
    transform: scale(1.15);
    border: 5px solid var(--accent-primary);
}

/* Quick Apps (smaller icons) */
.quickapps {
    width: 75px;
    height: 75px;
    border-radius: 15px;
    transition: var(--transition-normal);
    border: 5px solid transparent;
    cursor: pointer;
    object-fit: cover;
}

.quickapps:hover {
    transform: scale(1.2);
    border: 5px solid var(--accent-primary);
}

/* =====================================================
   Form Inputs
   ===================================================== */
input[type="text"],
input[type="url"],
input[type="username"],
input {
    font-family: var(--font-bold);
    font-weight: 700;
    font-size: 1.2em;
    padding: 15px 20px;
    margin: 10px;
    background-color: var(--bg-input);
    color: var(--text-primary);
    border: 3px solid var(--border-input);
    min-width: 40px;
    border-radius: 30px;
    cursor: text;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    z-index: var(--z-popup);
    transition: var(--transition-normal);
    text-align: center;
    width: 300px;
}

input:hover {
    border: 3px solid var(--accent-primary);
}

input:focus-visible,
input:focus {
    border: 3px solid var(--accent-primary);
    outline: none;
    width: 500px;
    box-shadow: var(--accent-shadow-light);
}

input:focus-visible {
    text-align: left;
}

/* Select Dropdowns */
select {
    font-family: var(--font-bold);
    font-weight: 700;
    font-size: 1.2em;
    padding: 15px 10px;
    margin: 10px;
    background-color: var(--bg-input);
    color: var(--text-primary);
    border: 3px solid var(--border-input);
    min-width: 40px;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: var(--transition-normal);
    text-align: center;
    width: 200px;
}

select:hover {
    border: 3px solid var(--accent-primary);
}

select:focus-visible,
select:focus {
    border: 3px solid var(--accent-primary);
    outline: none;
    box-shadow: var(--accent-shadow-light);
}

/* =====================================================
   Settings Page
   ===================================================== */
#settings {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 20px;
    width: 100vw;
    text-align: center;
    position: relative;
    left: -8px;
    gap: 10px;
    padding: 0 20px;
}

.setting-card {
    border: 3px solid var(--accent-primary);
    background-color: rgba(58, 58, 58, 0.18);
    backdrop-filter: blur(3px);
    padding: 20px;
    border-radius: 10px;
    min-width: 250px;
    flex: 1;
    max-width: calc(33.33% - 20px);
}

.setting-card h2 {
    margin-bottom: 15px;
}

.setting-card .buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.setting-card button {
    height: 50px;
    font-size: 1em;
}

.setting-card input {
    width: 200px;
}

.setting-card input:focus {
    width: 200px;
}

/* =====================================================
   Game/App Grid
   ===================================================== */
#mathworksheets,
.content-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* =====================================================
   iframe Frame
   ===================================================== */
#frame {
    position: fixed;
    top: 0.3%;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: var(--z-frame);
}

#frameframe {
    position: fixed;
    width: 76vw;
    height: 74vh;
    overflow: hidden;
}

#frameframe iframe {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
    left: 49%;
    top: -3%;
    position: absolute;
    transform: translateX(-50%);
    border: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Sidebar Controls */
.sidebar {
    position: absolute;
    top: 47%;
    right: -1.6%;
    transform: translateY(-50%);
    backdrop-filter: blur(3px);
    background-color: var(--bg-secondary);
    border: 0px solid var(--accent-primary);
    width: 2vw;
    height: 27vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    text-align: center;
    color: var(--text-primary);
    z-index: var(--z-sidebar);
    border-top-right-radius: 1vw;
    border-bottom-right-radius: 1vw;
    padding: 10px 0;
}

.sidebar img {
    width: 2vw;
    height: 3vh;
    cursor: pointer;
    transition: var(--transition-normal);
}

.sidebar img:hover {
    transform: scale(1.2);
    filter: brightness(1.3);
}

/* =====================================================
   Background Layers
   ===================================================== */
#teacher-setup-dialogs-container {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: 49% 50%;
    position: fixed;
    top: 0px;
    left: 0;
    z-index: var(--z-background);
    filter: drop-shadow(0px 0px 3px #ffffff);
}

#lowtaperfade {
    width: 100%;
    height: 100%;
    background: linear-gradient(var(--bg-primary), #0c0c0c00);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: 50% 50%;
    left: 0;
    position: fixed;
    top: 0px;
    z-index: var(--z-fade);
}

/* Corner Image (Theme Character) */
#cornerimage {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 150px;
    height: auto;
    z-index: var(--z-content);
    pointer-events: none;
    opacity: 0.8;
}

/* =====================================================
   Popups/Modals
   ===================================================== */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-overlay);
    color: var(--text-primary);
    visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(3px);
    font-size: 2em;
    z-index: var(--z-popup);
    opacity: 0;
    transition: all 0.5s ease;
}

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

.popup-box {
    position: absolute;
    z-index: var(--z-popup);
    text-align: center;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -55%);
    border-radius: 15px;
    color: var(--text-primary);
    padding: 30px;
    line-height: 1.8;
    overflow: clip;
    border: 3px solid var(--accent-primary);
    background-color: rgba(58, 58, 58, 0.18);
    backdrop-filter: blur(3px);
    min-width: 300px;
    max-width: 500px;
}

.popup-box h5 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.popup-box h6 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 15px;
}

/* =====================================================
   Notification Toasts
   ===================================================== */
#notifs {
    position: fixed;
    z-index: var(--z-popup);
    bottom: 70px;
    right: 10px;
    display: flex;
    flex-direction: column-reverse;
    gap: 5px;
}

.notification {
    background: rgba(44, 44, 44, 0.9);
    color: var(--text-primary);
    padding: 12px 24px;
    border-radius: 10px;
    border: 3px solid var(--accent-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    font-size: 0.9rem;
    backdrop-filter: blur(5px);
}

.notification.show {
    opacity: 1;
}

/* =====================================================
   Message Box
   ===================================================== */
.message-box {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-secondary);
    border: 2px solid var(--accent-primary);
    border-radius: 15px;
    padding: 15px 30px;
    z-index: var(--z-popup);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.message-box.show {
    opacity: 1;
    visibility: visible;
}

/* =====================================================
   Search Results
   ===================================================== */
.no-results {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

/* =====================================================
   Anti-Deledao Overlay
   ===================================================== */
#antideledao {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 76vw;
    height: 74vh;
    background: url("/assets/noise.png");
    opacity: 0.55;
    pointer-events: none;
    z-index: var(--z-popup);
    display: none;
}

/* =====================================================
   Responsive Design
   ===================================================== */
@media (max-width: 1200px) {
    #header, #footer {
        width: 50%;
    }
    
    .setting-card {
        max-width: calc(50% - 20px);
    }
}

@media (max-width: 900px) {
    #header, #footer {
        width: 70%;
    }
    
    .setting-card {
        max-width: 100%;
    }
    
    .game-img, .app-img {
        width: 140px;
        height: 140px;
    }
    
    input:focus-visible,
    input:focus {
        width: 350px;
    }
}

@media (max-width: 600px) {
    #header, #footer {
        width: 90%;
    }
    
    h1 {
        font-size: 28px;
    }
    
    #maintitle {
        font-size: 1.8rem;
    }
    
    .game-img, .app-img {
        width: 100px;
        height: 100px;
    }
    
    .quickapps {
        width: 55px;
        height: 55px;
    }
    
    input {
        width: 250px;
        font-size: 1em;
    }
    
    input:focus-visible,
    input:focus {
        width: 280px;
    }
    
    #frameframe {
        width: 95vw;
        height: 80vh;
    }
    
    .sidebar {
        width: 40px;
        height: 150px;
        right: 0;
    }
}

/* =====================================================
   Utilities
   ===================================================== */
.hidden {
    display: none !important;
}

.invisible {
    visibility: hidden !important;
    opacity: 0 !important;
}

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }

/* =====================================================
   Particle Canvas
   ===================================================== */
#particles-canvas {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-background);
    pointer-events: none;
}

/* =====================================================
   UNIVERSAL GAME/APP CARD COMPONENT
   Used by games.html and apps.html
   ===================================================== */

/* Game/App Grid Container */
#mathworksheets,
#appcontainer {
    text-align: center;
    padding: 20px 10px;
}

/* Game/App Card Images - EXACT Frogiee specs with PINK theme */
#mathworksheets img,
#appcontainer img {
    width: 180px;
    height: 180px;
    border-radius: 15px;
    transition: ease .2s;
    border: 5px solid transparent;
    cursor: pointer;
    object-fit: cover;
    margin: 5px;
}

#mathworksheets img:hover,
#appcontainer img:hover {
    transform: scale(1.2);
    transition: ease .2s;
    border: 5px solid var(--accent-primary);
    box-shadow: var(--accent-shadow-light);
}

/* Search Input - Universal styling with PINK theme */
#teachertouchbar {
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 1.2em;
    padding: 15px 5px;
    margin: 10px;
    background-color: var(--bg-input);
    color: var(--text-primary);
    border: 3px solid var(--border-input);
    min-width: 40px;
    border-radius: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    transition: all .2s ease-in-out;
    text-align: center;
    width: 300px;
}

#teachertouchbar:hover {
    border: 3px solid var(--accent-primary);
}

#teachertouchbar:focus {
    border: 3px solid var(--accent-primary);
    outline: none;
    width: 600px;
    box-shadow: var(--accent-shadow-light);
}

/* Title styling for games/apps pages */
#title {
    font-family: var(--font-bold);
    font-weight: 700;
    font-size: 40px;
}

/* End message */
.end-message {
    color: var(--text-secondary);
    margin-top: 40px;
    margin-bottom: 100px;
    font-family: var(--font-primary);
}

