@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@500;700&display=swap');

body {
    background-image: linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.65)), url('/app/assets/img/hinhnen2.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    font-family: 'Quicksand', Arial, sans-serif;
    margin: 0;
    font-size: 13px;
    /* giảm cỡ chữ toàn trang để phù hợp max-width 630px */
    min-height: 100vh;
    position: relative;
}

/* Global background softener for readability */
body::before {
    content: "";
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    /* Darken background slightly for winter vibe (keep content readable) */
    background: rgba(0, 0, 0, 0.65);
    pointer-events: none;
    z-index: -1;
}

.page-container {
    max-width: 630px;
    margin: 0 auto;
    padding: 0 10px;
    position: relative;
    z-index: 1;
    /* keep content above the background overlay */
}

.header {
    background: linear-gradient(90deg, #2b7a78 0%, #7ee6d3 100%);
    color: #fff;
    padding: 32px 0 20px 0;
    text-align: center;
    border-radius: 28px 28px 0 0;
    margin-bottom: 14px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.15);
    font-size: 38px;
    letter-spacing: 2px;
    font-weight: bold;
    position: relative;
    animation: fadeInDown 1s;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-size: 40px;
    font-weight: bold;
    letter-spacing: 2px;
    text-shadow: 0 2px 8px #7ee6d3aa;
}

.logo .icon-heart {
    color: #ff4d6d;
    font-size: 34px;
    margin: 0 2px;
    filter: drop-shadow(0 0 6px #ffb3c6);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }
}

.logo .icon-cloud {
    color: #fff;
    font-size: 34px;
    margin-left: 2px;
    filter: drop-shadow(0 2px 8px #2b7a78);
}

.menu {
    background: linear-gradient(90deg, #d0f5b1 0%, #e0e7ff 100%);
    padding: 8px 6px;
    text-align: center;
    border-bottom: 2.5px solid #2b7a78;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: 6px;
    box-shadow: 0 2px 12px rgba(43, 122, 120, 0.15);
}

.menu a {
    color: #333;
    text-decoration: none;
    padding: 8px 10px;
    font-weight: bold;
    font-size: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(90deg, #fff 60%, #e0e7ff 100%);
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(43, 122, 120, 0.08);
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Heading sizes cho toàn site (thân thiện 630px) */
h1 {
    font-size: 20px;
}

h2 {
    font-size: 18px;
}

h3 {
    font-size: 16px;
}

h4,
h5,
h6 {
    font-size: 14px;
}

.menu a i {
    font-size: 14px;
}

.menu a.active,
.menu a:hover {
    background: linear-gradient(90deg, #7ee6d3 0%, #2b7a78 100%);
    color: #fff;
    box-shadow: 0 4px 16px #7ee6d388;
}

.login-box {
    background: linear-gradient(120deg, #fff 60%, #e0e7ff 100%);
    max-width: 100%;
    margin: 40px auto 20px auto;
    padding: 38px 18px 28px 18px;
    border-radius: 28px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.15);
    text-align: center;
    animation: fadeInUp 1s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-box input[type=text],
.login-box input[type=password] {
    width: 98%;
    padding: 15px;
    margin: 12px 0;
    border: none;
    border-radius: 12px;
    font-size: 20px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(43, 122, 120, 0.08);
    outline: none;
    transition: box-shadow 0.2s;
}

.login-box input[type=text]:focus,
.login-box input[type=password]:focus {
    box-shadow: 0 2px 16px #7ee6d3aa;
}

.login-box button {
    background: linear-gradient(90deg, #7ee6d3 0%, #2b7a78 100%);
    color: #fff;
    border: none;
    padding: 13px 38px;
    border-radius: 12px;
    font-weight: bold;
    margin-top: 18px;
    cursor: pointer;
    font-size: 20px;
    box-shadow: 0 2px 8px rgba(43, 122, 120, 0.15);
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.login-box button:hover {
    background: linear-gradient(90deg, #2b7a78 0%, #7ee6d3 100%);
    color: #fff;
    box-shadow: 0 4px 16px #7ee6d388;
}

.box {
    background: linear-gradient(120deg, #fff 60%, #e0e7ff 100%);
    border: none;
    border-radius: 28px;
    margin: 18px auto;
    max-width: 100%;
    padding: 0;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.15);
    animation: fadeInUp 1s;
}

.box-title {
    background: linear-gradient(90deg, #7ee6d3 0%, #2b7a78 100%);
    color: #fff;
    padding: 18px 24px;
    border-radius: 28px 28px 0 0;
    font-weight: bold;
    font-size: 22px;
    letter-spacing: 1px;
    box-shadow: 0 2px 8px rgba(43, 122, 120, 0.15);
}

/* Footer online box constraint */
#online-box {
    max-width: 630px;
    margin: 10px auto;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    background: url('/app/assets/img/foot.png') center/cover no-repeat;
    padding: 10px;
    position: relative;
    border-radius: 16px;
    color: #fff;
}

#online-box * {
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

#online-box::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

#online-box>* {
    position: relative;
}

#online-box #online {
    overflow-x: auto;
}

.chat-list {
    padding: 18px 10px 18px 10px;
    background: #ffffff;
    min-height: 180px;
    border-radius: 0 0 28px 28px;
}

.chat-item {
    display: flex;
    align-items: flex-start;
    border-bottom: 1.5px solid #e0e0e0;
    padding: 15px 0;
    border-radius: 18px;
    transition: background 0.2s;
}

.chat-item:hover {
    background: #e0e7ff44;
}

.chat-item:last-child {
    border-bottom: none;
}

.avatar {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    margin-right: 16px;
    border: 3px solid #2b7a78;
    object-fit: cover;
    background: #fff;
    box-shadow: 0 2px 8px #7ee6d3aa;
    transition: box-shadow 0.2s, border 0.2s;
}

.status-online+.username~.avatar {
    border: 3px solid #4cd137;
    box-shadow: 0 0 12px #4cd13799;
}

.chat-content {
    flex: 1;
}

.username {
    font-weight: bold;
    color: #e74c3c;
    font-size: 20px;
    margin-right: 10px;
    text-shadow: 0 1px 2px #fff;
}

.status-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    margin-right: 6px;
    margin-bottom: 1px;
    box-shadow: 0 0 6px #fff;
}

.status-online {
    background: #4cd137;
    border: 2px solid #2ecc40;
}

.status-offline {
    background: #bbb;
    border: 2px solid #888;
}

.time {
    color: #888;
    font-size: 15px;
    margin-left: 14px;
}

.message {
    display: block;
    font-size: 19px;
    margin-top: 4px;
    word-break: break-word;
    color: #222;
}

.topic-list {
    background: #ffffff;
    padding: 18px 10px 18px 10px;
    border-radius: 0 0 28px 28px;
}

.topic-item {
    display: flex;
    align-items: center;
    background: linear-gradient(90deg, #ffffff 0%, #f7fafc 100%);
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(44, 187, 99, 0.07);
    margin-bottom: 12px;
    padding: 14px 18px;
    transition: box-shadow 0.2s, background 0.2s;
}

.topic-item:hover {
    background: linear-gradient(90deg, #c6f7e2 0%, #e0ffe8 100%);
    box-shadow: 0 4px 16px rgba(44, 187, 99, 0.15);
}

.topic-item:last-child {
    border-bottom: none;
}

.topic-icon {
    color: #3ecf8e;
    font-size: 1.6em;
    margin-right: 14px;
}

.topic-count {
    background: #3ecf8e;
    color: #fff;
    border-radius: 12px;
    padding: 2px 10px;
    font-size: 0.95em;
    margin: 0 10px;
    min-width: 32px;
    text-align: center;
    display: inline-block;
}

.topic-item a {
    flex: 1;
    font-weight: 600;
    color: #2b7a78;
    text-decoration: none;
    font-size: 1.1em;
}

.topic-user {
    color: #888;
    margin-left: 10px;
    font-size: 1em;
}

.stats {
    background: linear-gradient(90deg, #2b7a78 0%, #7ee6d3 100%);
    color: #fff;
    padding: 20px 12px;
    border-radius: 0 0 28px 28px;
    font-size: 20px;
    text-align: center;
    margin-top: 16px;
    box-shadow: 0 2px 8px rgba(43, 122, 120, 0.15);
}

.stats .note {
    color: #fff;
    font-size: 16px;
    margin-top: 10px;
    display: block;
}

@media (max-width: 600px) {
    body {
        font-size: 16px;
    }

    .page-container {
        padding: 0 5px;
    }

    .header {
        font-size: 20px;
        border-radius: 14px 14px 0 0;
        padding: 14px 0 8px 0;
    }

    .logo {
        font-size: 18px;
        gap: 8px;
    }

    /* Một hàng, không bị xuống dòng; mỗi item chiếm đều, trượt ngang nếu tràn */
    .menu {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: 1fr;
        gap: 4px;
        padding: 6px;
        overflow-x: auto;
    }

    .menu a {
        font-size: 13px;
        padding: 6px 8px;
        border-radius: 8px;
        min-height: 32px;
        gap: 4px;
    }

    .menu a i {
        font-size: 12px;
    }

    .box,
    .login-box {
        max-width: 100%;
        border-radius: 14px;
        margin: 12px auto;
        padding: 0;
    }

    .box-title {
        font-size: 16px;
        padding: 14px 10px;
        border-radius: 14px 14px 0 0;
    }
}

@media (max-width: 450px) {
    .menu {
        grid-auto-columns: 1fr;
    }

    .menu a {
        font-size: 0;
        padding: 8px;
        min-width: 0;
        justify-content: center;
    }

    .menu a i {
        font-size: 16px;
        margin: 0;
    }

    .main-columns {
        flex-direction: column !important;
        gap: 0 !important;
    }

    .main-col,
    .main-col-left {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .main-columns>.main-col>.box {
        margin: 10px 0 !important;
    }

    .chat-list {
        padding: 14px 6px;
        min-height: 120px;
        border-radius: 0 0 14px 14px;
    }

    .chat-item {
        padding: 10px 0;
        border-radius: 12px;
    }

    .avatar {
        width: 38px;
        height: 38px;
        margin-right: 8px;
        border-width: 2px;
        min-width: 36px;
        min-height: 36px;
    }

    .username {
        font-size: 15px;
        margin-right: 6px;
    }

    .status-dot {
        width: 10px;
        height: 10px;
        margin-right: 4px;
    }

    .time {
        font-size: 12px;
        margin-left: 6px;
    }

    .message {
        font-size: 16px;
        margin-top: 3px;
    }

    .chat-form-custom {
        padding: 10px;
        gap: 8px;
        border-radius: 0 0 14px 14px;
    }

    .chat-form-custom input[type=text] {
        font-size: 15px;
        padding: 10px 12px;
        border-radius: 8px;
        min-height: 36px;
    }

    .chat-form-custom button {
        font-size: 15px;
        padding: 0 18px;
        border-radius: 8px;
        min-height: 36px;
    }

    .category-box {
        border-radius: 14px;
        margin-top: 12px;
    }

    .category-list {
        padding: 10px 4px;
        gap: 10px;
    }

    .category-item {
        font-size: 15px;
        padding: 12px 12px;
        border-radius: 10px;
        gap: 8px;
        min-height: 36px;
    }

    .category-icon {
        font-size: 16px;
        min-width: 20px;
    }

    .download-box {
        border-radius: 14px;
        margin-bottom: 12px;
    }

    .download-list {
        gap: 8px;
        padding: 10px 0 8px 0;
    }

    .download-btn {
        font-size: 15px;
        padding: 8px 18px;
        border-radius: 10px;
        min-height: 36px;
    }

    .compact-download {
        border-radius: 10px;
    }

    .compact-download-list {
        gap: 6px;
        padding: 6px 0 5px 0;
    }

    .compact-btn {
        font-size: 13px !important;
        padding: 5px 12px !important;
        border-radius: 7px !important;
        min-height: 36px;
    }

    .stats {
        font-size: 15px;
        border-radius: 0 0 14px 14px;
        padding: 12px 6px;
    }

    .profile-box {
        max-width: 100%;
        border-radius: 10px;
        padding: 12px 4px 12px 4px;
    }

    .profile-box button {
        font-size: 14px;
        padding: 7px 14px;
        border-radius: 8px;
        min-height: 36px;
    }

    .profile-box input[type="password"] {
        font-size: 14px;
        padding: 8px 10px;
        border-radius: 8px;
        min-height: 36px;
    }

    .profile-header {
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }

    .profile-info {
        text-align: center;
    }

    .profile-avatar {
        width: 38px;
        height: 38px;
    }

    .profile-username {
        font-size: 15px;
    }

    .profile-section {
        padding: 10px 3px;
        border-radius: 8px;
    }

    .profile-section-title {
        font-size: 13px;
    }

    .profile-logout-btn {
        font-size: 14px;
        padding: 7px 14px;
        border-radius: 8px;
        min-height: 36px;
    }

    .admin-table th,
    .admin-table td {
        font-size: 13px;
        padding: 7px 4px;
    }

    .admin-action {
        font-size: 14px;
        padding: 7px 12px;
        border-radius: 8px;
        min-height: 36px;
    }

    #toast.toast,
    .toast {
        font-size: 14px;
        padding: 10px 18px;
        border-radius: 10px;
        min-width: 140px;
    }

    #delete-modal {
        min-width: 200px;
        padding: 16px 12px 12px 12px;
        border-radius: 12px;
    }

    #delete-modal .modal-title {
        font-size: 15px;
        margin-bottom: 8px;
    }

    #delete-modal .modal-desc {
        font-size: 13px;
        margin-bottom: 12px;
    }

    #delete-modal .modal-btn {
        font-size: 14px;
        padding: 7px 16px;
        border-radius: 8px;
        min-height: 36px;
    }
}

.error {
    color: #e74c3c;
    margin-bottom: 12px;
    font-weight: bold;
}

.main-columns {
    display: flex;
    gap: 32px;
    margin: 0 auto 0 auto;
    align-items: flex-start;
    justify-content: center;
}

.main-col {
    flex: 1 1 0;
    min-width: 0;
}

.main-col-left {
    max-width: none;
    flex: 1 1 0;
    width: 100%;
}

@media (max-width: 970px) {
    .page-container {
        max-width: 100%;
        padding: 0 5px;
    }

    .main-columns {
        flex-direction: column;
        gap: 0;
    }

    .main-col-left {
        flex: 1 1 0;
        width: 100%;
    }
}

.category-box {
    margin-top: 18px;
    background: linear-gradient(120deg, #fff 60%, #e0e7ff 100%);
    border-radius: 28px;
    box-shadow: 0 4px 24px rgba(43, 122, 120, 0.15);
}

.category-list {
    padding: 18px 10px 18px 10px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.category-item {
    font-size: 19px;
    font-weight: 600;
    color: #3a3a3a;
    background: linear-gradient(90deg, #e0e7ff 0%, #ffffff 100%);
    border-radius: 16px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 2px 8px rgba(43, 122, 120, 0.08);
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.category-item:hover {
    background: linear-gradient(90deg, #7ee6d3 0%, #2b7a78 100%);
    color: #fff;
    box-shadow: 0 4px 16px #7ee6d388;
}

.category-icon {
    font-size: 22px;
    color: #7ec850;
    filter: drop-shadow(0 2px 4px rgba(43, 122, 120, 0.22));
    min-width: 28px;
    text-align: center;
}

@media (max-width: 970px) {
    .category-box {
        border-radius: 16px;
    }

    .category-list {
        padding: 12px 5px;
        gap: 10px;
    }

    .category-item {
        font-size: 16px;
        padding: 10px 10px;
        border-radius: 10px;
    }

    .category-icon {
        font-size: 18px;
        min-width: 22px;
    }
}

.download-box {
    margin-bottom: 18px;
    background: linear-gradient(120deg, #fff 60%, #e0e7ff 100%);
    border-radius: 28px;
    box-shadow: 0 4px 24px rgba(43, 122, 120, 0.15);
}

.download-list {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    justify-content: center;
    padding: 18px 0 10px 0;
}

.download-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 19px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(90deg, #7ee6d3 0%, #2b7a78 100%);
    border: none;
    border-radius: 16px;
    padding: 13px 28px;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(43, 122, 120, 0.08);
    transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.1s;
    outline: none;
    cursor: pointer;
    position: relative;
}

.download-btn .fa {
    font-size: 22px;
}

.download-btn.jar {
    background: linear-gradient(90deg, #ffb347 0%, #ffcc80 100%);
    color: #7a4c00;
}

.download-btn.apk {
    background: linear-gradient(90deg, #43e97b 0%, #38f9d7 100%);
    color: #006c3c;
}

.download-btn.ipa {
    background: linear-gradient(90deg, #a1c4fd 0%, #c2e9fb 100%);
    color: #1a237e;
}

.download-btn.exe {
    background: linear-gradient(90deg, #7f7fd5 0%, #86a8e7 50%, #91eac9 100%);
    color: #222;
}

.download-btn:hover {
    filter: brightness(1.08);
    box-shadow: 0 4px 16px #7ee6d388;
    transform: translateY(-2px) scale(1.04);
    color: #fff !important;
}

@media (max-width: 970px) {
    .download-box {
        border-radius: 16px;
    }

    .download-list {
        gap: 10px;
        padding: 12px 0 7px 0;
    }

    .download-btn {
        font-size: 16px;
        padding: 10px 14px;
        border-radius: 10px;
    }

    .download-btn .fa {
        font-size: 18px;
    }
}

.compact-download {
    margin-bottom: 10px;
    padding: 0 0 0 0;
    box-shadow: 0 2px 8px rgba(43, 122, 120, 0.08);
    border-radius: 18px;
    background: #fff;
}

.compact-download-list {
    display: flex;
    gap: 8px;
    justify-content: center;
    padding: 10px 0 7px 0;
}

.compact-btn {
    font-size: 15px !important;
    padding: 6px 16px !important;
    border-radius: 8px !important;
    min-width: 48px;
    font-weight: 700;
    box-shadow: none !important;
    background: #e0e7ff !important;
    color: #333 !important;
    border: 1px solid #2b7a78;
    transition: background 0.2s, color 0.2s, border 0.2s;
}

.compact-btn:hover {
    background: #2b7a78 !important;
    color: #fff !important;
    border: 1px solid #7ee6d3;
}

.chat-form-custom {
    padding: 10px;
    display: flex;
    gap: 7px;
    background: #ffffff;
    border-radius: 0 0 18px 18px;
    box-shadow: 0 2px 8px rgba(43, 122, 120, 0.08);
}

.chat-form-custom input[type=text] {
    flex: 1;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1.5px solid #2b7a78;
    font-size: 16px;
    outline: none;
    background: #fff;
    transition: box-shadow 0.2s, border 0.2s;
}

.chat-form-custom input[type=text]:focus {
    box-shadow: 0 2px 8px #7ee6d3aa;
    border: 1.5px solid #7ee6d3;
}

.chat-form-custom button {
    background: linear-gradient(90deg, #7ee6d3 0%, #2b7a78 100%);
    color: #fff;
    border: none;
    padding: 0 22px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(43, 122, 120, 0.15);
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.chat-form-custom button:hover {
    background: linear-gradient(90deg, #2b7a78 0%, #7ee6d3 100%);
    color: #fff;
    box-shadow: 0 4px 16px #7ee6d388;
}

@media (max-width: 600px) {
    .chat-form-custom input[type=text] {
        font-size: 14px;
        padding: 8px 8px;
    }

    .chat-form-custom button {
        font-size: 14px;
        padding: 0 10px;
    }
}

.profile-box {
    max-width: 420px;
    margin: 40px auto 30px auto;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 2px 12px rgba(43, 122, 120, 0.15);
    padding: 32px 18px 24px 18px;
    text-align: center;
    animation: fadeInUp 0.7s;
}

.profile-box input[type="file"] {
    margin: 8px 0;
}

.profile-box input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1.5px solid #2b7a78;
    font-size: 15px;
    margin-bottom: 8px;
    background: #ffffff;
    transition: box-shadow 0.2s, border 0.2s;
}

.profile-box input[type="password"]:focus {
    box-shadow: 0 2px 8px #7ee6d3aa;
    border: 1.5px solid #7ee6d3;
}

.profile-box button {
    background: linear-gradient(90deg, #7ee6d3 0%, #2b7a78 100%);
    color: #fff;
    border: none;
    padding: 8px 22px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(43, 122, 120, 0.15);
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    margin-top: 4px;
}

.profile-box button:hover {
    background: linear-gradient(90deg, #2b7a78 0%, #7ee6d3 100%);
    color: #fff;
    box-shadow: 0 4px 16px #7ee6d388;
}

@media (max-width: 600px) {
    .profile-box {
        max-width: 99vw;
        border-radius: 14px;
        padding: 18px 4px 14px 4px;
    }

    .profile-box button {
        font-size: 13px;
        padding: 7px 10px;
    }

    .profile-box input[type="password"] {
        font-size: 13px;
        padding: 8px 8px;
    }
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
}

.profile-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 3px solid #7ee6d3;
    box-shadow: 0 2px 8px rgba(43, 122, 120, 0.22);
    background: #fff;
    object-fit: cover;
}

.profile-info {
    flex: 1;
    text-align: left;
}

.profile-username {
    font-size: 24px;
    font-weight: bold;
    color: #2b7a78;
}

.profile-role {
    color: #888;
    font-size: 15px;
    margin-bottom: 8px;
}

.profile-money span {
    display: block;
    color: #3ecf8e;
    font-size: 16px;
    margin-bottom: 2px;
}

.profile-section {
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 2px 8px rgba(43, 122, 120, 0.08);
    padding: 18px 14px;
    margin-bottom: 18px;
    text-align: left;
}

.profile-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #2b7a78;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.profile-logout-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    background: #e74c3c;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 2px 8px #e74c3c22;
    transition: background 0.2s, box-shadow 0.2s;
}

.profile-logout-btn:hover {
    background: #c0392b;
    box-shadow: 0 4px 16px #e74c3c44;
}

@media (max-width: 600px) {
    .profile-header {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .profile-info {
        text-align: center;
    }

    .profile-section {
        padding: 12px 4px;
        border-radius: 10px;
    }

    .profile-avatar {
        width: 64px;
        height: 64px;
    }

    .profile-username {
        font-size: 18px;
    }

    .profile-section-title {
        font-size: 14px;
    }

    .profile-logout-btn {
        font-size: 14px;
        padding: 8px 12px;
    }
}

.deposit-main {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: wrap;
}

.deposit-methods {
    flex: 1 1 260px;
    background: linear-gradient(120deg, #fff 60%, #e0e7ff 100%);
    border-radius: 18px;
    box-shadow: 0 2px 8px rgba(43, 122, 120, 0.08);
    padding: 18px 18px 10px 18px;
    min-width: 260px;
    max-width: 320px;
}

.deposit-form {
    flex: 2 2 340px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 2px 8px rgba(43, 122, 120, 0.08);
    padding: 24px 24px 18px 24px;
    min-width: 340px;
    max-width: 420px;
    margin-bottom: 0;
}

.deposit-form label {
    font-weight: 600;
    color: #2b7a78;
    margin-right: 18px;
}

.deposit-form input,
.deposit-form select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1.5px solid #2b7a78;
    font-size: 15px;
    margin-bottom: 10px;
    background: #fff;
    transition: box-shadow 0.2s, border 0.2s;
}

.deposit-form input:focus,
.deposit-form select:focus {
    box-shadow: 0 2px 8px #7ee6d3aa;
    border: 1.5px solid #7ee6d3;
}

.deposit-form button {
    background: linear-gradient(90deg, #7ee6d3 0%, #2b7a78 100%);
    color: #fff;
    border: none;
    padding: 10px 28px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 17px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(43, 122, 120, 0.15);
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    margin-top: 8px;
}

.deposit-form button:hover {
    background: linear-gradient(90deg, #2b7a78 0%, #7ee6d3 100%);
    color: #fff;
    box-shadow: 0 4px 16px #7ee6d388;
}

.deposit-table {
    width: 100%;
    margin-top: 8px;
    font-size: 15px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(43, 122, 120, 0.08);
    background: #fff;
}

.deposit-table th,
.deposit-table td {
    padding: 8px 10px;
    text-align: center;
}

.deposit-table th {
    background: #e0ffe8;
    color: #2b7a78;
    font-weight: bold;
}

.deposit-table tr:nth-child(even) {
    background: #fcfdfd;
}

.deposit-history {
    margin-top: 24px;
    background: linear-gradient(120deg, #fff 60%, #e0e7ff 100%);
    border-radius: 18px;
    box-shadow: 0 2px 8px rgba(43, 122, 120, 0.08);
    padding: 18px 18px 10px 18px;
}

@media (max-width: 970px) {
    .deposit-main {
        flex-direction: column;
        gap: 0;
    }

    .deposit-methods,
    .deposit-form,
    .deposit-history {
        max-width: 100%;
        min-width: 0;
    }

    .deposit-form {
        padding: 14px 6px 10px 6px;
    }
}

.deposit-method-select {
    display: flex;
    gap: 18px;
    justify-content: center;
    margin-bottom: 18px;
}

.deposit-method-option {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #e0ffe8;
    border-radius: 12px;
    padding: 10px 22px;
    font-size: 16px;
    font-weight: 600;
    color: #2b7a78;
    cursor: pointer;
    border: 2px solid #e0ffe8;
    transition: background 0.2s, border 0.2s, color 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(43, 122, 120, 0.08);
    user-select: none;
}

.deposit-method-option:hover {
    background: #c6f7e2;
    border: 2px solid #7ee6d3;
    color: #1a5a5a;
}

.deposit-method-radio {
    accent-color: #3ecf8e;
    width: 20px;
    height: 20px;
}

.deposit-method-option.active {
    background: linear-gradient(90deg, #7ee6d3 0%, #2b7a78 100%);
    color: #fff;
    border: 2px solid #7ee6d3;
    box-shadow: 0 4px 16px #7ee6d388;
}

@media (max-width: 600px) {
    .deposit-method-select {
        flex-direction: column;
        gap: 8px;
    }

    .deposit-method-option {
        font-size: 14px;
        padding: 8px 10px;
    }
}

.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(43, 122, 120, 0.08);
    overflow: hidden;
    margin-bottom: 18px;
}

.admin-table th,
.admin-table td {
    padding: 12px 10px;
    text-align: center;
    font-size: 16px;
}

.admin-table th {
    background: linear-gradient(90deg, #7ee6d3 0%, #2b7a78 100%);
    color: #fff;
    font-weight: bold;
    border-bottom: 2px solid #e0e0e0;
}

.admin-table tr {
    transition: background 0.2s;
}

.admin-table tr:nth-child(even) {
    background: #fcfdfd;
}

.admin-table tr:hover {
    background: #e0ffe8;
}

.admin-action {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    margin: 0 2px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    cursor: pointer;
}

.admin-action.delete {
    background: #e74c3c;
    color: #fff;
}

.admin-action.delete:hover {
    background: #c0392b;
}

.admin-action.admin {
    background: #3ecf8e;
    color: #fff;
}

.admin-action.admin:hover {
    background: #2b7a78;
}

@media (max-width: 970px) {

    .admin-table th,
    .admin-table td {
        font-size: 13px;
        padding: 8px 4px;
    }

    .admin-action {
        font-size: 13px;
        padding: 5px 8px;
    }
}

.pinned-topic {
    background: linear-gradient(90deg, #fffbe6 0%, #ffe082 100%);
    border: 2px solid #ffd54f;
    box-shadow: 0 2px 12px #ffe08255;
}

.pinned-title-red {
    color: #e74c3c !important;
    text-shadow: 0 1px 2px rgba(231, 76, 60, 0.2);
}

.pinned-title-purple {
    color: #9b59b6 !important;
    text-shadow: 0 1px 2px rgba(155, 89, 182, 0.2);
}

.pinned-title-dark-blue {
    color: #2c3e50 !important;
    text-shadow: 0 1px 2px rgba(44, 62, 80, 0.2);
}

.pinned-title-yellow {
    color: #f1c40f !important;
    text-shadow: 0 1px 2px rgba(241, 196, 15, 0.2);
}

.pinned-title-orange {
    color: #e67e22 !important;
    text-shadow: 0 1px 2px rgba(230, 126, 34, 0.2);
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 10px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(43, 122, 120, 0.08);
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    background: #fff;
    color: #2b7a78;
    font-weight: 600;
    text-decoration: none;
    border: 1.5px solid #2b7a78;
    transition: all 0.2s;
    font-size: 15px;
}

.page-btn:hover {
    background: #e0ffe8;
    border-color: #7ee6d3;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px #7ee6d3aa;
}

.page-btn.active {
    background: linear-gradient(90deg, #7ee6d3 0%, #2b7a78 100%);
    color: #fff;
    border-color: #7ee6d3;
    box-shadow: 0 2px 8px #7ee6d3aa;
}

.page-btn i {
    font-size: 14px;
}

@media (max-width: 600px) {
    .pagination {
        gap: 6px;
        padding: 8px;
        margin-top: 16px;
    }

    .page-btn {
        min-width: 32px;
        height: 32px;
        padding: 0 8px;
        font-size: 14px;
    }
}

/* 1. GIỮ NGUYÊN KHUNG BAO NGOÀI */
.donate-wrapper {
    position: fixed;
    bottom: 20px;
    right: 20px;
    /* Cách lề phải 20px */
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    /* QUAN TRỌNG: Canh lề phải để bong bóng nở sang trái */
}

/* 2. GIỮ NGUYÊN NÚT BẤM */
.donate-btn-group {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: float 2s ease-in-out infinite;
}

.donate-btn-group img {
    width: 60px;
    transition: transform 0.2s;
}

.donate-btn-group:hover img {
    transform: scale(1.1);
}

.donate-btn-group span {
    background: #ffe600;
    color: #d60000;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 13px;
    margin-top: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    /* Giữ chữ trên 1 dòng */
}

/* 3. SỬA LẠI KHUNG QR (Lệch sang trái) */
.qr-bubble {
    display: none;
    position: absolute;
    bottom: 100%;
    right: 0;
    /* Neo chặt vào bên phải, khung sẽ dài ra phía trái */
    margin-bottom: 15px;

    background: white;
    padding: 10px;
    border-radius: 10px 10px 0 10px;
    /* Bo tròn góc, trừ góc dưới phải cho nhọn */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    width: 200px;
    text-align: center;
    animation: popUp 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

/* SỬA LẠI MŨI TÊN (Chuyển sang góc phải) */
.qr-bubble::after {
    content: "";
    position: absolute;
    top: 100%;
    right: 25px;
    /* Đặt mũi tên lệch về bên phải (thẳng hàng với icon) */
    /* Bỏ left: 50% cũ đi */
    border-width: 10px;
    border-style: solid;
    border-color: white transparent transparent transparent;
}

.qr-img {
    width: 100%;
    border-radius: 5px;
}

.qr-text {
    font-size: 13px;
    margin-top: 5px;
    color: #333;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0)
    }

    50% {
        transform: translateY(-5px)
    }
}

@keyframes popUp {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(10px);
        transform-origin: bottom right;
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
        transform-origin: bottom right;
    }
}