@charset "UTF-8";

/* ===================== Root Variables ===================== */
:root {
    /* Override Bootstrap Colors with Custom Theme */
    --bs-primary: #5c63d3;
    --bs-secondary: #2e3880;
    --bs-success: #28a745;
    --bs-info: #5c63d3;
    --bs-warning: #ffc107;
    --bs-danger: #dc3545;
    --bs-light: #f8f9fa;
    --bs-dark: #0b0c14;
    --bs-body-bg: #0b0c14;
    --bs-body-color: #ffffff;
    --bs-border-color: #3b4175;

    /* Custom Theme Colors */
    --input-bg: #161822;
    --input-focus-bg: #151621;
    --header-color: #ffffff;
    --alt-header: #dce0e9;
    --sub-heading: #939db8;
    --link-color: #5c63d3;
    --alt-link-color: #c9d3ee;
    --label-bg: #17192a;
    --card-bg: #151621;
    --icon-color: #9da7f2;
    --alt-icon: #7d82ff;
    --card-border: #272b3a;
    --border-radius: 10px;

    /* Typography */
    --font-family-sans-serif:
        system-ui, "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI",
        "Helvetica Neue", Arial, sans-serif;
    --font-size-base: 10px;
    --line-height-base: 1.5;
}

/* ===================== Global Styles ===================== */
body,
html {
    font-family: var(--font-family-sans-serif);
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    letter-spacing: 0.4px;
    font-size: calc(var(--font-size-base) * 1.3);
}

.masonry-grid {
    column-count: 4; /* Adjust this number for the desired number of columns */
    column-gap: 1.5rem; /* Gap between the columns */
    padding: 1rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--header-color);
    margin-bottom: 8px;
}

h1 {
    font-size: 540%;
}

h2 {
    font-size: 400%;
}

h3 {
    font-size: 320%;
}

h4 {
    font-size: 240%;
}

h5 {
    font-size: 200%;
    font-weight: 600;
}

h6 {
    font-size: 140%;
    font-weight: 600;
}

p,
label {
    color: var(--sub-heading);
}

.lead {
    font-size: 150%;
}

a {
    color: var(--link-color);
    text-decoration: none;
}
a:hover {
    color: var(--alt-icon);
}

/* ===================== Component Adjustments ===================== */

/* Navbar */
.navbar {
    border-bottom: 1px solid var(--card-border);
    padding: 22px;
    letter-spacing: 0.8px;
}
.navbar img {
    max-width: 90px;
}
.navbar a {
    color: var(--alt-link-color) !important;
}
.navbar a:hover,
.navbar a:active,
.navbar a:focus {
    color: var(--bs-body-color) !important;
}
.navbar .btn-primary {
    background-color: var(--bs-primary);
    color: var(--bs-body-color) !important;
    border: none;
    height: 36px !important;
    font-size: 100%;
}
.navbar .btn-primary:hover {
    background-color: var(--bs-primary);
}

.navbar ul {
    font-size: 100%;
}

section {
    padding: 60px 0 60px;
}

section .section-discover-more-link {
    color: var(--bs-body-color) !important;
    font-weight: 600;
    font-size: 125%;
    border: 2px solid var(--bs-body-color);
    border-radius: 12px;
    padding: 8px 12px;
    opacity: 0.7;
}

/* Hero Section with Gradient */
.hero-section {
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.05),
        var(--bs-dark)
    );
    padding: 120px 0 60px;
}

/* Cards */
.card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.card h5 {
    color: var(--header-color);
    font-size: 125%;
    width: 100%;
    display: flex;
    margin-top: 36px;
    margin-bottom: 10px;
}
.card p {
    color: var(--sub-heading);
    font-size: 110%;
}
.card-title {
    min-height: 52px;
}
.card-text {
    min-height: 110px;
}

.card-label {
    background-color: var(--input-bg);
    color: var(--bs-primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 75%;
    cursor: pointer;
    border: 1px solid var(--bs-primary);
    padding: 2px 4px;
    opacity: 0.5;
    color: var(--sub-heading);
    margin-right: 2px;
    margin-left: 2px;
}

a.card-comments {
    color: var(--sub-heading);
    height: 46px;
    align-content: center;
}

a.card-comments:hover {
    color: var(--header-color);
}

.card-date {
    color: var(--sub-heading);
    opacity: 0.5;
    text-align: right;
    margin-bottom: 14px;
    margin-top: 14px;
    float: right;
}

.card-avatar {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    float: left;
}

.card-avatar img {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid var(--bs-primary);
    padding: 2px;
}

.card-name {
    color: var(--bs-body-color) !important;
    display: flex;
    font-size: 125% !important;
    text-align: left;
    padding-left: 12px;
    font-weight: 600;
    padding-top: 10px;
}

.card-name,
a:hover,
a:focus,
a:active {
    text-decoration: none;
}
.card-nickname {
    color: var(--bs-body-color);
    opacity: 0.5;
    display: flex;
    font-size: 125% !important;
    text-align: left;
    padding-left: 12px;
    font-weight: 400;
}

/* Cards */
.comment-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: inline-block; /* Necessary for masonry effect in columns */
    width: 100%; /* Makes cards responsive to column width */
}

.comment-card p {
    color: var(--sub-heading);
    font-size: 110%;
    display: inline-block; /* Necessary for masonry effect in columns */
    width: 100%; /* Makes cards responsive to column width */
}

.comment-card-text {
    min-height: 110px;
}

.comment-card-date {
    color: var(--sub-heading);
    opacity: 0.5;
    text-align: right;
    margin-bottom: 14px;
    margin-top: 14px;
    float: right;
}

.comment-card-avatar {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    float: left;
}

.comment-card-avatar img {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid var(--bs-primary);
    padding: 2px;
}

.comment-card-name {
    color: var(--bs-body-color) !important;
    display: flex;
    font-size: 125% !important;
    text-align: left;
    padding-left: 12px;
    font-weight: 600;
    padding-top: 10px;
}

.comment-card-name,
a:hover,
a:focus,
a:active {
    text-decoration: none;
}
.comment-card-nickname {
    color: var(--bs-body-color);
    opacity: 0.5;
    display: flex;
    font-size: 125% !important;
    text-align: left;
    padding-left: 12px;
    font-weight: 400;
}

/* Avatar Cloud Styling */
.avatar-cloud {
    position: relative;
    width: 100%;
    height: 500px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.avatar {
    position: absolute;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transform: translate(var(--x), var(--y));
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--bs-primary);
}

/* Hover effect for avatars */
.avatar:hover {
    transform: scale(1.03) translate(var(--x), var(--y));
    z-index: 2;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* Buttons */

.btn {
    border-radius: var(--border-radius);
    height: 46px;
    align-content: center;
}
.btn-primary {
    background-color: var(--bs-primary);
    color: var(--bs-body-color);
    border: none;
}
.btn-primary:hover,
.btn-primary:active,
.btn-primary:focus {
    background-color: var(--bs-primary) !important;
    /*border: none !important;*/
}
.btn-primary.disabled,
.btn-primary:disabled {
    color: #fff;
    opacity: 1;
    background-color: #282c54 !important;
    cursor: not-allowed;
    border: none !important;
}
.btn-outline-primary {
    color: var(--bs-primary);
    border: none;
}
.btn-outline-primary:hover,
.btn-outline-primary:active,
.btn-outline-primary:focus {
    color: var(--bs-body-color) !important;
    background-color: var(--bs-primary) !important;
}

/* Inputs and Labels */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
textarea {
    background-color: var(--input-bg);
    color: var(--bs-body-color);
    border: 1px solid var(--bs-border-color);
    border-radius: var(--border-radius);
    padding: 12px;
    width: 100%;
    font-size: 125%;
    height: 52px;
}
input::placeholder,
textarea::placeholder {
    color: var(--sub-heading);
}
.form-control:focus,
input:focus,
textarea:focus {
    outline: none !important;
    border: 2px solid var(--bs-primary) !important;
    background-color: var(--input-focus-bg) !important;
    padding-left: 11px !important;
}
.label {
    background-color: var(--label-bg);
    color: var(--bs-body-color);
    padding: 6px 12px;
    border-radius: var(--border-radius);
    font-size: 14px;
}

.form-container {
    margin: 32px auto;
    padding: 32px;
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.form-container h2 {
    margin-bottom: 16px;
    color: var(--header-color);
}
.form-container .btn-primary {
    width: 100%;
}
.form-container .lead-small {
    font-size: 120%;
    color: var(--header-color);
}

.form-btn {
    height: 52px;
}
.form-btn:hover {
    border: 2px solid var(--sub-heading);
}
.error {
    color: var(--icon-color);
    margin-bottom: 16px;
    text-align: center;
}
/* ===================== List Styling ===================== */

ul {
    font-weight: 300;
    font-size: 120%;
}

li {
    display: list-item;
    text-align: match-parent;
    color: #fff;
}

/* ===================== Icon Styling ===================== */
.icon {
    color: var(--icon-color);
    font-size: 20px;
}
.icon-alt {
    color: var(--alt-icon);
}

/* Upvote Badges */
.upvote-count {
    min-width: 46px;
    height: 46px;
    background-color: var(--input-bg);
    color: var(--bs-body-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 100%;
    cursor: pointer;
    border: 2px solid var(--bs-primary);
    float: left;
    padding: 12px;
}

/* ===================== Modal Styles ===================== */
.custom-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
}
.modal-content {
    background-color: #2e3880;
    margin: 10% auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 740px;
    position: relative;
}
.modal-content h5 {
    margin-bottom: 1.5rem;
    color: #fff;
}
.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 20px;
}
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Blurred background for modals */
.custom-modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
}

.modal-content {
    background-color: var(--card-bg);
    padding: 30px;
    position: relative;
    max-width: 740px;
    width: 100%;
}

.form-container h2 {
    margin-bottom: 16px;
    color: var(--header-color);
}

/* Input and select styling */
.form-group {
    text-align: center;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    background-color: var(--input-bg);
    color: var(--bs-body-color);
    border: 1px solid var(--bs-border-color);
    border-radius: var(--border-radius);
    margin-top: 8px;
    margin-bottom: 15px;
}

/* Button styling */
.btn-primary {
    background-color: var(--bs-primary);
    color: var(--bs-body-color);
    border-radius: var(--border-radius);
}

/* Error message styling */
.error-message {
    color: #ff5555;
    background-color: rgba(255, 85, 85, 0.1);
    border: 1px solid #ff5555;
    padding: 10px;
    border-radius: var(--border-radius);
    margin-top: 15px;
}
.hidden {
    display: none;
}

/* ===================== Responsive Utilities ===================== */
@media (max-width: 992px) {
    .masonry-grid {
        column-count: 3;
    }
    h1 {
        font-size: 400%;
    }
    h2 {
        font-size: 300%;
    }
    h3 {
        font-size: 260%;
    }
    h4 {
        font-size: 200%;
    }
    h5 {
        font-size: 200%;
        font-weight: 600;
    }
    h6 {
        font-size: 140%;
        font-weight: 600;
    }
    .lead {
        font-size: 140%;
    }
}
@media (max-width: 768px) {
    .masonry-grid {
        column-count: 2;
    }
    h1 {
        font-size: 300%;
    }
    h2 {
        font-size: 240%;
    }
    h3 {
        font-size: 200%;
    }
    h4 {
        font-size: 160%;
    }
    h5 {
        font-size: 160%;
        font-weight: 600;
    }
    h6 {
        font-size: 130%;
        font-weight: 600;
    }
    .lead {
        font-size: 140%;
    }
    .navbar {
        padding: 12px;
    }
    .card {
        padding: 12px;
        margin-bottom: 16px;
    }
    .form-container {
        padding: 24px;
    }
}
@media (max-width: 578px) {
    .masonry-grid {
        column-count: 1;
    }
    h1 {
        font-size: 240%;
    }

    h2 {
        font-size: 200%;
    }

    h3 {
        font-size: 170%;
    }

    h4 {
        font-size: 150%;
    }

    h5 {
        font-size: 150%;
        font-weight: 600;
    }

    h6 {
        font-size: 110%;
        font-weight: 600;
    }

    .lead {
        font-size: 130%;
    }
}

/* ===================== Inline overrides ===================== */

/* Fullscreen dark background */
body {
    background-color: #0b0c14;
    color: #dce0e9;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    padding: 60px 20px;
    font-family:
        system-ui,
        "Roboto",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        "Helvetica Neue",
        Arial,
        sans-serif;
}

/* Container styling */
.signup-container {
    border-radius: 12px;
    padding: 40px;
    max-width: 640px;
    width: 100%;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    display: inline-block;
}

/* Logo styling */
.signup-logo {
    width: 100%;
    display: inline-inline-block;
}

.signup-logo img {
    max-width: 120px;
    margin-bottom: 40px;
    opacity: 1;
}

/* Headings and links */
.signup-container h1 {
    font-size: 32px;
    color: #ffffff;
}

/* Close styling */
.close {
    font-size: 32px;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 600;
    position: relative;
    top: -20px;
    right: -12px;
    color: var(--header-color);
    opacity: 0.35;
    width: 100%;
    text-align: right;
    height: 0;
}

.close:hover {
    opacity: 1 !important;
    color: var(--header-color) !important;
}

.form-group input:valid {
    border-color: green;
}

.error {
    color: var(--icon-color);
    margin-bottom: 16px;
}

.btn-primary.disabled,
.btn-primary:disabled {
    color: #fff;
    opacity: 1;
    background-color: #282c54;
    cursor: not-allowed;
}
.custom-modal {
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    /* Use Flexbox to center content */
    display: none;
    justify-content: center;
    align-items: center;
}

.modal-content {
    position: relative;
    max-height: 90vh; /* Modal will not exceed 90% of viewport height */
    max-width: 960px;
    width: 96%;
    padding: 40px;
    overflow-y: auto; /* Enable vertical scrolling if content exceeds max-height */
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.modal-content h2 {
    margin-top: 0;
    font-size: 20px;
    font-weight: bold;
}
.terms-content {
    text-align: left;
    color: #fff;
    font-size: 12px;
}
.terms-content h3 {
    font-size: 14px;
    font-weight: bold;
}
.terms-content p {
    text-align: left;
    color: #fff;
    font-size: 12px;
}
.terms-content ul {
    font-size: 12px;
}
code {
    color: #fff;
}
