/* =====================================================
   GOOGLE FONT
   ===================================================== */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap");

/* =====================================================
   RESET
   ===================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    width: 100%;
    background: #000 url("../images/fesancho.jpg") center/cover no-repeat;
    overflow-x: hidden;
}

/* =====================================================
   GLOBAL OVERLAY (DARK EFFECT)
   ===================================================== */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    z-index: -1;
}

/* =====================================================
   HEADER + NAVBAR
   ===================================================== */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 999;
    transition: 0.35s ease;
}

/* Navbar wrapper */
.navbar {
    max-width: 1300px;
    margin: auto;
    padding: 14px 22px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-radius: 10px;

    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(15px);

    border: 1px solid rgba(255, 215, 0, 0.12);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.65);

    transition: 0.35s ease;
}

/* Navbar smaller on scroll */
header.scrolled .navbar {
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.78);
    border-color: rgba(255, 215, 0, 0.25);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.75);
}

/* Hide navbar on scroll down */
header.hide-navbar {
    transform: translateY(-130%);
}

/* Logo */
.navbar .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.navbar .logo img {
    width: 65px;
    transition: 0.3s ease;
}

header.scrolled .logo img {
    width: 55px;
}

.navbar .logo h2 {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 1px;
}

/* Links */
.navbar .links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.navbar .links a {
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.05rem;
    font-weight: 600;
    text-decoration: none;
    transition: 0.25s ease;
    position: relative;
}

/* underline hover */
.navbar .links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -7px;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, #FFD700, #ffb700);
    transition: 0.3s ease;
}

.navbar .links a:hover {
    color: #FFD700;
}

.navbar .links a:hover::after {
    width: 100%;
}

/* Login button */
.navbar .login-btn {
    padding: 12px 22px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #FFD700, #ffb700);
    color: #111;
    font-weight: 800;
    cursor: pointer;
    transition: 0.3s ease;
    box-shadow: 0 10px 25px rgba(255, 215, 0, 0.25);
}

.navbar .login-btn:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #fff1a3, #FFD700);
    box-shadow: 0 18px 40px rgba(255, 215, 0, 0.35);
}

/* Hamburger icon */
.navbar .hamburger-btn {
    display: none;
    font-size: 2rem;
    color: #FFD700;
    cursor: pointer;
}

/* =====================================================
   RESPONSIVE NAVBAR MENU
   ===================================================== */
@media (max-width: 950px) {
    .navbar .hamburger-btn {
        display: block;
    }

    .navbar .links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;

        flex-direction: column;
        justify-content: center;
        align-items: center;

        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(18px);

        transform: translateX(-100%);
        transition: 0.35s ease;
        z-index: 999;
    }

    .navbar .links.show-menu {
        transform: translateX(0);
    }

    .navbar .links a {
        font-size: 1.4rem;
        font-weight: 700;
        color: #fff;
    }

    .navbar .links a:hover {
        color: #FFD700;
    }
}

/* =====================================================
   RULES PAGE
   ===================================================== */
.rules-page {
    min-height: 100vh;
    padding: 140px 0 80px;
}

.rules-container {
    max-width: 1100px;
    margin: auto;
    padding: 0 25px;
}

/* Header */
.rules-header {
    text-align: center;
    margin-bottom: 55px;
}

.rules-header h1 {
    font-size: 2.6rem;
    font-weight: 900;
    color: #FFD700;
    letter-spacing: 1px;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    margin-bottom: 12px;
}

.rules-header p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.75);
}

/* Rule Cards */
.rule-card {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 22px;
    padding: 35px;
    margin-bottom: 28px;

    border: 1px solid rgba(255, 215, 0, 0.12);
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(15px);

    position: relative;
    overflow: hidden;

    transition: 0.35s ease;
}

/* golden line left */
.rule-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(180deg, #FFD700, #ffb700);
}

/* hover */
.rule-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 215, 0, 0.35);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.85);
}

/* titles */
.rule-card h2 {
    color: #FFD700;
    font-size: 1.6rem;
    font-weight: 900;
    margin-bottom: 16px;
}

/* text */
.rule-card p,
.rule-card li {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.05rem;
    line-height: 1.85;
}

.rule-card ul {
    padding-left: 22px;
}

.rule-card ul li {
    margin-bottom: 10px;
}

/* =====================================================
   TABLE (RULES)
   ===================================================== */
.rules-table {
    width: 100%;
    margin-top: 20px;
    border-collapse: collapse;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.65);
}

.rules-table th {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.35), rgba(255, 170, 0, 0.2));
    color: #FFD700;
    padding: 14px;
    font-size: 1.05rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rules-table td {
    padding: 14px;
    text-align: center;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(0, 0, 0, 0.55);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

/* =====================================================
   FORM POPUP BACKGROUND
   ===================================================== */
.blur-bg-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    opacity: 0;
    pointer-events: none;
    transition: 0.35s ease;
    z-index: 50;
}

.show-popup .blur-bg-overlay {
    opacity: 1;
    pointer-events: auto;
}

/* =====================================================
   FORM POPUP
   ===================================================== */
.form-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 100%;
    max-width: 780px;
    transform: translate(-50%, -60%) scale(0.95);

    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    border-radius: 22px;
    overflow: hidden;

    opacity: 0;
    pointer-events: none;

    transition: 0.35s ease;
    z-index: 1000;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.85);
}


.show-popup .form-popup {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

/* Close Button */
.form-popup .close-btn {
    position: absolute;
    top: 16px;
    right: 18px;
    font-size: 22px;
    cursor: pointer;
    color: #666;
    transition: 0.25s;
    z-index: 10;
}

.form-popup .close-btn:hover {
    color: #e63946;
    transform: rotate(90deg);
}

/* =====================================================
   FORM STRUCTURE
   ===================================================== */
.form-box {
    display: flex;
    width: 100%;
}

/* LEFT SIDE DETAILS */
.form-box .form-details {
    width: 45%;
    padding: 45px 30px;

    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;

    position: relative;
    text-align: center;
    color: #FFD700;
}

.form-box .form-details::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
}

.form-box .form-details * {
    position: relative;
    z-index: 1;
}

.form-box .form-details h2 {
    font-size: 2.2rem;
    font-weight: 900;
}

.form-box .form-details p {
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
}

/* Right Side Content */
.form-content {
    width: 55%;
    padding: 55px 45px;
}

.form-content h2 {
    text-align: center;
    margin-bottom: 28px;
    font-size: 1.9rem;
    font-weight: 900;
    color: #111;
}

/* =====================================================
   INPUTS
   ===================================================== */
.input-field {
    position: relative;
    margin-bottom: 22px;
}

.input-field input {
    width: 100%;
    padding: 16px 14px;
    border-radius: 12px;
    border: 1px solid #ddd;
    background: #fafafa;
    font-size: 0.95rem;
    outline: none;
    transition: 0.25s ease;
}

.input-field input:focus {
    border-color: #FFD700;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.18);
}

.input-field label {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    font-size: 0.85rem;
    color: #666;
    background: #fff;
    padding: 0 6px;
    transition: 0.25s ease;
    pointer-events: none;
}

.input-field input:focus ~ label,
.input-field input:valid ~ label {
    top: -9px;
    font-size: 0.75rem;
    color: #c99700;
}

/* Password icon */
.toggle-password {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    cursor: pointer;
    color: #777;
    transition: 0.2s ease;
}

.toggle-password:hover {
    color: #111;
}

/* =====================================================
   POLICY CHECKBOX
   ===================================================== */
.policy-text {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    font-size: 0.9rem;
    color: #333;
}

.policy-text a {
    color: #c99700;
    font-weight: 700;
    text-decoration: none;
}

.policy-text a:hover {
    text-decoration: underline;
}

/* =====================================================
   FORM BUTTONS
   ===================================================== */
form button {
    width: 100%;
    padding: 14px;
    margin-top: 8px;

    border: none;
    border-radius: 14px;

    background: linear-gradient(135deg, #111, #2c2c2c);
    color: #FFD700;

    font-weight: 900;
    font-size: 1rem;
    cursor: pointer;

    transition: 0.3s ease;
}

form button:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #FFD700, #ffb700);
    color: #111;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.55);
}

/* bottom links */
.bottom-link {
    margin-top: 22px;
    text-align: center;
    font-size: 0.9rem;
    color: #333;
}

.bottom-link a {
    color: #c99700;
    font-weight: 800;
    text-decoration: none;
}

.bottom-link a:hover {
    text-decoration: underline;
}

/* =====================================================
   LOGIN / SIGNUP SWITCH
   ===================================================== */
.form-popup .login {
    display: flex;
}

.form-popup .signup {
    display: none;
}

.form-popup.show-signup .login {
    display: none;
}

.form-popup.show-signup .signup {
    display: flex;
}

/* =====================================================
   BACKGROUND IMAGES FOR FORMS
   ===================================================== */
.login .form-details {
    background: url("../images/login-img.jpg") center/cover no-repeat;
}

.signup .form-details {
    background: url("../images/signupimg.png") center/cover no-repeat;
}

/* =====================================================
   RESPONSIVE FORM POPUP
   ===================================================== */
@media (max-width: 850px) {
    .form-box .form-details {
        display: none;
    }

    .form-content {
        width: 100%;
        padding: 45px 30px;
    }

    .form-popup {
        width: 95%;
    }
}

/* =====================================================
   RESPONSIVE RULES PAGE
   ===================================================== */
@media (max-width: 768px) {
    .rules-header h1 {
        font-size: 2rem;
    }

    .rule-card {
        padding: 26px;
    }

    .rule-card h2 {
        font-size: 1.35rem;
    }

    .rule-card p,
    .rule-card li {
        font-size: 1rem;
    }
}

.rule-card {
    opacity: 0;
    transform: translateY(30px);
    transition: 0.8s ease;
}

.rule-card.show {
    opacity: 1;
    transform: translateY(0);
}
/* ==============================
   SCROLLBAR GLOBAL (PÁGINA ENTERA)
============================== */
body::-webkit-scrollbar {
    width: 10px;
}

body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

body::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.45);
    border-radius: 12px;
}

body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 215, 0, 0.75);
}