/* ==============================================
   MOTO FAN X – GLOBAL UI THEME (PRO EDITION)
   ============================================== */

:root {
    --mf-black: #0d0d0d;
    --mf-gray: #1a1a1a;
    
    --mf-gray-light: #999;
    --mf-purple: #6b00ff;
    --mf-purple-light: #9f4dff;
    --mf-green: #00ff6a;
    --mf-green-dark: #00cc55;
    --mf-white: #ffffff;
}

/* -------- GLOBAL LAYOUT -------- */

body {
    background: var(--mf-black);
    color: var(--mf-white);
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    color: var(--mf-green);
    text-shadow: 0 0 10px rgba(0,255,100,0.3);
}

/* -------- CONTAINERS -------- */

.prediction-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    animation: fadeIn 0.5s ease-out;
}

.category-title {
    font-size: 22px;
    margin-top: 30px;
    margin-bottom: 10px;
    color: var(--mf-purple-light);
    text-shadow: 0 0 8px rgba(120,0,255,0.3);
}

/* -------- PODIUM GRID -------- */

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

.podium-slot {
    background: var(--mf-gray);
    border: 2px solid var(--mf-purple);
    border-radius: 14px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease-in-out;
    position: relative;
}

.podium-slot:hover {
    border-color: var(--mf-green);
    transform: translateY(-3px);
}

.podium-slot.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.selected-rider {
    margin-top: 12px;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    background: rgba(255,255,255,0.06);
}

.selected-rider.empty {
    opacity: 0.5;
}

/* -------- MODAL PANEL -------- */

.rider-picker-modal {
    position: fixed;
    inset: 0;
    display: none;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(6px);
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease-out;
}

.rider-picker-content {
    background: var(--mf-gray);
    padding: 20px;
    width: 95%;
    max-width: 520px;
    border-radius: 14px;
    box-shadow: 0 0 25px rgba(0,255,120,0.25);
    animation: slideUp 0.35s ease-out;
}

.modal-title {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 20px;
    text-transform: uppercase;
    color: var(--mf-green);
}

/* -------- RIDER CARDS -------- */

.rider-card {
    display: flex;
    align-items: center;
    background: var(--mf-gray-light);
    padding: 10px;
    border-radius: 12px;
    border: 1px solid #333;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.25s ease-in-out;
}

.rider-card:hover {
    background: #333;
    border-color: var(--mf-green);
    transform: translateX(3px);
}

.rider-card.disabled-card {
    opacity: 0.3;
    pointer-events: none;
}

.rider-photo {
    width: 55px;
    height: 55px;
    border-radius: 6px;
    margin-right: 12px;
    object-fit: cover;
}

.rider-info {
    display: flex;
    flex-direction: column;
}

.flag {
    width: 22px;
    height: 14px;
    margin-left: auto;
    border-radius: 2px;
}

/* -------- SELECT EXTRA -------- */

.select-extra {
    padding: 12px;
    background: var(--mf-gray-light);
    color: var(--mf-white);
    border: 2px solid var(--mf-purple);
    border-radius: 10px;
    font-size: 16px;
}

/* -------- BUTTONS -------- */

.btn-primary {
    display: inline-block;
    background: var(--mf-purple);
    color: var(--mf-white);
    padding: 14px 26px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    margin-top: 15px;
    cursor: pointer;
    transition: all 0.25s;
    text-transform: uppercase;
}

.btn-primary:hover {
    background: var(--mf-green);
    color: var(--mf-black);
    transform: scale(1.05);
}

.btn-close-modal {
    margin-top: 15px;
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: none;
    background: #333;
    color: var(--mf-white);
    cursor: pointer;
    font-size: 16px;
    transition: all 0.25s ease;
}

.btn-close-modal:hover {
    background: var(--mf-purple);
}

/* -------- LOCKED MESSAGE -------- */

.locked-box {
    padding: 15px;
    background: #331111;
    border-left: 4px solid #ff4444;
    border-radius: 8px;
    margin-bottom: 25px;
}

/* -------- ANIMATIONS -------- */

@keyframes fadeIn {
    from { opacity:0; }
    to { opacity:1; }
}

@keyframes slideUp {
    from { transform: translateY(25px); opacity:0; }
    to   { transform: translateY(0); opacity:1; }
}

/* -------- RESPONSIVE -------- */

@media (max-width: 600px) {
    .podium-grid {
        grid-template-columns: 1fr;
    }
}

.register-wrapper {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
}

label {
    display: block;
    margin-top: 15px;
    margin-bottom: 6px;
    font-size: 14px;
}

input, select {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 2px solid #333;
    background: #1a1a1a;
    color: white;
    font-size: 15px;
}

input:focus, select:focus {
    border-color: var(--mf-purple);
    outline: none;
}

.error-box {
    background: #330000;
    border-left: 4px solid #ff4444;
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 8px;
}

.success-box {
    background: #003300;
    border-left: 4px solid #00cc44;
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 8px;
}

.nick-check {
    font-size: 13px;
    margin-top: 4px;
    height: 18px;
}

.nick-error {
    color: #ff4444;
}

.nick-ok {
    color: #00ff6a;
}






.mf-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 60px 24px;
    box-sizing: border-box;
    background-color:#000;

}

.register-card {
    width: 100%;
    max-width: 460px;
    background: #111;
    padding: 35px;
    border-radius: 12px;
    box-shadow: 0 0 25px rgba(128, 0, 255, 0.25);
}

.mf-title {
    text-align: center;
    color: var(--mf-green);
    font-size: 24px;
    margin-bottom: 25px;
}

.mf-form label {
    font-size: 14px;
    margin-top: 15px;
    margin-bottom: 5px;
    display: block;
}

.mf-form input,
.mf-form select {
    width: 100%;
    padding: 12px;
    background: #1c1c1c;
    border: 2px solid #333;
    color: white;
    border-radius: 8px;
    font-size: 15px;
}

.mf-form input:focus,
.mf-form select:focus {
    border-color: var(--mf-purple);
}

.mf-btn {
    width: 100%;
    text-align:center;
    margin-top: 25px;
    text-decoration: none;
}

.mf-error-box {
    background: #3a0000;
    padding: 15px;
    border-left: 5px solid #ff3b3b;
    margin-bottom: 20px;
    border-radius: 8px;
}

.mf-success-box {
    background: #003c19;
    padding: 15px;
    border-left: 5px solid #00e676;
    margin-bottom: 20px;
    border-radius: 8px;
}





.mf-pred-cell {
    background:#1a1a1a;
    border-radius:10px;
    padding:10px 12px;
    text-align:center;
    border:1px solid #2a2a2a;
    box-shadow: inset 0 0 10px rgba(0,0,0,.3);
}

.mf-pred-cell strong {
    display:block;
    color:var(--mf-green);
    margin-bottom:4px;
    font-size:12px;
}

@media (max-width:700px) {
    .mf-pred-cell {
        font-size:12px;
    }
}







.mf-points-cell-pro {
    background:#1a1a1a;
    border-radius:14px;
    padding:14px 14px 16px;
    border:1px solid #2a2a2a;
    box-shadow: inset 0 0 12px rgba(0,0,0,.35);
}

.mf-points-champ {
    font-size:13px;
    color:#bbb;
    margin-bottom:6px;
    text-transform:uppercase;
    letter-spacing:.6px;
}

.mf-points-value-pro {
    font-size:24px;
    font-weight:800;
    color:var(--mf-green);
    margin-bottom:4px;
}

.mf-points-label-pro {
    font-size:12px;
    color:#aaa;
}








.mf-calendar-table {
    width: 100%;
    border-collapse: collapse;
    background: #0f0f0f;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 0 18px rgba(0,0,0,.6);
}

.mf-calendar-table th,
.mf-calendar-table td {
    padding: 12px 14px;
    font-size: 14px;
    text-align: left;
    white-space: nowrap;
}

.mf-calendar-table th {
    background: #1a1a1a;
    color: var(--mf-green);
    text-transform: uppercase;
    font-size: 12px;
}

.mf-calendar-table tr:nth-child(even) {
    background: #141414;
}

.mf-calendar-table tr:hover {
    background: #1d1d1d;
}

.mf-chip {
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: bold;
}

.mf-chip.future { background: #222; color: #00ff6a; }
.mf-chip.past   { background: #222; color: #ff6666; }

.mf-action {
    color: var(--mf-green);
    font-weight: bold;
    text-decoration: none;
}

.mf-action:hover {
    text-decoration: underline;
}

@media (max-width: 900px) {
    .mf-calendar-table thead {
        display: none;
    }

    .mf-calendar-table,
    .mf-calendar-table tbody,
    .mf-calendar-table tr,
    .mf-calendar-table td {
        display: block;
        width: 100%;
    }

    .mf-calendar-table tr {
        margin-bottom: 18px;
        border-left: 5px solid var(--mf-purple);
        border-radius: 12px;
        padding: 10px;
    }

    .mf-calendar-table td {
        padding: 6px 10px;
        font-size: 13px;
    }

    .mf-calendar-table td::before {
        content: attr(data-label);
        font-weight: bold;
        color: #aaa;
        display: block;
        margin-bottom: 2px;
        font-size: 11px;
        text-transform: uppercase;
    }
}





.mf-rider-pic-wrapper {
    width: 72px;
    height: 100px;
    border-radius: 14px;
    overflow: hidden;
    background: #111;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 12px rgba(0,0,0,.5);
}

.mf-rider-pic-wrapper_big {
    width: 120px;
    height: 120px;
    border-radius: 14px;
    overflow: hidden;
    background: #111;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 12px rgba(0,0,0,.5);
}

.mf-rider-pic {
    width: 100%;
    height: 100%;
    object-fit: cover;
}








/* =========================================================
   MOTO FAN X — MOBILE OPTIMIZATION PATCH
   ========================================================= */

@media (max-width: 768px) {

    body {
        font-size: 14px;
    }

    .mf-container {
        padding: 20px 12px;
        align-items: flex-start;
    }

    .register-card,
    .prediction-wrapper {
        padding: 18px;
        border-radius: 10px;
    }

    .mf-title {
        font-size: 20px;
        margin-bottom: 16px;
    }

    .page-title {
        font-size: 22px;
        margin-bottom: 12px;
    }

    /* Header / Navbar */
    header {
        padding: 10px 12px;
    }

    nav {
        flex-wrap: wrap;
        gap: 8px;
    }

    nav a {
        font-size: 13px;
        padding: 6px 8px;
    }

    /* Dashboard cards */
    .mf-points-cell-pro,
    .mf-pred-cell {
        padding: 10px;
    }

    .mf-points-value-pro {
        font-size: 20px;
    }

    /* Podium layout */
    .podium-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .podium-slot {
        padding: 10px;
    }

    /* Rider picker */
    .rider-picker-content {
        padding: 14px;
        max-height: 85vh;
        overflow-y: auto;
    }

    .rider-card {
        padding: 8px;
    }

    .rider-photo {
        width: 46px;
        height: 46px;
    }

    /* Prediction grid cards */
    .mf-rider-pic-wrapper {
        width: 60px;
        height: 60px;
        border-radius: 10px;
    }


    .mf-rider-pic-wrapper_big {
        width: 120px;
        height: 120px;
        border-radius: 10px;
    }


    .mf-rider-pic {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Calendar table mobile fix */
    .mf-calendar-table tr {
        padding: 8px;
    }

    .mf-calendar-table td {
        font-size: 12px;
    }

    /* Buttons */
    .btn-primary,
    .mf-btn button {
        padding: 12px;
        font-size: 14px;
        text-decoration: none;
    }

    /* Community trends */
    .mf-community-card,
    .mf-trends {
        padding: 12px;
    }

    /* Avoid side overflow */
    html, body {
        overflow-x: hidden;
    }
}








/* =========================================================
   MOTO FAN X — DASHBOARD MOBILE FIX
   ========================================================= */

@media (max-width: 768px) {

    body, html {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .mf-container {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        padding: 14px 10px;
        box-sizing: border-box;
    }

    header {
        width: 100%;
        padding: 10px;
    }

    .dashboard-grid {
        display: flex;
        flex-direction: column;
        gap: 14px;
        width: 100%;
    }

    .dashboard-left,
    .dashboard-right {
        width: 100%;
        max-width: 100%;
    }

    .dashboard-card {
        width: 100%;
        max-width: 100%;
        padding: 14px;
        box-sizing: border-box;
    }

    .mf-next-race {
        width: 100%;
        margin: 0;
    }

    .mf-pred-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .mf-pred-cell {
        width: 100%;
    }

    .mf-pred-title {
        font-size: 15px;
    }

    .mf-title {
        font-size: 20px;
        text-align: center;
    }

    .mf-subtitle {
        font-size: 13px;
        text-align: center;
    }

    .mf-btn,
    .mf-btn button {
        width: 100%;
    }

    .mf-rider-pic-wrapper {
        width: 56px;
        height: 56px;
    }

    .mf-community-card {
        width: 100%;
    }

    nav {
        width: 100%;
        justify-content: space-between;
    }

    nav a {
        font-size: 12px;
        padding: 6px 8px;
    }

    .hamburger {
        display: block;
    }

    .mf-calendar-table {
        font-size: 12px;
    }
}






/* ======================================================
   DASHBOARD MOBILE FIX — FORCE SINGLE COLUMN
   ====================================================== */
@media (max-width: 768px) {

    .dashboard-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
    }

    .mf-card,
    .dashboard-left,
    .dashboard-right {
        width: 100% !important;
        max-width: 100% !important;
            background-color:#000;

    }

    .mf-container {
        padding: 12px !important;
    }

    body, html {
        overflow-x: hidden !important;
    }
}





/* ======================================================
   DASHBOARD RESPONSIVE CORE FIX
   ====================================================== */

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 900px) {

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .mf-card,
    .dashboard-left,
    .dashboard-right {
        width: 100%;
        max-width: 100%;
            background-color:#000;

    }

    .mf-container {
        padding: 24px 14px;
    }

    html, body {
        overflow-x: hidden;
    }
}








.mf-home-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 24px;
}

@media (max-width: 900px) {
    .mf-home-grid {
        grid-template-columns: 1fr;
    }
}







mf-card{
        background-color:#000;
}







.mf-add-friend-btn {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 0 8px rgba(139,92,246,.4);
}

.mf-add-friend-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 14px rgba(139,92,246,.7);
}

.mf-add-friend-btn.added {
    background: #1f2933;
    color: #10ff6f;
    cursor: default;
    box-shadow: none;
}






.mf-btn,
.mf-btn-small {
    background: linear-gradient(135deg, #7a2cff, #5a00ff);
    color: #ffffff !important;
    border: none;
    border-radius: 10px;
    padding: 8px 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 0 12px rgba(122,44,255,.45);
    transition: all .25s ease;
}

.mf-btn:hover,
.mf-btn-small:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 18px rgba(122,44,255,.75);
}

.mf-premium-hint {
    background: linear-gradient(135deg, rgba(0,255,120,.12), rgba(0,255,120,.04));
    border: 1px solid rgba(0,255,120,.55);
    border-radius: 14px;
    padding: 14px;
    margin: 12px 0;
    box-shadow: 0 0 18px rgba(0,255,120,.35);
}

.mf-btn-premium {
    background: linear-gradient(135deg, #00ff84, #00c96f);
    color: #5a00ff !important;
    border: none;
    border-radius: 12px;
    padding: 10px 18px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 0 16px rgba(0,255,132,.6);
    display: inline-block;
    margin-top: 8px;
    transition: all .25s ease;
}

.mf-btn-premium:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 0 26px rgba(0,255,132,.9);
}


.mf-group-list li {
    display:flex;
    justify-content:space-between;
    padding:8px;
    margin-bottom:6px;
    background:rgba(255,255,255,.05);
    border-radius:8px;
}




.mf-group-row {
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:10px 12px;
    margin-bottom:8px;
    border-radius:12px;
    background:rgba(255,255,255,.04);
    transition:.25s;
}

.mf-group-row.joined {
    background: linear-gradient(135deg, rgba(122,44,255,.25), rgba(0,255,120,.15));
    border: 1px solid rgba(0,255,120,.6);
    box-shadow: 0 0 18px rgba(0,255,120,.25);
}

/*----Premium page--*/
.mf-premium-page {
    max-width: 600px;
    margin: 40px auto;
    padding: 40px 30px;
    text-align: center;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(122,44,255,.12), rgba(0,255,120,.08));
    box-shadow: 0 0 40px rgba(0,255,120,.35);
}

.mf-premium-page h1 {
    color: #00ff84;
    font-size: 36px;
}

.mf-premium-sub {
    font-size: 18px;
    opacity: .9;
    margin-bottom: 25px;
}

.mf-premium-features div {
    background: rgba(255,255,255,.06);
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 10px;
}

.mf-premium-cta {
    margin-top: 30px;
}

.mf-btn-premium-big {
    background: linear-gradient(135deg, #00ff84, #00c96f);
    color: #5a00ff;
    font-size: 20px;
    font-weight: 800;
    padding: 14px 30px;
    border-radius: 16px;
    display: inline-block;
    box-shadow: 0 0 30px rgba(0,255,132,.7);
    transition:.25s;
    text-decoration: none;
}

.mf-btn-premium-big:hover {
    transform: scale(1.05);
    box-shadow: 0 0 45px rgba(0,255,132,1);
}

.mf-premium-note {
    margin-top: 12px;
    font-size: 14px;
    opacity: .7;
}




.mf-msg {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(0,255,132,.15);
    color: #00ff84;
    font-weight: 600;
}






.mf-group-filters {
    margin: 15px 0 25px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.mf-btn-small {
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    transition: .2s;
}

.mf-btn-small:hover {
    background: rgba(255,255,255,.15);
}

.mf-btn-small.active {
    background: linear-gradient(135deg,#7a2cff,#00ff84);
    color: #000;
    font-weight: 700;
}


#communityTable td { vertical-align: middle; }



.mf-filters{
    display:flex;
    flex-direction:column;
    gap:15px;
    margin-bottom:20px;
}

.mf-tabs{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
}

.mf-tabs a{
    padding:8px 14px;
    background:#222;
    border-radius:8px;
    text-decoration:none;
    color:#aaa;
    font-weight:600;
}

.mf-tabs a.active{
    background:#7a2cff;
    color:white;
    box-shadow:0 0 10px rgba(122,44,255,.6);
}

.mf-table{
    width:100%;
    border-collapse:collapse;
}

.mf-table th, .mf-table td{
    padding:12px;
    text-align:left;
}

.mf-table tr.inactive{
    opacity:.4;
}

.mf-rider-pic-wrapper{
    width:60px;
    height:60px;
    overflow:hidden;
    border-radius:10px;
}

.mf-rider-pic{
    width:100%;
    height:100%;
    object-fit:cover;
}

.ok{ color:#2cff2c; font-weight:700; }
.off{ color:#ff5252; font-weight:700; }

@media(max-width:768px){
    .mf-table th:nth-child(1),
    .mf-table td:nth-child(1){
        display:none;
    }
}



.mf-weather-forecast {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.mf-forecast-day {
  flex: 1;
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 8px;
  text-align: center;
  font-size: 13px;
}

.mf-forecast-icon {
  width: 40px;
  height: 40px;
}

.mf-forecast-date {
  font-weight: bold;
  margin-bottom: 4px;
}






.mf-widget { padding: 14px; }

.mf-widget-title {
  font-weight: 800;
  font-size: 16px;
  margin-bottom: 4px;
}

.mf-widget-sub {
  font-size: 12px;
  opacity: .75;
  margin-bottom: 10px;
}

.mf-widget-table-wrap {
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}

.mf-widget-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 300px;
}

.mf-widget-table th,
.mf-widget-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 13px;
}

.mf-rank { width: 32px; opacity: .8; }

.mf-nick { font-weight: 700; }

.mf-pts {
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}


.mf-home-side{
 padding:0px;   
}
}