.profile-container {
    max-width: 1180px;
    margin: 24px auto 48px;
    padding: 0 20px 20px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 24px;
    border-radius: 16px;
    background: linear-gradient(135deg, #162024 0%, #203039 65%, #27444f 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25);
    margin-bottom: 22px;
}

.profile-avatar {
    font-size: 72px;
    line-height: 1;
    color: #8ce4bb;
}

.profile-info h2 {
    margin: 0;
    font-size: 1.75rem;
    color: #fff;
}

.profile-info p {
    margin: 6px 0 0;
    color: #c7d9dc;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.stat-card {
    background: #1f2428;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 18px;
    border-radius: 14px;
    text-align: center;
    color: #fff;
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: rgba(140, 228, 187, 0.55);
}

.stat-card i {
    font-size: 1.4rem;
    color: #8ce4bb;
}

.stat-card h3 {
    margin: 9px 0 6px;
    font-size: 0.95rem;
    color: #c3d1d4;
    font-weight: 600;
}

.stat-card p {
    margin: 0;
    font-size: 1.55rem;
    font-weight: 700;
}

#openTransactions {
    cursor: pointer;
}

#withdrawButton.withdraw-button {
    margin: 10px auto 0;
    padding: 8px 12px;
    border: 1px solid rgba(140, 228, 187, 0.5);
    border-radius: 8px;
    color: #d7fff3;
    background: rgba(140, 228, 187, 0.12);
    font-size: 0.9rem;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#withdrawButton.withdraw-button i {
    font-size: 0.85rem;
    color: inherit;
}

.pnl-card,
.bet-history {
    background: #1f2428;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 16px;
    color: #fff;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
}

.pnl-card {
    margin-bottom: 18px;
}

.pnl-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.pnl-header h3 {
    margin: 0;
}

#pnlCurrent {
    margin: 0;
    color: #d4e9eb;
    font-weight: 600;
}

#pnlRange {
    margin: 10px 0 0;
    color: #9bb0b5;
    font-size: 0.9rem;
}

#pnlChart {
    width: 100%;
    height: 180px;
    background: #171c20;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.bet-history h3 {
    margin-top: 0;
    margin-bottom: 12px;
}

#betHistoryTable {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border-radius: 10px;
}

#betHistoryTable th,
#betHistoryTable td {
    padding: 10px 8px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#betHistoryTable th {
    background: #273038;
    color: #d7e9ea;
    font-weight: 600;
}

#betHistoryTable td {
    background: #20272c;
    color: #f4f8f9;
}

#betHistoryTable tr:hover td {
    background: #263038;
}

.details-button {
    padding: 6px 10px;
    background-color: #2d8f64;
    border: none;
    color: white;
    border-radius: 6px;
    cursor: pointer;
}

.details-button:hover {
    background-color: #267f58;
}

.modal:not(.hidden) {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #232a2f;
    color: #fff;
}

.modal-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 6px 0 16px;
    flex-wrap: wrap;
}

.modal-filters input[type="date"] {
    background: #1a2126;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 7px 10px;
}

.modal-filters button {
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    color: #fff;
    background: #2d8f64;
}

.modal-filters button#clearTxFilter {
    background: #384248;
}

#transactionsTable {
    width: 100%;
    border-collapse: collapse;
}

#transactionsTable th,
#transactionsTable td {
    padding: 9px 8px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

#transactionsTable th {
    color: #d7e9ea;
    background: #273038;
}

#transactionsTable td {
    color: #f4f8f9;
}

@media (max-width: 860px) {
    .profile-container {
        padding: 0 12px 16px;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
        padding: 18px;
        gap: 10px;
    }

    #betHistoryTable {
        font-size: 0.86rem;
    }
}
