/* ========================================================================== 
   CSS Variables & Theme Settings
   ========================================================================== */
:root {
    /* Primary Colors */
    --primary-blue: #3291cf;
    --header-gradient: linear-gradient(90deg, #3291cf, #144c6e);

    /* Glassmorphism Colors */
    --glass-bg: rgb(255, 255, 255);
    --glass-border: rgba(255, 255, 255, 0.3);

    /* Light Theme Colors */
    --light-bg: #ffffff;
    --light-text: #333;
    --secondary-bg: #f8f9fc;
    --sidebar-bg: #f1f4f8;
    --footer-bg: #f1f4f8;
    --border-color: #e0e0e0;
}

/* Dark Theme Overrides */
@media (prefers-color-scheme: dark) {
    :root {
        --light-bg: #1e1e1e;
        --light-text: #ddd;
        --secondary-bg: #2b2b2b;
        --sidebar-bg: #2b2b2b;
        --footer-bg: #2b2b2b;
        --border-color: #444;
        --glass-bg: rgba(30, 30, 30, 0.87);
        --glass-border: rgba(255, 255, 255, 0.1);
    }
}

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

html {
    font-size: 16px;
    font-family: Arial, sans-serif;
    background-color: var(--secondary-bg);
    -webkit-font-smoothing: antialiased;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-image: url('abstract.001.png');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    padding: 20px;
    position: relative;
}

/* ========================================================================== 
   Links & Typography 
   ========================================================================== */
a, a:visited {
    text-decoration: none;
    color: inherit;
}

a:hover, a:active {
    text-decoration: underline;
}

/* ========================================================================== 
   Background Overlay 
   ========================================================================== */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.2);
    pointer-events: none;
    z-index: -1;
}

@media (prefers-color-scheme: dark) {
    body::before {
        background: rgba(0, 0, 0, 0.3);
    }
}

/* ========================================================================== 
   Layout: Viewport & Glassmorphism Overlay
   ========================================================================== */
#viewport {
    width: 100%;
    max-width: 1200px;
    background-color: var(--glass-bg);
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    overflow: hidden;
    z-index: 20;
}

#overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    backdrop-filter: blur(10px);
    z-index: 10;
}

/* ========================================================================== 
   Header Section
   ========================================================================== */
#header {
    background: var(--header-gradient);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
}

#header #logo {
    width: 50px;
    height: auto;
}

#header h1 {
    color: #fff;
    font-size: 2.5rem;
}

/* ========================================================================== 
   Main Content Area
   ========================================================================== */
#content {
    padding: 30px;
}

#main {
    flex: 3;
    padding: 10px;
    border-radius: 10px;
}

#main h2 {
    margin-bottom: 15px;
    color: var(--primary-blue);
    font-size: 2rem;
}

#main p {
    line-height: 1.6;
    font-size: 1rem;
    color: var(--light-text);
}

/* ========================================================================== 
   Panels & Components
   ========================================================================== */
.panel {
    display: flex;
    flex-wrap: wrap;
}

.bait {
    display: none !important;
}

.spinner-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.spinner {
    height: 50px;
    margin-top: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.spinner img {
    width: 150px;
    height: 150px;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================================================== 
   Form Styling
   ========================================================================== */
form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

/* Optional scrollable container for longer forms */
.form-container {
    height: 525px;
    overflow-y: auto;
    color: var(--light-text);
}

label {
    margin-top: 15px;
    margin-bottom: 3px;
    color: var(--light-text);
}

input, textarea {
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    resize: vertical;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 5px rgba(50, 145, 207, 0.5);
}

.submit-button {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    background-color: var(--primary-blue);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-button:hover {
    background-color: #2777a9;
}

/* ========================================================================== 
   Footer Section
   ========================================================================== */
#footer {
    background-color: var(--footer-bg);
    padding: 15px;
    text-align: right;
    border-top: 1px solid var(--border-color);
}

#footer p {
    color: var(--light-text);
    font-size: 0.9rem;
}

.mobile-footer {
    color: var(--light-text);
    font-size: 0.9rem;
    text-align: center;
    padding: 15px;
    display: none;
}

/* ========================================================================== 
   Responsive Adjustments
   ========================================================================== */
@media (max-width: 768px) {
    .panel {
        flex-direction: column;
    }

    #sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
}

@media (max-width: 425px) {
    #header h1 {
        font-size: 2rem;
    }

    #main h2 {
        font-size: 1.8rem;
    }

    body {
        padding: 0px;
        align-items: stretch;
    }

    #footer {
        display: none;
    }

    .mobile-footer {
        display: block;
    }
}
