/* ==========================================================
   RAMPAGE GAMING COMMUNITY - PUBLIC SQUADS
   ========================================================== */

:root {
    --rgc-red: #ef233c;
    --rgc-red-dark: #a90f24;
    --rgc-bg: #05080a;
    --rgc-panel: #090d10;
    --rgc-panel2: #0d1216;
    --rgc-border: #20282e;
    --rgc-muted: #7b8992;
    --rgc-text: #ffffff;
}


html,
body {
    margin: 0;
    background: var(--rgc-bg);
    color: var(--rgc-text);
}


body {
    min-height: 100vh;
}


[hidden] {
    display: none !important;
}


/* HEADER FALLBACK */

.header {
    position: relative;
    z-index: 100;
    display: flex;
    align-items: center;
    min-height: 72px;
    padding: 0 48px;
    border-bottom: 1px solid rgba(239,35,60,.35);
    background: #05080a;
}


.brand {
    display: flex;
    align-items: center;
    width: 220px;
}


.brand img {
    display: block;
    width: 145px;
    height: 48px;
    object-fit: contain;
}


.nav {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
}


.nav a {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 72px;
    padding: 0 13px;
    color: #c4ccd1;
    text-decoration: none;
    font-size: 12px;
    font-weight: 800;
}


.nav a:hover,
.nav a.active {
    color: #fff;
}


.nav a.active::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 0;
    height: 2px;
    background: var(--rgc-red);
}


.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    width: 300px;
}


.discord-button {
    padding: 15px 21px;
    border-radius: 3px;
    background: var(--rgc-red);
    color: #fff;
    text-decoration: none;
    font-size: 11px;
    font-weight: 900;
}


.account-wrap {
    position: relative;
}


.account-button {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 39px;
    padding: 0 12px;
    border: 1px solid #283138;
    background: #090d10;
    color: #fff;
    font-size: 9px;
    font-weight: 900;
    cursor: pointer;
}


.account-avatar {
    width: 20px;
    height: 20px;
    overflow: hidden;
    background: #172027;
}


.account-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.account-menu {
    position: absolute;
    top: calc(100% + 7px);
    right: 0;
    z-index: 300;
    width: 170px;
    border: 1px solid #283138;
    background: #090d10;
}


.account-menu a {
    display: block;
    padding: 12px 14px;
    border-bottom: 1px solid #1c2328;
    color: #fff;
    text-decoration: none;
    font-size: 9px;
    font-weight: 800;
}


.account-menu a:hover {
    background: #11171b;
    color: var(--rgc-red);
}


/* HERO */

.squads-hero {
    position: relative;
    min-height: 390px;
    overflow: hidden;

    background:
        linear-gradient(
            90deg,
            #05080a 0%,
            rgba(5,8,10,.94) 32%,
            rgba(5,8,10,.48) 58%,
            #05080a 100%
        ),
        url("/assets/discord-background.png");

    background-size: cover;
    background-position: center;
}


.squads-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;

    background:
        linear-gradient(
            0deg,
            #05080a 0%,
            transparent 28%
        );
}


.squads-hero-inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1450px, calc(100% - 80px));
    min-height: 390px;
    margin: auto;
}


.squads-hero-copy {
    width: min(650px, 60%);
}


.section-kicker {
    display: block;
    margin-bottom: 10px;
    color: var(--rgc-red);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 3px;
}


.squads-hero h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(45px,5vw,78px);
    line-height: .93;
    letter-spacing: -3px;
}


.squads-hero h1 strong {
    display: block;
    color: var(--rgc-red);
}


.squads-hero-copy p {
    max-width: 600px;
    margin: 20px 0 0;
    color: #a8b2b8;
    font-size: 14px;
    line-height: 1.7;
}


.squads-hero-actions {
    display: flex;
    gap: 10px;
    margin-top: 26px;
}


.squads-hero-side {
    padding-right: 45px;
    text-align: right;
}


.squads-hero-side span {
    display: block;
    margin-bottom: 12px;
    color: #78858d;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 3px;
}


.squads-hero-side strong {
    display: block;
    color: #fff;
    font-size: 34px;
    font-weight: 1000;
    font-style: italic;
    line-height: .93;
    transform: rotate(-3deg);
}


/* BUTTONS */

.rgc-primary-button,
.rgc-secondary-button {
    min-height: 42px;
    padding: 0 18px;
    border-radius: 2px;
    font: inherit;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .5px;
    cursor: pointer;
}


.rgc-primary-button {
    border: 1px solid var(--rgc-red);
    background: var(--rgc-red);
    color: #fff;
}


.rgc-primary-button:hover {
    background: #ff304a;
}


.rgc-secondary-button {
    border: 1px solid #344048;
    background: #090e11;
    color: #fff;
}


.rgc-secondary-button:hover {
    border-color: var(--rgc-red);
}


/* STRIP */

.squads-feature-strip {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    border-top: 1px solid #1c2429;
    border-bottom: 1px solid #1c2429;
    background: #0a0f12;
}


.squads-feature-strip > div {
    padding: 20px 30px;
    border-right: 1px solid #1c2429;
}


.squads-feature-strip > div:last-child {
    border-right: 0;
}


.squads-feature-strip strong,
.squads-feature-strip span {
    display: block;
}


.squads-feature-strip strong {
    margin-bottom: 5px;
    color: #fff;
    font-size: 10px;
}


.squads-feature-strip span {
    color: #75828b;
    font-size: 9px;
}


/* DIRECTORY */

.squads-section {
    width: min(1450px, calc(100% - 80px));
    margin: auto;
    padding: 70px 0 100px;
}


.squads-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 25px;
}


.squads-section-head h2 {
    margin: 0;
    color: #fff;
    font-size: 34px;
}


.squads-section-head p {
    margin: 8px 0 0;
    color: var(--rgc-muted);
    font-size: 12px;
}


.squads-section-actions {
    display: flex;
    gap: 8px;
}


/* STATS */

.squad-stats {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 8px;
    margin-bottom: 10px;
}


.squad-stat {
    min-height: 78px;
    padding: 16px 18px;
    box-sizing: border-box;
    border: 1px solid var(--rgc-border);

    background:
        linear-gradient(
            135deg,
            rgba(239,35,60,.06),
            transparent 60%
        ),
        var(--rgc-panel);
}


.squad-stat span {
    display: block;
    margin-bottom: 8px;
    color: #6e7c85;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 1.5px;
}


.squad-stat strong {
    color: #fff;
    font-size: 24px;
}


/* FILTERS */

.squad-filters {
    display: grid;
    grid-template-columns: 1fr 210px 190px;
    gap: 7px;
    margin-bottom: 12px;
}


.squad-filters input,
.squad-filters select {
    height: 43px;
    box-sizing: border-box;
    padding: 0 13px;
    border: 1px solid #283138;
    outline: 0;
    background: #080c0f;
    color: #fff;
    font: inherit;
    font-size: 10px;
}


.squad-filters input:focus,
.squad-filters select:focus {
    border-color: var(--rgc-red);
}


/* LOADING / EMPTY */

.squad-loading,
.squad-empty {
    padding: 75px 20px;
    border: 1px dashed #283138;
    background: #070b0d;
    color: #73808a;
    text-align: center;
    font-size: 10px;
    font-weight: 800;
}


.squad-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin: 0 auto 16px;
    border: 1px solid #343e45;
    background: #0d1317;
    color: var(--rgc-red);
    font-size: 15px;
    font-weight: 1000;
}


.squad-empty strong {
    display: block;
    margin-bottom: 7px;
    color: #fff;
    font-size: 14px;
}


.squad-empty p {
    margin: 0 0 18px;
    color: #72808a;
}


/* CARDS */

.squad-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 10px;
}


.squad-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--rgc-border);
    border-top: 2px solid var(--rgc-red);
    background: var(--rgc-panel);
}


.squad-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 180px;
    height: 130px;

    background:
        radial-gradient(
            circle at top right,
            rgba(239,35,60,.13),
            transparent 65%
        );

    pointer-events: none;
}


.squad-card-head {
    position: relative;
    padding: 19px;
    border-bottom: 1px solid var(--rgc-border);
}


.squad-card-game {
    display: block;
    margin-bottom: 8px;
    color: var(--rgc-red);
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 1.5px;
}


.squad-card-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}


.squad-card-title h3 {
    margin: 0;
    color: #fff;
    font-size: 16px;
}


.squad-tag {
    padding: 5px 7px;
    border: 1px solid #374149;
    color: #aeb8be;
    font-size: 8px;
    font-weight: 900;
}


.squad-card-body {
    position: relative;
    padding: 19px;
}


.squad-card-description {
    min-height: 48px;
    margin: 0 0 17px;
    color: #839098;
    font-size: 10px;
    line-height: 1.6;
}


.squad-card-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 16px;
    border: 1px solid #1f272c;
}


.squad-card-info div {
    padding: 10px;
}


.squad-card-info div + div {
    border-left: 1px solid #1f272c;
}


.squad-card-info span,
.squad-card-info strong {
    display: block;
}


.squad-card-info span {
    margin-bottom: 5px;
    color: #64717a;
    font-size: 7px;
    font-weight: 900;
    letter-spacing: 1px;
}


.squad-card-info strong {
    color: #fff;
    font-size: 9px;
}


.squad-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 14px;
    color: #57d69f;
    font-size: 8px;
    font-weight: 900;
}


.squad-status::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}


.squad-status.closed {
    color: #f05b6e;
}


.squad-card-actions {
    display: flex;
    gap: 7px;
}


.squad-card-actions button {
    flex: 1;
}


/* MESSAGE */

.squad-message,
.squad-form-message {
    margin-bottom: 12px;
    padding: 12px 14px;
    border: 1px solid #4e2830;
    background: rgba(239,35,60,.08);
    color: #ff7182;
    font-size: 10px;
}


/* MODAL */

.squad-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px;
}


.squad-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.88);
    backdrop-filter: blur(5px);
}


.squad-modal-box {
    position: relative;
    z-index: 2;
    width: min(760px,100%);
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid #303940;
    border-top: 2px solid var(--rgc-red);
    background: #090d10;
    box-shadow: 0 30px 100px rgba(0,0,0,.65);
}


.squad-view-box {
    width: min(850px,100%);
}


.squad-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 24px;
    border-bottom: 1px solid var(--rgc-border);
}


.squad-modal-header span {
    display: block;
    margin-bottom: 5px;
    color: var(--rgc-red);
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 1.6px;
}


.squad-modal-header h2 {
    margin: 0;
    color: #fff;
    font-size: 23px;
}


.squad-modal-close {
    width: 38px;
    height: 38px;
    border: 1px solid #303940;
    background: #0b1013;
    color: #fff;
    cursor: pointer;
}


#createSquadForm {
    padding: 24px;
}


.squad-form-grid {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 14px;
}


.squad-form-grid label span,
.squad-form-full span {
    display: block;
    margin-bottom: 7px;
    color: #7a8790;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 1px;
}


.squad-form-grid input,
.squad-form-grid select,
.squad-form-full textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #2a343b;
    outline: 0;
    background: #070b0d;
    color: #fff;
    font: inherit;
}


.squad-form-grid input,
.squad-form-grid select {
    height: 43px;
    padding: 0 12px;
}


.squad-form-full {
    display: block;
    margin-top: 14px;
}


.squad-form-full textarea {
    min-height: 110px;
    padding: 12px;
    resize: vertical;
}


.squad-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
}


/* VIEW SQUAD */

.squad-view-content {
    padding: 24px;
}


.squad-view-description {
    margin: 0 0 20px;
    color: #929ea5;
    font-size: 11px;
    line-height: 1.7;
}


.squad-view-stats {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    margin-bottom: 20px;
    border: 1px solid #20282e;
}


.squad-view-stats div {
    padding: 14px;
    border-right: 1px solid #20282e;
}


.squad-view-stats div:last-child {
    border-right: 0;
}


.squad-view-stats span,
.squad-view-stats strong {
    display: block;
}


.squad-view-stats span {
    margin-bottom: 6px;
    color: #65727a;
    font-size: 7px;
    font-weight: 900;
    letter-spacing: 1px;
}


.squad-view-stats strong {
    color: #fff;
    font-size: 10px;
}


.squad-view-actions {
    display: flex;
    gap: 8px;
}


/* FOOTER */

.squads-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 35px 70px;
    border-top: 1px solid #20282e;
    background: #070a0c;
}


.squads-footer img {
    width: 145px;
    height: 50px;
    object-fit: contain;
}


.squads-footer p {
    margin: 8px 0 0;
    color: #68757e;
    font-size: 9px;
}


.squads-footer-links {
    display: flex;
    gap: 22px;
}


.squads-footer-links a {
    color: #909ca3;
    text-decoration: none;
    font-size: 9px;
    font-weight: 800;
}


.squads-footer-links a:hover {
    color: var(--rgc-red);
}


/* RESPONSIVE */

@media(max-width:1200px) {

    .header {
        padding: 0 20px;
    }

    .brand {
        width: 165px;
    }

    .header-actions {
        width: auto;
    }

    .nav a {
        padding: 0 8px;
        font-size: 10px;
    }

    .squad-grid {
        grid-template-columns: repeat(2,1fr);
    }
}


@media(max-width:900px) {

    .nav {
        display: none;
    }

    .squads-hero-side {
        display: none;
    }

    .squads-hero-copy {
        width: 100%;
    }

    .squads-feature-strip {
        grid-template-columns: repeat(2,1fr);
    }

    .squad-stats {
        grid-template-columns: repeat(2,1fr);
    }

    .squad-filters {
        grid-template-columns: 1fr;
    }
}


@media(max-width:650px) {

    .header {
        padding: 0 12px;
    }

    .discord-button {
        display: none;
    }

    .squads-hero-inner,
    .squads-section {
        width: calc(100% - 30px);
    }

    .squads-section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .squad-grid,
    .squad-stats,
    .squad-form-grid,
    .squad-view-stats {
        grid-template-columns: 1fr;
    }

    .squad-view-stats div {
        border-right: 0;
        border-bottom: 1px solid #20282e;
    }

    .squads-footer {
        align-items: flex-start;
        flex-direction: column;
        padding: 30px 20px;
    }

    .squads-footer-links {
        flex-wrap: wrap;
    }
}

/* =========================================================
   RAMPAGE SQUAD OWNER CONTROLS
   ========================================================= */

.squad-owner-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;

    margin-top: 22px;
    padding-top: 20px;

    border-top: 1px solid rgba(255,255,255,.10);
}

.squad-owner-actions[hidden] {
    display: none !important;
}

.rgc-danger-button {
    min-height: 44px;
    padding: 0 20px;

    border: 1px solid #d92b2b;
    background: rgba(140,0,0,.18);

    color: #ff5555;

    font: inherit;
    font-weight: 900;
    letter-spacing: .05em;

    cursor: pointer;

    transition:
        background .15s ease,
        border-color .15s ease,
        color .15s ease,
        transform .15s ease;
}

.rgc-danger-button:hover {
    background: #b51212;
    border-color: #ff3b3b;
    color: #fff;
    transform: translateY(-1px);
}

@media (max-width: 650px) {

    .squad-owner-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .squad-owner-actions button {
        width: 100%;
    }
}


/* ==========================================================
   SQUAD APPLICATION FORM
========================================================== */

.squad-application-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    padding: 30px;
}

.squad-application-modal[hidden] {
    display: none !important;
}

.squad-application-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.88);
    backdrop-filter: blur(5px);
}

.squad-application-dialog {
    position: relative;
    z-index: 2;
    width: min(760px, 100%);
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    border: 1px solid rgba(255,255,255,.11);
    border-top: 3px solid #e22323;
    background:
        linear-gradient(
            145deg,
            rgba(226,35,35,.07),
            transparent 28%
        ),
        #0c0c0c;
    box-shadow: 0 30px 100px rgba(0,0,0,.75);
}

.squad-application-close {
    position: absolute;
    top: 16px;
    right: 17px;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255,255,255,.12);
    background: #111;
    color: #aaa;
    cursor: pointer;
    font-size: 23px;
}

.squad-application-close:hover {
    color: #fff;
    border-color: #e22323;
}

.squad-application-heading {
    padding: 34px 38px 27px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.squad-application-heading > span {
    color: #e22323;
    font-family: Rajdhani, sans-serif;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
}

.squad-application-heading h2 {
    margin: 5px 0 7px;
    color: #fff;
    font-family: Rajdhani, sans-serif;
    font-size: 36px;
    font-weight: 900;
    line-height: 1;
}

.squad-application-heading p {
    margin: 0;
    max-width: 570px;
    color: #858585;
    font-size: 13px;
    line-height: 1.6;
}

#squadApplicationForm {
    padding: 30px 38px 38px;
}

.application-question {
    margin-bottom: 24px;
}

.application-question label {
    display: block;
    margin-bottom: 9px;
    color: #d2d2d2;
    font-family: Rajdhani, sans-serif;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .5px;
}

.application-question input,
.application-question textarea,
.application-question select {
    width: 100%;
    border: 1px solid rgba(255,255,255,.12);
    outline: none;
    background: #080808;
    color: #fff;
    font-family: Inter, sans-serif;
    font-size: 13px;
}

.application-question input,
.application-question select {
    height: 50px;
    padding: 0 14px;
}

.application-question textarea {
    min-height: 110px;
    padding: 14px;
    resize: vertical;
    line-height: 1.6;
}

.application-question input:focus,
.application-question textarea:focus,
.application-question select:focus {
    border-color: #e22323;
    box-shadow: 0 0 0 3px rgba(226,35,35,.07);
}

.application-question select option {
    background: #0b0b0b;
    color: white;
}

.application-form-error {
    margin: 0 0 20px;
    padding: 13px 15px;
    border: 1px solid rgba(255,60,60,.28);
    background: rgba(180,20,20,.09);
    color: #ff6969;
    font-size: 12px;
    font-weight: 700;
}

.application-form-error[hidden] {
    display: none !important;
}

.application-submit-row {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 7px;
}

.application-cancel-button,
.application-submit-button {
    min-height: 47px;
    padding: 0 21px;
    cursor: pointer;
    font-family: Rajdhani, sans-serif;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .6px;
}

.application-cancel-button {
    border: 1px solid rgba(255,255,255,.13);
    background: transparent;
    color: #aaa;
}

.application-submit-button {
    border: 1px solid #e22323;
    background: #e22323;
    color: #fff;
}

.application-submit-button:hover {
    background: #ff3131;
}

.application-submit-button:disabled {
    opacity: .5;
    cursor: wait;
}

@media (max-width: 650px) {

    .squad-application-modal {
        padding: 12px;
    }

    .squad-application-dialog {
        max-height: calc(100vh - 24px);
    }

    .squad-application-heading {
        padding: 28px 22px 22px;
    }

    #squadApplicationForm {
        padding: 24px 22px 28px;
    }

    .application-submit-row {
        flex-direction: column-reverse;
    }

    .application-cancel-button,
    .application-submit-button {
        width: 100%;
    }
}
