/* =====================================================
   GLOBAL
   ===================================================== */

   * {
    box-sizing: border-box;
    border-radius: 0 !important;
}

html,
body {
    width: 100%;
    max-width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #e8f5e9;
    color: #12372a;
}

a {
    text-decoration: none;
    color: inherit;
}

button,
input,
select {
    font-family: inherit;
}


/* =====================================================
   NAVBAR
   ===================================================== */

.navbar {
    width: 100%;
    max-width: 100%;

    min-height: 70px;

    display: flex;
    align-items: center;

    padding: 15px 25px;

    background: #064e3b;
    color: white;

    border-bottom: 3px solid #043c2e;

    overflow: hidden;
}

.nav-title {
    flex: 1 1 auto;

    min-width: 0;

    margin-right: 25px;

    color: white;

    font-size: 20px;
    font-weight: bold;

    white-space: nowrap;

    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-links {
    flex: 0 0 auto;

    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 18px;

    white-space: nowrap;
}

.nav-links a {
    color: white;

    font-weight: 600;

    white-space: nowrap;
}

.nav-links a:hover {
    opacity: 0.75;
}

.nav-button {
    display: inline-block;

    padding: 0;

    border: none;

    background: transparent;

    color: white;

    font-size: 16px;
    font-weight: 600;

    cursor: pointer;

    white-space: nowrap;
}

.nav-button:hover {
    opacity: 0.75;
}

.nav-signup {
    display: inline-block;

    padding: 10px 16px;

    background: #10b981;

    color: white;

    font-weight: 600;

    white-space: nowrap;
}

.nav-signup:hover {
    background: #059669;

    opacity: 1 !important;
}


/* =====================================================
   MAIN CONTAINER
   ===================================================== */

.container {
    width: 90%;
    max-width: 1100px;

    margin: 50px auto;
}


/* =====================================================
   HERO
   ===================================================== */

.hero {
    min-height: 550px;

    display: grid;

    grid-template-columns: 1fr 1fr;

    align-items: center;

    gap: 60px;
}

.hero-text h1 {
    margin-bottom: 25px;

    color: #064e3b;

    font-size: 48px;
    line-height: 1.1;
}

.hero-text p {
    max-width: 600px;

    color: #315c4c;

    font-size: 18px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;

    gap: 15px;

    margin-top: 30px;
}


/* =====================================================
   BUTTONS
   ===================================================== */

.button {
    display: inline-block;

    padding: 13px 22px;

    background: #047857;

    color: white;

    font-weight: bold;

    transition: background 0.2s ease;
}

.button:hover {
    background: #065f46;
}

.button.secondary {
    background: transparent;

    color: #064e3b;

    border: 2px solid #047857;
}

.button.secondary:hover {
    background: #d1fae5;
}


/* =====================================================
   IMAGE
   ===================================================== */

.image-placeholder {
    width: 100%;
    height: 350px;

    overflow: hidden;

    background: #d1fae5;

    border: 3px solid #10b981;
}

.image-placeholder img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
}


/* =====================================================
   CARDS / BOXES
   ===================================================== */

.card {
    margin-bottom: 25px;

    padding: 30px;

    background: #064e3b;

    color: white;

    box-shadow: 0 4px 12px rgba(6, 78, 59, 0.20);
}

.card h1,
.card h2 {
    margin-top: 0;

    color: white;
}

.card h2 {
    margin-bottom: 25px;
}


/* =====================================================
   AUTH
   ===================================================== */

.auth-container {
    width: 90%;
    max-width: 500px;

    margin: 50px auto;
}

form {
    display: flex;

    flex-direction: column;

    gap: 10px;
}

label {
    margin-top: 10px;

    color: white;

    font-weight: bold;
}

input,
select {
    width: 100%;

    padding: 13px;

    background: #f0fdf4;

    border: 2px solid #a7d7bd;

    color: #12372a;

    font-size: 16px;
}

input::placeholder {
    color: #6b8f80;
}

input:focus,
select:focus {
    outline: none;

    border-color: #10b981;

    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

form button {
    margin-top: 15px;

    padding: 13px;

    border: none;

    background: #10b981;

    color: white;

    font-size: 16px;
    font-weight: bold;

    cursor: pointer;

    transition: background 0.2s ease;
}

form button:hover {
    background: #059669;
}


/* =====================================================
   AUTH LINK
   ===================================================== */

.auth-link {
    margin-top: 25px;

    text-align: center;

    color: #d1fae5;
}

.auth-link a {
    color: #6ee7b7;

    font-weight: bold;
}

.auth-link a:hover {
    color: white;
}


/* =====================================================
   MESSAGES
   ===================================================== */

.message {
    margin-top: 15px;

    font-weight: 600;
}

.message.error {
    color: #fecaca;
}

.message.success {
    color: #86efac;
}


/* =====================================================
   ACCOUNT
   ===================================================== */

.account-info {
    display: flex;

    flex-direction: column;

    gap: 10px;
}

.account-info p {
    margin: 0;

    color: #d1fae5;
}

.account-info strong {
    color: white;
}


/* =====================================================
   DELETE ACCOUNT
   ===================================================== */

.delete-account-section {
    width: 100%;

    margin-top: 25px;

    padding: 25px;

    background: #fff7ed;

    border: 2px solid #f97316;
}

.delete-account-section h3 {
    margin-top: 0;

    color: #c2410c;

    font-size: 22px;
}

.delete-account-section p {
    margin-bottom: 20px;

    color: #7c2d12;

    line-height: 1.5;
}

.delete-account-button {
    padding: 13px 22px;

    background: #f97316;

    border: none;

    color: white;

    font-size: 15px;

    font-weight: bold;

    cursor: pointer;
}

.delete-account-button:hover {
    background: #ea580c;
}

.delete-account-button:disabled {
    opacity: 0.6;

    cursor: not-allowed;
}


/* =====================================================
   TEAM
   ===================================================== */

.team-details {
    display: grid;

    grid-template-columns: 1fr 1fr 1fr;

    gap: 20px;
}

.team-detail {
    padding: 20px;

    background: #0b6048;

    border: 1px solid #168a68;
}

.team-label {
    display: block;

    margin-bottom: 8px;

    color: #a7f3d0;

    font-size: 14px;
}

.team-detail strong {
    color: white;
}

.team-code {
    font-size: 20px;

    letter-spacing: 2px;
}


/* =====================================================
   CREATE / JOIN TEAM
   ===================================================== */

.team-actions {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 25px;
}

.leave-container {
    margin-top: 10px;
}


/* =====================================================
   LEAVE TEAM / DANGER BUTTON
   ===================================================== */

.danger-button {
    width: 100%;

    padding: 14px;

    background: #c62828;

    border: none;

    color: white;

    font-size: 16px;
    font-weight: bold;

    cursor: pointer;

    transition: background 0.2s ease;
}

.danger-button:hover {
    background: #a91f1f;
}


/* =====================================================
   LEADERBOARD
   ===================================================== */

.leaderboard-card {
    overflow-x: auto;
}

.leaderboard {
    width: 100%;
    min-width: 0;
}

.leaderboard-header,
.leaderboard-row {
    display: grid;

    grid-template-columns:
        0.6fr
        2fr
        2fr
        1fr;

    align-items: center;
}

.leaderboard-header {
    padding: 15px;

    background: #022c22;

    color: white;

    font-weight: bold;
}

.leaderboard-row {
    padding: 18px 15px;

    background: #0b6048;

    border-bottom: 1px solid #a7d7bd;

    color: white;
}

.leaderboard-row:nth-child(even) {
    background: #09553f;
}

.leaderboard-card h1 {
    color: white;
}


/* =====================================================
   CHALLENGES PAGE
   ===================================================== */

.page-title {
    margin-bottom: 30px;

    color: #064e3b;

    font-size: 40px;
}

.challenge-section {
    margin-bottom: 30px;
}

.section-description {
    margin-bottom: 25px;

    color: #d1fae5;
}


/* =====================================================
   INCOMING CHALLENGES
   ===================================================== */

.incoming-challenge {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 25px;

    padding: 20px;

    margin-bottom: 15px;

    background: #0b6048;

    border: 1px solid #168a68;
}

.incoming-info h3 {
    margin-top: 0;

    margin-bottom: 8px;

    color: white;

    font-size: 22px;
}

.incoming-info p {
    margin: 6px 0;

    color: #d1fae5;
}


/* =====================================================
   INCOMING CHALLENGES
   ===================================================== */

   .challenge-card {
    width: 100%;

    margin-bottom: 18px;

    padding: 22px;

    background: #0b6048;

    border: 1px solid #168a68;
}

.challenge-card-content {
    width: 100%;
}

.challenge-card h3 {
    margin: 0 0 12px;

    color: white;

    font-size: 22px;
}

.challenge-card p {
    margin: 7px 0;

    color: #d1fae5;

    line-height: 1.5;
}


/* =====================================================
   ACCEPT / DECLINE BUTTONS
   ===================================================== */

.challenge-actions {
    display: flex;

    width: 100%;

    gap: 12px;

    margin-top: 20px;
}

.accept-challenge-button,
.decline-challenge-button {
    flex: 1;

    min-height: 46px;

    padding: 12px 20px;

    border: none;

    color: white;

    font-family: inherit;

    font-size: 15px;

    font-weight: bold;

    cursor: pointer;

    transition:
        background 0.2s ease,
        opacity 0.2s ease;
}


/* ACCEPT */

.accept-challenge-button {
    background: #16a34a;
}

.accept-challenge-button:hover {
    background: #15803d;
}


/* DECLINE */

.decline-challenge-button {
    background: #c62828;
}

.decline-challenge-button:hover {
    background: #a91f1f;
}


/* DISABLED */

.accept-challenge-button:disabled,
.decline-challenge-button:disabled {
    opacity: 0.55;

    cursor: not-allowed;
}


/* =====================================================
   CHALLENGE ACTION MESSAGE
   ===================================================== */

.challenge-action-message {
    width: 100%;

    margin-top: 12px;
}


/* =====================================================
   MOBILE
   ===================================================== */

@media (max-width: 600px) {

    .challenge-actions {
        flex-direction: column;

        gap: 10px;
    }

    .accept-challenge-button,
    .decline-challenge-button {
        width: 100%;

        min-height: 48px;
    }

}


/* =====================================================
   NO CHALLENGES
   ===================================================== */

.no-challenges {
    padding: 20px;

    background: #0b6048;

    color: #d1fae5;

    border: 1px solid #168a68;
}


/* =====================================================
   YOUR MATCHES
   ===================================================== */

#your-matches {
    display: flex;

    flex-direction: column;

    gap: 25px;
}

.match-card {
    padding: 25px;

    background: #0b6048;

    border: 2px solid #168a68;
}


/* =====================================================
   MATCH TEAMS
   ===================================================== */

.match-teams {
    display: grid;

    grid-template-columns:
        1fr
        100px
        1fr;

    align-items: center;

    gap: 25px;

    margin-bottom: 30px;
}

.match-team {
    padding: 20px;

    background: #064e3b;

    border: 1px solid #168a68;

    text-align: center;
}

.match-team h3 {
    margin-top: 0;

    margin-bottom: 18px;

    color: white;

    font-size: 24px;
}

.match-vs {
    color: white;

    font-size: 30px;

    font-weight: bold;

    text-align: center;
}


/* =====================================================
   MATCH PLAYERS
   ===================================================== */

.match-players {
    display: flex;

    flex-direction: column;

    gap: 8px;
}

.match-player {
    padding: 9px;

    background: #0b6048;

    border: 1px solid #168a68;

    color: #d1fae5;
}


/* =====================================================
   MATCH DATE / TIME
   ===================================================== */

.match-information {
    display: grid;

    grid-template-columns:
        1fr
        1fr;

    gap: 20px;

    margin-bottom: 25px;
}

.match-information div {
    padding: 18px;

    background: #064e3b;

    border: 1px solid #168a68;

    text-align: center;
}

.match-information span {
    display: block;

    margin-bottom: 8px;

    color: #a7f3d0;

    font-size: 14px;
}

.match-information strong {
    color: white;

    font-size: 19px;
}


/* =====================================================
   CANCEL MATCH
   ===================================================== */

.cancel-match-button {
    display: block;

    width: 100%;

    max-width: 300px;

    margin: 0 auto;
}


/* =====================================================
   LOADING
   ===================================================== */

.loading-text {
    color: #d1fae5;
}


/* =====================================================
   TABLET
   ===================================================== */

@media (max-width: 850px) {

    .navbar {
        padding: 14px 18px;
    }

    .nav-title {
        margin-right: 15px;

        font-size: 17px;
    }

    .nav-links {
        gap: 12px;

        font-size: 14px;
    }

    .nav-button {
        font-size: 14px;
    }

    .nav-signup {
        padding: 8px 12px;
    }

    .hero {
        grid-template-columns: 1fr;

        gap: 35px;
    }

    .hero-text h1 {
        font-size: 40px;
    }

    .team-details {
        grid-template-columns: 1fr;
    }

    .team-actions {
        grid-template-columns: 1fr;
    }
}


/* =====================================================
   MOBILE NAVBAR
   ===================================================== */

@media (max-width: 650px) {

    .navbar {
        min-height: auto;

        padding: 15px;

        flex-wrap: wrap;

        row-gap: 15px;
    }

    .nav-title {
        flex: 1 1 100%;

        width: 100%;

        margin-right: 0;

        font-size: 20px;

        white-space: normal;

        overflow: visible;

        text-overflow: clip;
    }

    .nav-links {
        flex: 1 1 100%;

        width: 100%;

        justify-content: flex-start;

        gap: 15px;

        flex-wrap: wrap;
    }

    .nav-links a,
    .nav-button {
        font-size: 14px;
    }

    .nav-signup {
        padding: 8px 12px;
    }

    .container {
        width: 92%;

        margin: 30px auto;
    }

    .hero {
        min-height: auto;
    }

    .hero-text h1 {
        font-size: 34px;
    }

    .hero-text p {
        font-size: 16px;
    }

    .image-placeholder {
        height: 250px;
    }

    .card {
        padding: 20px;
    }

    .leaderboard {
        min-width: 0;
    }

    .leaderboard-header,
    .leaderboard-row {
        grid-template-columns:
            0.5fr
            1.5fr
            1.5fr
            1fr;

        padding: 12px 8px;

        font-size: 13px;
    }


    /* Challenges */

    .page-title {
        font-size: 32px;
    }

    .incoming-challenge {
        flex-direction: column;

        align-items: stretch;
    }

    .challenge-actions {
        width: 100%;
    }

    .accept-button,
    .decline-button {
        flex: 1;
    }

    .match-teams {
        grid-template-columns: 1fr;

        gap: 15px;
    }

    .match-vs {
        padding: 5px;

        font-size: 25px;
    }

    .match-information {
        grid-template-columns: 1fr;
    }
}


/* =====================================================
   VERY SMALL PHONES
   ===================================================== */

@media (max-width: 400px) {

    .navbar {
        padding: 12px;
    }

    .nav-title {
        font-size: 18px;
    }

    .nav-links {
        gap: 12px;
    }

    .nav-links a,
    .nav-button {
        font-size: 13px;
    }

    .nav-signup {
        padding: 7px 10px;
    }

    .hero-text h1 {
        font-size: 30px;
    }

    .card {
        padding: 16px;
    }

    .match-card {
        padding: 16px;
    }

    .match-team {
        padding: 16px;
    }

    .match-team h3 {
        font-size: 21px;
    }
}
/* =====================================================
   MATCH RESULT
   ===================================================== */

   .match-result-section {
    width: 100%;

    margin-top: 25px;
    padding-top: 25px;

    border-top: 1px solid #168a68;

    text-align: center;
}

.match-result-section h3 {
    margin: 0 0 18px;

    color: white;

    font-size: 20px;
}

.winner-buttons {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 20px;

    width: 100%;
}

.winner-buttons button {
    width: 100%;

    min-height: 50px;

    padding: 15px 20px;

    border: none;

    color: white;

    font-size: 16px;

    font-weight: bold;

    cursor: pointer;
}

.team-one-winner {
    background: #ec4899;
}

.team-one-winner:hover {
    background: #db2777;
}

.team-two-winner {
    background: #7c3aed;
}

.team-two-winner:hover {
    background: #6d28d9;
}

.winner-buttons button:disabled {
    opacity: 0.55;

    cursor: not-allowed;
}


/* =====================================================
   DISPUTE
   ===================================================== */

.result-dispute {
    width: 100%;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    padding: 18px 20px;

    background: #f97316;

    color: white;

    font-weight: bold;

    text-align: left;
}

.result-ok-button {
    flex-shrink: 0;

    min-width: 80px;

    padding: 11px 22px;

    border: none;

    background: white;

    color: #c2410c;

    font-size: 15px;

    font-weight: bold;

    cursor: pointer;
}

.result-ok-button:hover {
    background: #ffedd5;
}

.result-ok-button:disabled {
    opacity: 0.7;

    cursor: not-allowed;
}


/* =====================================================
   MOBILE
   ===================================================== */

@media (max-width: 600px) {

    .winner-buttons {
        grid-template-columns: 1fr;

        gap: 12px;
    }

    .result-dispute {
        flex-direction: column;

        align-items: stretch;

        text-align: center;
    }

    .result-ok-button {
        width: 100%;
    }

}

/* =====================================================
   MATCH RESULT
   ===================================================== */

   .match-result-section {
    margin-top: 25px;

    padding-top: 25px;

    border-top: 1px solid #168a68;

    text-align: center;
}


.match-result-section h3 {
    margin: 0 0 18px;

    color: white;

    font-size: 20px;
}


.winner-buttons {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 20px;
}


.winner-buttons button {
    padding: 15px 20px;

    border: none;

    color: white;

    font-size: 16px;

    font-weight: bold;

    cursor: pointer;
}


.team-one-winner {
    background: #ec4899;
}


.team-one-winner:hover {
    background: #db2777;
}


.team-two-winner {
    background: #7c3aed;
}


.team-two-winner:hover {
    background: #6d28d9;
}


.winner-buttons button:disabled {
    opacity: 0.55;

    cursor: not-allowed;
}


/* =====================================================
   DISAGREEMENT
   ===================================================== */

.result-dispute {
    width: 100%;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    padding: 18px 20px;

    background: #f97316;

    color: white;

    font-weight: bold;

    text-align: left;
}


.result-ok-button {
    flex-shrink: 0;

    padding: 10px 25px;

    border: none;

    background: white;

    color: #c2410c;

    font-weight: bold;

    cursor: pointer;
}


.result-ok-button:hover {
    background: #ffedd5;
}


.result-ok-button:disabled {
    opacity: 0.7;

    cursor: not-allowed;
}


@media (max-width: 600px) {

    .winner-buttons {
        grid-template-columns: 1fr;
    }


    .result-dispute {
        flex-direction: column;

        align-items: stretch;

        text-align: center;
    }

}