/* Carduri rotunjite — UIkit necesită override pe .uk-card-default */
.uk-card-default {
    border-radius: 16px !important;
    overflow: hidden !important; /* necesar ca fundalul verde să respecte colțurile */
}

/* Dacă ai carduri primary sau secondary, le rotunjim și pe ele */
.uk-card-primary, 
.uk-card-secondary {
    border-radius: 16px !important;
    overflow: hidden !important;
}

/* Butoane rotunde */
.uk-button {
    border-radius: 10px !important;
}

/* Butoane disabled roșii */
.uk-button[disabled],
.uk-button:disabled {
    background-color: #d9534f !important;
    color: white !important;
    border-color: #d9534f !important;
    opacity: 1 !important;
    cursor: not-allowed !important;
}

/* Acțiunile din carduri */
.card-actions .uk-button {
    margin: 3px;
}

/* Fix pentru înălțimi egale */
.card-equal {
    display: flex;
    flex-direction: column;
}

.card-equal .card-actions {
    margin-top: auto;
}

.text-dark {
    color: #000 !important;
}

.uk-button-yellow {
    background-color: #ffd43b !important; /* galben */
    color: #000 !important;               /* text negru */
    border: 1px solid #e6be2f !important; /* border galben închis */
    border-radius: 10px !important;       /* rotund ca restul */
}

.uk-button-yellow:hover {
    background-color: #ffca28 !important; /* galben puțin mai intens la hover */
    border-color: #d4a821 !important;
}
.market-buy-card h4,
.market-buy-card .buy-price {
    color: #1e87f0 !important;  /* albastru UIkit */

}
 #userPointsCard h3, #userPointsCard h4, #userPointsCard .points-value {
        color: white !important;
    }
    .points-value {
        font-size: 1.6rem;
        font-weight: bold;
        margin-top: 6px;
    }
    
    .sidebar .uk-nav > li > a {
    text-align: center;              /* centrează textul */
    display: flex !important;        /* pentru aliniere perfectă */
    justify-content: center;         /* centrează conținutul */
    align-items: center;             /* centrează vertical */
    gap: 6px;                        /* spațiu între icon și text */
}

.sidebar img {
    margin-left: auto !important;
    margin-right: auto !important;   /* centrează logo-ul */
    display: block;
}

.achievement-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.achievement-body {
    flex: 1;
}

.achievement-footer {
    margin-top: auto;
}

/* STATES */
.state-locked {
    background: #fff6cc;
    border: 2px dashed #f1c40f;
}

.state-ready {
    background: #e9f9ef;
    border: 2px solid #2ecc71;
}

.state-collected {
    background: #e7f1ff;
    border: 2px solid #3498db;
}
.page-footer {
    margin-top: auto; /* împinge footer-ul în jos */
}

.footer-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}
html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
}
.nowrap {
  white-space: nowrap;
}

/* =====================================================
   LIGHT THEME – MESSAGING MODULE
   ===================================================== */

/* Variabile globale */
:root {
    --bg-page: #f4f6fb;
    --bg-panel: #ffffff;
    --bg-hover: #f1f5f9;

    --border: #e5e7eb;

    --text-main: #111827;
    --text-muted: #6b7280;

    --primary: #2563eb;
    --primary-soft: #e0e7ff;

    --unread: #ef4444;
}

/* Container general */
#mail-module {
    background: var(--bg-page);
    color: var(--text-main);
    border-radius: 16px;
}

/* =====================================================
   CONVERSATION LIST (STÂNGA)
   ===================================================== */

#mail-conversation-list {
    padding-right: 6px;
}

/* Card conversație */
.mail-conv {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 16px;

    /* DISTANȚĂ ÎNTRE CONVERSAȚII */
    margin-bottom: 12px;

    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

/* Hover */
.mail-conv:hover {
    background: var(--bg-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.04);
}

/* Conversație activă */
.mail-conv.active {
    background: var(--primary-soft);
    border-color: var(--primary);
}

/* Conversație necitită */
.mail-conv.unread {
    border-left: 4px solid var(--unread);
}

/* Username */
.mail-conv strong {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
}

/* Ultimul mesaj */
.mail-conv .uk-text-muted {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 4px;
}

/* Dată */
.mail-conv .uk-text-meta {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 6px;
}

/* Badge necitite */
.mail-conv .uk-label-danger {
    background: var(--unread);
    font-size: 11px;
    border-radius: 999px;
    padding: 2px 7px;
}

/* =====================================================
   CHAT AREA (DREAPTA)
   ===================================================== */

#mail-messages {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
}

/* Mesaj generic */
.mail-msg {
    max-width: 72%;
    padding: 12px 16px;
    border-radius: 16px;
    margin-bottom: 12px;
    line-height: 1.45;
    word-wrap: break-word;
    font-size: 14px;
}

/* Mesaj trimis de user */
.mail-msg.me {
    background: var(--primary);
    color: #ffffff;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

/* Mesaj primit */
.mail-msg.them {
    background: #f3f4f6;
    color: var(--text-main);
    margin-right: auto;
    border-bottom-left-radius: 4px;
}

/* Ora mesajului */
.mail-msg .time {
    font-size: 11px;
    margin-top: 6px;
    opacity: 0.7;
    text-align: right;
}

/* =====================================================
   INPUT & SEND
   ===================================================== */

#mail-message-input {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 10px 12px;
    font-size: 14px;
    color: var(--text-main);
    resize: none;
}

#mail-message-input:focus {
    border-color: var(--primary);
    outline: none;
}

#mail-send-btn {
    background: var(--primary);
    border-radius: 14px;
    padding: 0 20px;
}

/* =====================================================
   TITLURI
   ===================================================== */

#mail-chat-title {
    font-weight: 600;
    color: var(--text-main);
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 960px) {
    #mail-messages {
        height: 320px !important;
    }

    .mail-msg {
        max-width: 85%;
    }
}


/* ===== WRAPPER ===== */
.leaderboard-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-left: 12px;
    padding-right: 12px;
}

/* ===== TABLE ===== */
#lbTable {
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

/* ===== STICKY HEADER ===== */
#lbTable thead th {
    position: sticky;
    top: 0;
    z-index: -1;
    background: #f8f8f8;
    box-shadow: 0 2px 0 rgba(0,0,0,0.06);
}

/* ===== CELLS ===== */
#lbTable th,
#lbTable td {
    white-space: nowrap;
    vertical-align: middle;
    font-size: 14px;
    padding: 10px 12px;
}

#lbTable th {
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: .04em;
}

/* Coloane fixe */
#lbTable th:nth-child(1),
#lbTable td:nth-child(1) {
    width: 60px;
}

#lbTable th:nth-child(2),
#lbTable td:nth-child(2) {
    min-width: 200px;
}

/* ===== ACTIONS ===== */
.lb-actions a {
    margin: 0 4px;
}

/* ===== CURRENT USER ===== */
.current-user-row {
    background: rgba(255, 215, 0, 0.25) !important;
}

/* ===== MEDALS ===== */
.medal {
    font-size: 18px;
    margin-right: 4px;
}

/* ===== SEARCH INPUT ===== */
.lb-search {
    max-width: 260px;
}

/* ===== MOBILE ===== */
@media (max-width: 640px) {

    .content-area {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .uk-container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    #lbTable th,
    #lbTable td {
        font-size: 13px;
        padding: 8px 10px;
    }
}

/* UIkit grid să nu taie scroll */
.uk-grid {
    overflow-x: visible !important;
}

