/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;600&display=swap');

:root {
    --primary: #ff4b2b;
    --primary-hover: #ff6a50;
    --bg-dark: #121212;
    --card-bg: #1e1e1e;
    --text-main: #ffffff;
    --text-dim: #888888;
    --glass: rgba(30, 30, 30, 0.8);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Prompt', sans-serif; }

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    isolation: isolate;
}

/* --- Floating Navbar --- */
.navbar {
    position: fixed;
    top: 20px; left: 0; right: 0;
    z-index: 1000;
    display: flex; justify-content: center;
    padding: 0 20px;
}

.nav-container {
    background: var(--glass);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 10px 25px;
    display: flex; align-items: center; gap: 20px;
    width: 100%; max-width: 900px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}

.nav-logo { font-size: 20px; font-weight: 600; }
.nav-logo span { color: var(--primary); }

.nav-links { display: flex; gap: 8px; flex: 1; justify-content: center; }
.nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 25px;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex; align-items: center; gap: 8px;
}

.nav-links a:hover, .nav-links a.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 75, 43, 0.3);
}

.nav-balance {
    background: rgba(255, 75, 43, 0.1);
    color: var(--primary);
    padding: 6px 18px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid rgba(255, 75, 43, 0.2);
}

/* --- Main Layout --- */
.content {
    padding: 130px 20px 60px;
    display: flex; justify-content: center;
    min-height: 100vh;
}

/* --- Styled Cards --- */
.topup-card {
    width: 100%; max-width: 500px;
    background: var(--card-bg);
    padding: 40px;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    box-shadow: 0 25px 50px rgba(0,0,0,0.4);
    height: fit-content;
}

/* --- Form Elements --- */
.field-group { text-align: left; margin-bottom: 22px; }
.field-group label { display: block; margin-bottom: 8px; font-size: 14px; color: var(--text-dim); }

.field-group input, .field-group select {
    width: 100%; padding: 14px 18px;
    background: #2a2a2a;
    border: 1px solid #333;
    border-radius: 14px;
    color: #fff;
    outline: none;
    transition: 0.3s;
}

.field-group input:focus { border-color: var(--primary); background: #333; }

/* ===== MODERN REDESIGN: MAIN BUTTON ===== */
.btn-main {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #ff4b2b 0%, #ff1f5a 100%); /* ไล่เฉดสีให้ดูมีมิติ */
    color: white;
    border: none;
    border-radius: 12px; /* โค้ดมนให้เข้ากับ Card */
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(255, 75, 43, 0.3); /* เพิ่มเงาสีส้มจางๆ */
    margin-top: 10px;
}

.btn-main:hover {
    transform: translateY(-3px); /* ลอยขึ้นเวลาชี้ */
    box-shadow: 0 8px 25px rgba(255, 75, 43, 0.5);
    filter: brightness(1.1);
}

.btn-main:active {
    transform: translateY(-1px);
}

.btn-main i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.btn-main:hover i {
    transform: rotate(15deg) scale(1.1); /* ไอคอนขยับนิดๆ เวลาชี้ */
}

/* QR Section */
.qr-wrapper {
    background: #fff;
    padding: 20px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 30px;
    transition: 0.3s;
}
.qr-wrapper:hover { transform: scale(1.02); }
.qr-wrapper p { color: #333; margin-top: 12px; font-weight: 600; }
/* --- Profile Section --- */
.profile-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
    width: 100%;
    max-width: 1100px;
}

/* Profile Card (Left) */
.profile-main-card {
    background: var(--card-bg);
    padding: 40px 30px;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    height: fit-content;
}

.profile-avatar {
    font-size: 80px;
    color: var(--primary);
    margin-bottom: 15px;
}

.username { font-size: 24px; font-weight: 600; margin-bottom: 5px; }
.user-role { 
    background: rgba(255, 75, 43, 0.1); 
    color: var(--primary); 
    padding: 4px 15px; 
    border-radius: 20px; 
    font-size: 12px; 
    font-weight: 600;
}

.info-list { margin: 30px 0; text-align: left; }
.info-item {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.info-item label { font-size: 13px; color: var(--text-dim); margin-bottom: 4px; }
.info-item span { font-size: 15px; }
.info-item .highlight { color: var(--primary); font-weight: 600; }

.btn-logout {
    display: block;
    padding: 12px;
    background: rgba(255, 0, 0, 0.1);
    color: #ff4444;
    text-decoration: none;
    border-radius: 12px;
    font-size: 14px;
    transition: 0.3s;
}
.btn-logout:hover { background: #ff4444; color: #fff; }

/* History Card (Right) */
.profile-history-card {
    background: var(--card-bg);
    padding: 35px;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.profile-history-card h3 { margin-bottom: 25px; font-weight: 600; display: flex; align-items: center; gap: 10px; }

/* Table Styling */
.table-responsive { overflow-x: auto; }
.history-table { width: 100%; border-collapse: collapse; }
.history-table th { text-align: left; color: var(--text-dim); font-size: 13px; padding-bottom: 15px; border-bottom: 1px solid #333; }
.history-table td { padding: 15px 0; font-size: 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.03); }
.history-table .amt { font-weight: 600; color: var(--primary); }

/* Badges */
.badge { padding: 5px 12px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.bg-success { background: rgba(40, 167, 69, 0.1); color: #28a745; }
.bg-pending { background: rgba(255, 193, 7, 0.1); color: #ffc107; }

/* Mobile Responsive */
@media (max-width: 900px) {
    .profile-grid { grid-template-columns: 1fr; }
    .content { padding-top: 100px; }
}
/* --- Container & Title --- */
.container-full {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    margin-bottom: 40px;
    text-align: left;
}

.section-title h2 { font-size: 28px; font-weight: 600; margin-bottom: 5px; }
.section-title p { color: var(--text-dim); font-size: 15px; }

/* --- Product Grid --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

/* --- Product Card --- */
.product-card {
    background: var(--card-bg);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.product-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 15px 40px rgba(255, 75, 43, 0.2);
}

.product-img {
    width: 100%;
    height: 180px;
    position: relative;
    overflow: hidden;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.product-card:hover .product-img img { transform: scale(1.1); }

.product-badge {
    position: absolute;
    top: 15px; right: 15px;
    background: rgba(40, 167, 69, 0.9);
    color: #fff;
    padding: 4px 12px;
    border-radius: 10px;
    font-size: 11px;
    backdrop-filter: blur(5px);
}

.product-info { padding: 20px; }
.product-info h3 { font-size: 18px; margin-bottom: 8px; color: #fff; }
.product-desc { 
    font-size: 13px; 
    color: var(--text-dim); 
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 15px; /* เพิ่มระยะห่างจากปุ่ม */
}

.price-tag small { display: block; font-size: 12px; color: var(--text-dim); }
.price-tag span { font-size: 22px; font-weight: 600; color: var(--primary); }

.stock-info {
    font-size: 12px;
    color: #888;
    background: #2a2a2a;
    padding: 4px 10px;
    border-radius: 8px;
}

/* --- Responsive Adjust --- */
@media (max-width: 600px) {
    .product-grid { grid-template-columns: 1fr; }
    .section-title { text-align: center; }
}
/* --- Auth Pages (Login/Register) --- */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-box {
    width: 100%;
    max-width: 400px;
    background: var(--card-bg);
    padding: 40px;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    box-shadow: 0 25px 50px rgba(0,0,0,0.4);
}

.auth-box h2 {
    font-size: 28px;
    margin-bottom: 10px;
    font-weight: 600;
}

.auth-box p {
    color: var(--text-dim);
    font-size: 14px;
    margin-bottom: 30px;
}

.auth-box .btn-main {
    margin-top: 10px;
    margin-bottom: 20px;
}

.auth-box .link-group {
    font-size: 14px;
    color: var(--text-dim);
}

.auth-box .link-group a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-box .link-group a:hover {
    text-decoration: underline;
}

/* Discord Login Button */
.btn-discord {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px;
    background: #5865F2;
    color: #fff;
    border: none;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
    margin-top: 15px;
}

.btn-discord:hover {
    background: #4752c4;
    transform: translateY(-2px);
}
body { background-color: #0f0f0f; color: #fff; margin: 0; font-family: 'Kanit', sans-serif; }
        .navbar { position: fixed; top: 0; width: 100%; z-index: 1000; }
        .admin-wrapper { padding-top: 100px; max-width: 1400px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }
        .admin-card { background: #181818; border-radius: 15px; padding: 30px; border: 1px solid rgba(255,255,255,0.05); margin-bottom: 30px; }
        .admin-nav-tabs { display: flex; gap: 20px; margin-bottom: 25px; border-bottom: 1px solid #333; padding-bottom: 10px; }
        .tab-link { color: #888; text-decoration: none; font-size: 16px; padding: 5px 15px; transition: 0.3s; }
        .tab-link.active { color: #ff4b2b; border-bottom: 2px solid #ff4b2b; font-weight: bold; }
        table { width: 100%; border-collapse: collapse; }
        th { text-align: left; color: #666; font-size: 14px; padding: 15px; border-bottom: 1px solid #222; }
        td { padding: 15px; border-bottom: 1px solid #222; }
        .form-full { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr auto; gap: 15px; align-items: end; background: rgba(0,0,0,0.3); padding: 20px; border-radius: 12px; margin-bottom: 30px; }
        .form-group-custom label { display: block; color: #888; font-size: 12px; margin-bottom: 8px; }
        .form-group-custom input, .form-group-custom select, textarea { width: 100%; background: #222; border: 1px solid #333; color: #fff; padding: 12px; border-radius: 8px; }
        .prod-img { width: 50px; height: 50px; border-radius: 8px; object-fit: cover; }
        .btn-manage-stock { background: #2ecc71; color: #fff; padding: 5px 10px; border-radius: 6px; text-decoration: none; font-size: 12px; }
        .status-sold { text-decoration: line-through; color: #555; }
        /* Breadcrumb สไตล์ตามรูป */
        .breadcrumb {
            display: flex;
            align-items: center;
            gap: 10px;
            color: #888;
            font-size: 14px;
            margin-bottom: 20px;
        }
        .breadcrumb i { font-size: 12px; }
        .breadcrumb a { color: #888; text-decoration: none; }

        .category-header { margin-bottom: 30px; }
        .category-header span { color: #a362ff; font-size: 14px; text-transform: uppercase; letter-spacing: 1px; }
        .category-header h2 { color: #fff; margin: 5px 0 0 0; font-size: 24px; }

        /* การจัดวาง Grid สำหรับหมวดหมู่ */
        .category-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
            gap: 25px;
        }

        .category-card {
            background: #181818;
            border-radius: 15px;
            overflow: hidden;
            border: 1px solid rgba(255,255,255,0.05);
            transition: 0.3s;
        }
        .category-card:hover {
            transform: translateY(-5px);
            border-color: #a362ff;
        }

        .category-banner {
            width: 100%;
            height: 220px;
            object-fit: cover;
            display: block;
        }

        .category-footer {
            padding: 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: #181818;
        }

        .cat-info h3 { color: #fff; margin: 0 0 5px 0; font-size: 18px; font-weight: 500; }
        .cat-info p { color: #666; margin: 0; font-size: 13px; }

        .btn-view-cat {
            background: #a362ff;
            color: #fff;
            text-decoration: none;
            padding: 10px 20px;
            border-radius: 8px;
            font-size: 14px;
            transition: 0.3s;
        }
        .btn-view-cat:hover { background: #8e44ad; }

        @media (max-width: 768px) {
            .category-grid { grid-template-columns: 1fr; }
        }
        /* สไตล์ปุ่มพื้นฐาน */
.btn-buy {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ปุ่มสถานะปกติ (พร้อมขาย) */
.btn-buy.active {
    background: linear-gradient(45deg, #ff4b2b, #ff416c);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 75, 43, 0.3);
}

/* เอฟเฟกต์เมื่อเอาเมาส์ไปวาง */
.btn-buy.active:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 75, 43, 0.5);
    background: linear-gradient(45deg, #ff416c, #ff4b2b);
}

/* เมื่อกดปุ่ม */
.btn-buy.active:active {
    transform: translateY(-1px);
}

/* ปุ่มสถานะสินค้าหมด */
.btn-buy.disabled {
    background: #2a2a2a;
    color: #666;
    cursor: not-allowed;
    border: 1px solid #333;
}

/* เพิ่มแอนิเมชันให้ไอคอนในปุ่ม */
.btn-buy i {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.btn-buy.active:hover i {
    transform: scale(1.2) rotate(-10deg);
}
.btn-buy-new {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    background: linear-gradient(45deg, #ff4b2b, #ff416c);
    color: white;
    border: none;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(255, 75, 43, 0.3);
}

.btn-buy-new:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 75, 43, 0.5);
}
        .welcome-box {
                background: linear-gradient(90deg, rgba(255, 75, 43, 0.15), transparent);
                border-left: 4px solid #ff4b2b;
                padding: 20px;
                border-radius: 0 15px 15px 0;
                margin-bottom: 30px;
                animation: fadeIn 0.8s ease-out;
            }
            .welcome-box h1 {
                margin: 0;
                font-size: 26px;
                color: #fff;
            }
            .welcome-box h1 span {
                color: #ff4b2b;
                text-shadow: 0 0 10px rgba(255, 75, 43, 0.3);
            }
            .welcome-box p {
                margin: 5px 0 0 0;
                color: #aaa;
                font-size: 14px;
            }
            @keyframes fadeIn {
                from { opacity: 0; transform: translateX(-20px); }
                to { opacity: 1; transform: translateX(0); }
            }
        .stat-container {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 20px;
            margin-bottom: 40px;
        }
        .stat-card {
            background: rgba(30, 30, 30, 0.6);
            border-radius: 15px;
            padding: 25px;
            border: 1px solid rgba(255, 255, 255, 0.05);
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: relative;
            overflow: hidden;
        }
        .stat-info h4 { color: #888; font-size: 14px; margin: 0 0 10px 0; font-weight: 400; }
        .stat-info .stat-value { font-size: 28px; font-weight: 800; color: #ff775f; }
        .stat-info .stat-unit { font-size: 14px; color: #666; margin-left: 5px; }
        .stat-icon { font-size: 50px; color: rgba(255, 75, 43, 0.1); position: absolute; right: 15px; bottom: -5px; }
        
        /* Category Styles */
        .category-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
            gap: 20px;
            margin-bottom: 50px;
        }
        .category-card {
            position: relative;
            border-radius: 15px;
            overflow: hidden;
            cursor: pointer;
            border: 1px solid rgba(255,255,255,0.05);
            transition: 0.3s;
        }
        .category-card:hover { transform: translateY(-5px); border-color: #ff4b2b; }
        .category-img { width: 100%; height: 180px; object-fit: cover; display: block; }
        .category-overlay {
            position: absolute;
            bottom: 0; left: 0; width: 100%;
            padding: 20px;
            background: linear-gradient(transparent, rgba(0,0,0,0.9));
            display: flex;
            justify-content: space-between;
            align-items: flex-end;
            box-sizing: border-box;
        }
        .category-name { margin: 0; color: #fff; font-size: 18px; }
        .category-count { color: #aaa; font-size: 12px; }

        /* Modal Product Detail Styles */
        .p-modal {
            display: none;
            position: fixed;
            z-index: 000;
            left: 0; top: 0;
            width: 100%; height: 100%;
            background: rgba(0,0,0,0.85);
            backdrop-filter: blur(5px);
        }
        .p-modal-content {
            background: #181818;
            margin: 5% auto;
            border-radius: 20px;
            width: 90%;
            max-width: 500px;
            border: 1px solid rgba(255,255,255,0.1);
            position: relative;
            overflow: hidden;
            animation: zoomIn 0.3s ease;
        }
        .p-modal-header img { width: 100%; height: 250px; object-fit: cover; }
        .p-modal-body { padding: 25px; }
        .p-modal-body h2 { margin: 0 0 10px 0; color: #fff; font-size: 24px; }
        .p-modal-price { font-size: 28px; color: #ff4b2b; font-weight: bold; margin-bottom: 20px; }
        .p-modal-close { position: absolute; top: 15px; right: 20px; color: #fff; font-size: 30px; cursor: pointer; z-index: 10; }
        @keyframes zoomIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

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

        .profile-history-grid { display: flex; flex-direction: column; gap: 20px; }
        .history-section { background: #181818; border-radius: 15px; padding: 25px; border: 1px solid rgba(255,255,255,0.05); }
        .history-section h3 { margin-top: 0; margin-bottom: 20px; font-weight: 500; display: flex; align-items: center; gap: 10px; }
        .history-section h3 i { color: #ff4b2b; }
        
        .order-card {
            background: rgba(255, 255, 255, 0.02);
            border-radius: 10px;
            padding: 15px;
            margin-bottom: 12px;
            display: flex;
            align-items: flex-start;
            border: 1px solid rgba(255,255,255,0.05);
        }
        .order-img { width: 60px; height: 60px; border-radius: 8px; object-fit: cover; margin-right: 15px; }
        .order-info { flex-grow: 1; }
        .order-info h4 { margin: 0 0 8px 0; font-size: 16px; color: #fff; }
        
        /* สไตล์กล่องรหัสสินค้า */
        .account-box {
            background: rgba(46, 204, 113, 0.1);
            border: 1px dashed #2ecc71;
            padding: 10px;
            border-radius: 6px;
            margin-top: 8px;
        }
        .account-box small { color: #888; display: block; font-size: 11px; margin-bottom: 3px; }
        .account-box span { color: #2ecc71; font-family: monospace; font-weight: bold; font-size: 14px; word-break: break-all; }

/* --- Breadcrumb --- */
.breadcrumb { display: flex; align-items: center; gap: 10px; color: #888; font-size: 14px; margin-bottom: 20px; }
.breadcrumb i { font-size: 12px; }
.breadcrumb a { color: #888; text-decoration: none; transition: 0.3s; }
.breadcrumb a:hover { color: #a362ff; }

/* --- Category Header --- */
.category-header { margin-bottom: 30px; }
.category-header span { color: #a362ff; font-size: 14px; text-transform: uppercase; letter-spacing: 1px; }
.category-header h2 { color: #fff; margin: 5px 0 0 0; font-size: 24px; }

/* --- Qty Input --- */
.qty-box-custom { margin: 10px 0; text-align: left; }
.qty-box-custom label { font-size: 12px; color: #888; display: block; margin-bottom: 5px; }
.qty-input-field { width: 100%; background: #111; border: 1px solid #333; color: #fff; padding: 10px; border-radius: 8px; outline: none; text-align: center; }

/* --- Buy Button States --- */
.btn-buy-new.active { background: linear-gradient(45deg, #ff4b2b, #ff416c); color: white; box-shadow: 0 4px 15px rgba(255, 75, 43, 0.3); }
.btn-buy-new.active:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(255, 75, 43, 0.5); }
.btn-buy-new.disabled { background: #2a2a2a; color: #666; cursor: not-allowed; border: 1px solid #333; }
/* --- Floating Background Blobs --- */
.bg-blobs {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.12;
    animation: blobFloat linear infinite;
}
.blob-1 { width: 500px; height: 500px; background: #ff4b2b; top: -100px; left: -150px; animation-duration: 18s; }
.blob-2 { width: 400px; height: 400px; background: #a362ff; top: 40%; right: -100px; animation-duration: 22s; animation-delay: -6s; }
.blob-3 { width: 350px; height: 350px; background: #ff416c; bottom: -80px; left: 30%; animation-duration: 25s; animation-delay: -12s; }
.blob-4 { width: 280px; height: 280px; background: #6a5acd; top: 20%; left: 50%; animation-duration: 20s; animation-delay: -4s; }
.blob-5 { width: 220px; height: 220px; background: #ff4b2b; bottom: 20%; right: 20%; animation-duration: 16s; animation-delay: -9s; }
@keyframes blobFloat {
    0%   { transform: translate(0, 0) scale(1); }
    25%  { transform: translate(40px, -60px) scale(1.05); }
    50%  { transform: translate(-30px, 50px) scale(0.95); }
    75%  { transform: translate(60px, 30px) scale(1.08); }
    100% { transform: translate(0, 0) scale(1); }
}
.navbar, main, .content, .auth-container, .profile-grid, .container-full { position: relative; z-index: 1; }

/* --- Auth Box --- */
.auth-container { display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 20px; }
.auth-box { width: 100%; max-width: 400px; background: var(--card-bg); padding: 30px; border-radius: 20px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.auth-box h2 { margin-bottom: 8px; }
.auth-box p span { color: var(--primary); }
.btn-discord { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 15px; padding: 14px; background: #5865F2; color: #fff; text-decoration: none; border-radius: 14px; font-weight: 600; transition: 0.3s; }
.btn-discord:hover { background: #4752c4; transform: translateY(-2px); }

/* --- Welcome Box --- */
.welcome-box { background: linear-gradient(90deg, rgba(255,75,43,0.15), transparent); border-left: 4px solid #ff4b2b; padding: 20px; border-radius: 0 15px 15px 0; margin-bottom: 30px; animation: fadeIn 0.8s ease-out; }
.welcome-box h1 { margin: 0; font-size: 26px; color: #fff; }
.welcome-box h1 span { color: #ff4b2b; text-shadow: 0 0 10px rgba(255,75,43,0.3); }
.welcome-box p { margin: 5px 0 0 0; color: #aaa; font-size: 14px; }
@keyframes fadeIn { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: translateX(0); } }

/* --- Stat Cards --- */
.stat-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 40px; }
.stat-card { background: rgba(30,30,30,0.6); border-radius: 15px; padding: 25px; border: 1px solid rgba(255,255,255,0.05); display: flex; justify-content: space-between; align-items: center; position: relative; overflow: hidden; }
.stat-info h4 { color: #888; font-size: 14px; margin: 0 0 10px 0; font-weight: 400; }
.stat-info .stat-value { font-size: 28px; font-weight: 800; color: #ff775f; }
.stat-info .stat-unit { font-size: 14px; color: #666; margin-left: 5px; }
.stat-icon { font-size: 50px; color: rgba(255,75,43,0.1); position: absolute; right: 15px; bottom: -5px; }

/* --- Product Modal --- */
.p-modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); backdrop-filter: blur(5px); }
.p-modal-content { background: #181818; margin: 5% auto; border-radius: 20px; width: 90%; max-width: 500px; border: 1px solid rgba(255,255,255,0.1); position: relative; overflow: hidden; animation: zoomIn 0.3s ease; }
.p-modal-header img { width: 100%; height: 250px; object-fit: cover; }
.p-modal-body { padding: 25px; }
.p-modal-body h2 { margin: 0 0 10px 0; color: #fff; font-size: 24px; }
.p-modal-price { font-size: 28px; color: #ff4b2b; font-weight: bold; margin-bottom: 20px; }
.p-modal-close { position: absolute; top: 15px; right: 20px; color: #fff; font-size: 30px; cursor: pointer; z-index: 10; }
@keyframes zoomIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* --- Topup Page --- */
.topup-page-wrap { display: flex; flex-direction: column; align-items: center; width: 100%; }
.history-section-topup { width: 100%; max-width: 500px; margin-top: 40px; }
.history-table-topup { width: 100%; border-collapse: collapse; background: rgba(30,30,30,0.6); border-radius: 15px; overflow: hidden; font-size: 14px; }
.history-table-topup th, .history-table-topup td { padding: 15px; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.05); }
.history-table-topup th { color: #888; font-weight: 400; }
.status-pending { color: #f1c40f; }
.status-success { color: #2ecc71; }

/* --- Approve Button (Admin Topup) --- */
.btn-approve { background: #2ecc71; color: #fff; border: none; padding: 5px 12px; border-radius: 5px; cursor: pointer; font-size: 12px; }
.btn-approve:hover { background: #27ae60; }
/* ============================================
   MOBILE RESPONSIVE - ทุกหน้า
   Breakpoints: 768px (tablet), 480px (phone)
   ============================================ */

/* ===== NAVBAR - Hamburger Menu ===== */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
    margin-left: auto;
}
.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: 0.3s;
}
.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

@media (max-width: 768px) {
    /* Navbar - แถวบน: logo | balance | hamburger */
    .nav-container {
        flex-wrap: wrap;
        border-radius: 16px;
        padding: 10px 16px;
        gap: 0;
        position: relative;
        align-items: center;
    }
    .nav-logo { font-size: 16px; flex: 1; }
    .nav-balance {
        font-size: 12px;
        padding: 5px 10px;
        margin-right: 10px;
        order: 2;
    }
    .nav-toggle {
        display: flex;
        order: 3;
        margin-left: 0;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        order: 4;
        gap: 3px;
        padding-top: 10px;
        margin-top: 8px;
        border-top: 1px solid rgba(255,255,255,0.08);
    }
    .nav-links.open { display: flex; }
    .nav-links a {
        padding: 10px 14px;
        border-radius: 10px;
        font-size: 14px;
        justify-content: flex-start;
    }

    /* Content padding - เพิ่มเพราะ navbar สูงขึ้นตอนเปิดเมนู */
    .content { padding: 110px 12px 40px; }

    /* ===== INDEX PAGE ===== */
    .welcome-box { padding: 15px; }
    .welcome-box h1 { font-size: 20px; }

    /* override stat-container ที่ใช้ minmax(220px) */
    .stat-container {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
        margin-bottom: 25px;
    }
    .stat-card { padding: 14px; }
    .stat-info h4 { font-size: 12px; }
    .stat-info .stat-value { font-size: 20px; }
    .stat-icon { font-size: 32px; }

    .category-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
    .category-img, .category-banner { height: 140px; }
    .category-name { font-size: 15px; }

    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .product-img { height: 130px; }
    .product-info { padding: 12px; }
    .product-info h3 { font-size: 14px; }
    .price-tag span { font-size: 18px; }

    /* ===== PROFILE PAGE ===== */
    .profile-grid { grid-template-columns: 1fr !important; gap: 20px; }
    .profile-main-card { padding: 25px 20px; }
    .profile-avatar { font-size: 60px; }
    .username { font-size: 20px; }
    .profile-history-grid { gap: 15px; }
    .history-section { padding: 18px; }

    /* ===== TOPUP PAGE ===== */
    .topup-card { padding: 25px 18px; border-radius: 18px; }
    .qr-wrapper img { width: 150px; }
    .history-table-topup th, .history-table-topup td { padding: 10px 8px; font-size: 12px; }

    /* ===== AUTH PAGES ===== */
    .auth-box { padding: 25px 20px; border-radius: 16px; }
    .auth-box h2 { font-size: 22px; }

    /* ===== MODAL ===== */
    .p-modal-content { margin: 8% auto; width: 95%; }
    .p-modal-header img { height: 180px; }
    .p-modal-body { padding: 18px; }
    .p-modal-body h2 { font-size: 18px; }
    .p-modal-price { font-size: 22px; }

    /* ===== ADMIN PAGE ===== */
    .admin-container { flex-direction: column; }
    .sidebar {
        width: 100% !important;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 12px;
        border-right: none;
        border-bottom: 1px solid #1e1e1e;
        gap: 4px;
    }
    .sidebar-logo { width: 100%; text-align: center; margin-bottom: 8px; padding-bottom: 8px; font-size: 16px; }
    .sidebar a { padding: 8px 12px; font-size: 12px; flex: 0 0 auto; border-radius: 8px; }
    .sidebar a i { width: auto; }
    .sidebar-bottom { margin-top: 0; }

    .main-content { padding: 15px; }
    .admin-card { padding: 15px; border-radius: 10px; }
    .stat-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
    .stat-box .num { font-size: 22px; }
    .chart-grid { grid-template-columns: 1fr !important; }
    .chart-box { height: 300px !important; }

    /* Admin tables - scroll */
    .admin-card table { font-size: 12px; }
    .admin-card th, .admin-card td { padding: 8px 6px; }

    /* Modal admin */
    .modal-content { width: 95% !important; margin: 20px auto; padding: 20px; }
}

@media (max-width: 480px) {
    /* Extra small phones */
    .navbar { top: 8px; padding: 0 8px; }
    .nav-container { border-radius: 12px; padding: 10px 12px; }

    .content { padding: 100px 8px 30px; }

    .stat-container { grid-template-columns: 1fr 1fr; gap: 8px; }
    .stat-card { padding: 12px; }
    .stat-info h4 { font-size: 11px; }
    .stat-info .stat-value { font-size: 18px; }
    .stat-icon { display: none; }

    .product-grid { grid-template-columns: 1fr; gap: 12px; }

    .topup-card { padding: 18px 14px; }

    .auth-box { padding: 20px 15px; }

    .welcome-box h1 { font-size: 17px; }

    /* Admin sidebar แนวตั้งบนมือถือเล็ก */
    .sidebar a span { display: none; }
    .sidebar a { padding: 10px; }
    .sidebar a i { width: 16px; font-size: 16px; }

    .stat-grid { grid-template-columns: repeat(2, 1fr) !important; }

    /* Breadcrumb */
    .breadcrumb { font-size: 12px; gap: 6px; flex-wrap: wrap; }

    /* Category page products */
    .category-footer { flex-direction: column; gap: 10px; align-items: flex-start; }
    .btn-view-cat { width: 100%; text-align: center; }
}

/* ===== FIX: Topup form nested form bug ===== */
@media (max-width: 768px) {
    .topup-page-wrap { padding: 0; }
    .history-section-topup { margin-top: 25px; }
}
/* =================================================
   UNIVERSAL FULL RESPONSIVE FIX (ALL DEVICES)
   Mobile / Tablet / Desktop
================================================= */

/* ===== RESET OVERFLOW ===== */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* ===== NAVBAR UNIVERSAL ===== */
.navbar {
    position: fixed;
    top: 15px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 0 12px;
    z-index: 1000;
}

.nav-container {
    width: 100%;
    max-width: 1200px;
    background: rgba(30,30,30,0.85);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* ===== HAMBURGER ===== */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.nav-toggle span {
    width: 22px;
    height: 2px;
    background: #fff;
    transition: 0.3s;
}

/* ===== MOBILE MODE ===== */
@media (max-width: 992px) {

    .nav-links {
        display: none !important;
        flex-direction: column;
        width: 100%;
        margin-top: 10px;
    }

    .nav-links.open {
        display: flex !important;
    }

    .nav-toggle {
        display: flex;
        margin-left: auto;
    }

    .nav-balance {
        margin-left: auto;
        margin-right: 10px;
    }
}

/* ===== EXTRA SMALL PHONES ===== */
@media (max-width: 480px) {

    .navbar {
        top: 10px;
        padding: 0 8px;
    }

    .nav-container {
        border-radius: 14px;
        padding: 10px 14px;
    }

    .content {
        padding: 100px 10px 40px;
    }

    .product-grid {
        grid-template-columns: 1fr !important;
    }

    .stat-container {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px;
    }

    .profile-grid {
        grid-template-columns: 1fr !important;
    }

    .admin-card table {
        font-size: 12px;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* ===== TABLE SAFE SCROLL ===== */
.table-responsive,
.admin-card,
.history-table-topup {
    overflow-x: auto;
}
/* ===== IMPROVED STATUS BADGE ===== */
/* สถานะใน Navbar */
.status-badge-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 0 10px;
}

.status-text-nav {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* ปรับขนาดจุดให้เล็กลงสำหรับ Navbar */
.status-badge-nav .blink-dot {
    height: 7px;
    width: 7px;
}

/* ซ่อนสถานะในมือถือถ้าหน้าจอแคบเกินไป (Optional) */
@media (max-width: 768px) {
    /* ปรับให้สถานะไม่เบียดกับโลโก้ในมือถือ */
    .status-badge-nav {
        margin: 0 5px;
        padding: 4px 8px;
    }
    .status-text-nav {
        font-size: 10px; /* ย่อตัวอักษรลงหน่อยในมือถือ */
    }
}

.blink-dot {
    height: 10px;
    width: 10px;
    border-radius: 50%;
    position: relative;
}

/* จุดวิบวับแบบนุ่มนวล */
.bg-online {
    background-color: #2ecc71;
    box-shadow: 0 0 15px #2ecc71;
    animation: pulse-green 2s infinite;
}

.bg-offline {
    background-color: #e74c3c;
    box-shadow: 0 0 15px #e74c3c;
    animation: pulse-red 2s infinite;
}

@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(46, 204, 113, 0); }
    100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}

@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(231, 76, 60, 0); }
    100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0); }
}

/* ===== MOBILE NAVBAR POLISH ===== */
@media (max-width: 768px) {
    .navbar {
        top: calc(env(safe-area-inset-top, 0px) + 8px);
        padding: 0 10px;
    }

    .nav-container {
        position: relative;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 8px;
        padding: 12px 14px;
        border-radius: 22px;
        background: linear-gradient(180deg, rgba(24, 22, 25, 0.95) 0%, rgba(19, 18, 22, 0.92) 100%);
        border: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
    }

    .nav-logo {
        order: 1;
        min-width: 0;
        font-size: 15px;
        letter-spacing: 0.2px;
        grid-column: 1 / 2;
        grid-row: 1;
    }

    .status-badge-nav {
        order: 2;
        margin: 2px 0 0;
        padding: 6px 10px;
        gap: 6px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.045);
        border-color: rgba(255, 255, 255, 0.09);
        flex-shrink: 0;
        grid-column: 1 / 2;
        grid-row: 2;
        justify-self: start;
    }

    .status-text-nav {
        font-size: 10px;
        letter-spacing: 0.6px;
    }

    .nav-balance {
        order: 3;
        margin: 0;
        padding: 8px 12px;
        font-size: 12px;
        border-radius: 999px;
        background: rgba(255, 75, 43, 0.12);
        border-color: rgba(255, 75, 43, 0.28);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
        flex-shrink: 0;
        grid-column: 2 / 3;
        grid-row: 2;
        justify-self: end;
    }

    .nav-toggle {
        order: 4;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        margin-left: 0;
        padding: 0;
        gap: 4px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 14px;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
        grid-column: 2 / 3;
        grid-row: 1;
        justify-self: end;
    }

    .nav-toggle span {
        width: 18px;
        height: 2px;
        border-radius: 999px;
        background: #f3f3f3;
    }

    .nav-toggle.open {
        background: linear-gradient(135deg, rgba(255, 75, 43, 0.16) 0%, rgba(255, 75, 43, 0.08) 100%);
        border-color: rgba(255, 75, 43, 0.35);
    }

    .nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
    .nav-toggle.open span:nth-child(2) { opacity: 0; }
    .nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }

    .nav-links {
        order: 5;
        position: absolute;
        top: calc(100% + 10px);
        left: 0;
        right: 0;
        display: none !important;
        flex-direction: column;
        gap: 8px;
        width: 100%;
        margin-top: 0;
        padding: 12px;
        border-radius: 20px;
        background: linear-gradient(180deg, rgba(23, 22, 27, 0.98) 0%, rgba(16, 16, 19, 0.97) 100%);
        border: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 22px 40px rgba(0, 0, 0, 0.34);
        backdrop-filter: blur(16px);
        z-index: 12;
    }

    .nav-links.open {
        display: flex !important;
    }

    .nav-links a {
        padding: 12px 14px;
        border-radius: 14px;
        font-size: 14px;
        font-weight: 500;
        justify-content: flex-start;
        color: #f0f0f0;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.04);
    }

    .nav-links a:hover,
    .nav-links a.active {
        background: linear-gradient(135deg, rgba(255, 75, 43, 0.98) 0%, rgba(255, 79, 120, 0.94) 100%);
        border-color: rgba(255, 106, 80, 0.55);
        box-shadow: 0 14px 24px rgba(255, 75, 43, 0.22);
    }

    .content {
        padding-top: calc(env(safe-area-inset-top, 0px) + 126px);
    }
}

@media (max-width: 480px) {
    .nav-container {
        grid-template-columns: 1fr auto;
        padding: 12px;
        border-radius: 18px;
        gap: 7px;
    }

    .nav-logo {
        font-size: 14px;
    }

    .status-badge-nav {
        max-width: 100%;
        padding: 6px 8px;
    }

    .status-text-nav {
        font-size: 9px;
        letter-spacing: 0.5px;
    }

    .nav-balance {
        max-width: 100%;
        padding: 7px 10px;
        font-size: 11px;
        white-space: nowrap;
    }

    .nav-toggle {
        width: 38px;
        height: 38px;
        border-radius: 12px;
    }

    .nav-links {
        top: calc(100% + 8px);
        padding: 10px;
        border-radius: 18px;
    }
}

/* ===== PROFILE REDESIGN ===== */
.profile-page-shell {
    width: 100%;
    max-width: 1180px;
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.profile-hero-card {
    position: relative;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 18px;
    padding: 28px;
    border-radius: 30px;
    background:
        radial-gradient(circle at top right, rgba(255, 106, 80, 0.22), transparent 32%),
        linear-gradient(135deg, rgba(36, 20, 18, 0.96), rgba(17, 17, 24, 0.94));
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
    overflow: hidden;
}

.profile-kicker,
.section-kicker {
    display: inline-block;
    margin-bottom: 10px;
    color: #b07cff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.profile-hero-copy h1 {
    margin: 0 0 10px;
    font-size: 36px;
    line-height: 1.1;
}

.profile-hero-copy p {
    max-width: 620px;
    color: #a1a1aa;
    font-size: 15px;
}

.profile-hero-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.hero-stat {
    padding: 18px 20px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
}

.hero-stat-label {
    display: block;
    color: #8d8d97;
    font-size: 12px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.hero-stat strong {
    font-size: 26px;
    color: #fff;
}

.profile-sidebar-card {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top, rgba(255, 75, 43, 0.16), transparent 36%),
        linear-gradient(180deg, rgba(28, 27, 32, 0.98), rgba(20, 20, 24, 0.98));
}

.profile-card-glow {
    position: absolute;
    top: -60px;
    left: 50%;
    width: 220px;
    height: 220px;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(255, 75, 43, 0.24), transparent 68%);
    pointer-events: none;
}

.profile-pill-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0 16px;
}

.profile-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 12px;
    color: #dedee6;
}

.profile-pill-success {
    background: rgba(46, 204, 113, 0.12);
    border-color: rgba(46, 204, 113, 0.2);
    color: #8ae6ab;
}

.profile-quick-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.profile-quick-stat {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.06);
    text-align: left;
}

.profile-quick-stat span {
    display: block;
    color: #8d8d97;
    font-size: 12px;
    margin-bottom: 6px;
}

.profile-quick-stat strong {
    font-size: 24px;
    color: #fff;
}

.connect-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
}

.connect-status.connected { color: #8aa2ff; }
.connect-status.google { color: #7db2ff; }
.connect-status.disconnected { color: #8b8b92; }

.section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-heading h3 {
    margin: 0;
}

.profile-order-card {
    padding: 18px;
    margin-bottom: 14px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 16px 32px rgba(0,0,0,0.16);
}

.profile-order-top {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

.profile-order-product {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.profile-order-image {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.08);
}

.profile-order-product h4 {
    margin: 0 0 6px;
    color: #fff;
    font-size: 16px;
}

.profile-order-product small,
.profile-order-meta small,
.detail-label,
.order-empty-text,
.profile-empty-row {
    color: #8a8a93;
}

.profile-order-meta {
    text-align: right;
    flex-shrink: 0;
}

.profile-order-meta span {
    display: block;
    color: #ff6b4d;
    font-size: 18px;
    font-weight: 700;
}

.profile-order-detail {
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(0,0,0,0.2);
    border-left: 3px solid rgba(255, 75, 43, 0.9);
}

.detail-label {
    display: block;
    margin-bottom: 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.order-note {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
}

.success-note {
    color: #7be19e;
}

.success-note a {
    color: #ff805e;
    text-decoration: underline;
}

.order-code-box {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    justify-content: space-between;
}

.order-code-box code {
    display: block;
    white-space: pre-wrap;
    word-break: break-word;
    color: #f0f0f4;
    font-family: Consolas, monospace;
    font-size: 13px;
}

.copy-order-btn {
    flex-shrink: 0;
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    background: rgba(255,255,255,0.06);
    color: #fff;
    cursor: pointer;
    transition: 0.25s ease;
}

.copy-order-btn:hover {
    background: rgba(255, 75, 43, 0.14);
    border-color: rgba(255, 75, 43, 0.26);
}

.profile-empty-state,
.profile-empty-row {
    text-align: center;
    padding: 26px 12px;
    font-size: 14px;
}

.profile-history-table th,
.profile-history-table td {
    padding: 14px 0;
}

.topup-amount {
    color: #58da8c;
    font-weight: 600;
}

.page-profile .btn-logout {
    margin-top: 8px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 75, 43, 0.18), rgba(255, 75, 43, 0.08));
    border: 1px solid rgba(255, 75, 43, 0.22);
    color: #ff8c78;
}

.page-profile .btn-logout:hover {
    background: linear-gradient(135deg, #ff4b2b, #ff6c4a);
    color: #fff;
}

@media (max-width: 900px) {
    .profile-page-shell {
        gap: 20px;
    }

    .profile-hero-card {
        grid-template-columns: 1fr;
        padding: 22px;
        border-radius: 24px;
    }

    .profile-hero-copy h1 {
        font-size: 28px;
    }

    .profile-order-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-order-meta {
        text-align: left;
    }
}

@media (max-width: 640px) {
    .profile-hero-card {
        padding: 20px 18px;
    }

    .profile-hero-copy h1 {
        font-size: 24px;
    }

    .profile-quick-stats {
        grid-template-columns: 1fr;
    }

    .order-code-box {
        flex-direction: column;
    }

    .copy-order-btn {
        width: 100%;
    }

    .history-section {
        padding: 20px 18px;
    }

    .profile-history-table thead {
        display: none;
    }

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

    .profile-history-table tbody {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .profile-history-table tr {
        padding: 14px 16px;
        border-radius: 18px;
        background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
        border: 1px solid rgba(255,255,255,0.06);
    }

    .profile-history-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 7px 0;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        white-space: normal;
        text-align: right;
    }

    .profile-history-table td:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .profile-history-table td::before {
        content: attr(data-label);
        color: #8c8c95;
        font-size: 12px;
        font-weight: 600;
        letter-spacing: 0.04em;
        text-align: left;
    }

    .profile-history-table .badge {
        margin-left: auto;
    }

    .profile-empty-row {
        display: block !important;
        text-align: center !important;
        padding: 22px 10px !important;
        border: none !important;
    }

    .profile-empty-row::before {
        display: none;
    }
}

/* ===== LOGIN REDESIGN ===== */
.auth-layout {
    width: 100%;
    max-width: 1120px;
    display: grid;
    grid-template-columns: 1.1fr 440px;
    gap: 28px;
    align-items: center;
}

.auth-intro-card,
.login-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

.auth-intro-card {
    padding: 34px;
    border-radius: 34px;
    background:
        radial-gradient(circle at top right, rgba(255, 75, 43, 0.22), transparent 30%),
        radial-gradient(circle at bottom left, rgba(163, 98, 255, 0.14), transparent 28%),
        linear-gradient(135deg, rgba(31, 18, 17, 0.95), rgba(15, 16, 22, 0.94));
}

.auth-kicker {
    display: inline-block;
    margin-bottom: 14px;
    color: #b07cff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.auth-intro-card h1 {
    margin: 0 0 12px;
    font-size: 42px;
    line-height: 1.08;
    color: #fff;
}

.auth-intro-card p {
    margin: 0;
    max-width: 560px;
    color: #a7a7b1;
    font-size: 16px;
    line-height: 1.8;
}

.auth-feature-list {
    display: grid;
    gap: 14px;
    margin-top: 28px;
}

.auth-feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #efeff5;
}

.auth-feature-item i {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255, 75, 43, 0.24), rgba(255, 75, 43, 0.08));
    color: #ff7d61;
}

.login-card {
    max-width: none;
    padding: 34px 30px;
    border-radius: 30px;
    background:
        linear-gradient(180deg, rgba(29, 29, 34, 0.98), rgba(20, 20, 25, 0.98));
    text-align: center;
}

.login-badge {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255, 75, 43, 0.18), rgba(255, 75, 43, 0.05));
    border: 1px solid rgba(255, 75, 43, 0.2);
    color: #ff6b4d;
    font-size: 26px;
}

.auth-form-modern .field-group {
    margin-bottom: 18px;
    text-align: left;
}

.auth-form-modern .field-group label {
    color: #a4a4ad;
    font-size: 13px;
    margin-bottom: 8px;
}

.auth-form-modern .field-group input {
    min-height: 54px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.auth-form-modern .field-group input:focus {
    border-color: rgba(255, 75, 43, 0.4);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 4px rgba(255, 75, 43, 0.08);
}

.page-login .btn-main,
.auth-social-google,
.auth-social-discord {
    min-height: 54px;
    border-radius: 16px;
}

.page-login .btn-main {
    margin-top: 6px;
    margin-bottom: 18px;
}

.auth-social-google {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    width: 100% !important;
    padding: 14px 16px !important;
    margin-top: 0 !important;
    background: rgba(255,255,255,0.96) !important;
    color: #2f3137 !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    border: 1px solid rgba(255,255,255,0.72) !important;
    box-shadow: 0 12px 28px rgba(0,0,0,0.18) !important;
    line-height: 1.2 !important;
    -webkit-appearance: none;
    appearance: none;
}

.auth-social-google img {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.auth-social-google,
.auth-social-google:link,
.auth-social-google:visited,
.auth-social-google:hover,
.auth-social-google:active {
    text-decoration: none !important;
}

.auth-social-google span,
.auth-social-google strong,
.auth-social-google img + * {
    color: #2f3137 !important;
    text-decoration: none !important;
}

.auth-social-google:hover {
    background: #ffffff;
    transform: translateY(-2px);
}

.auth-social-discord {
    width: 100%;
    margin-top: 12px;
}

.login-link-group {
    margin-top: 24px;
    font-size: 14px;
    color: #8c8c95;
}

.login-link-group a {
    color: #ff6e52;
    text-decoration: none;
    font-weight: 600;
}

.login-link-group a:hover {
    text-decoration: underline;
}

@media (max-width: 980px) {
    .auth-layout {
        grid-template-columns: 1fr;
        max-width: 520px;
    }

    .auth-intro-card {
        display: none;
    }
}

@media (max-width: 640px) {
    .page-login .auth-container {
        align-items: flex-start;
        padding: calc(env(safe-area-inset-top, 0px) + 24px) 16px 28px;
    }

    .auth-layout {
        max-width: 100%;
    }

    .login-card {
        padding: 26px 20px 22px;
        border-radius: 26px;
    }

    .login-badge {
        width: 58px;
        height: 58px;
        border-radius: 18px;
        font-size: 22px;
    }

    .page-login .auth-box h2 {
        font-size: 30px;
        margin-bottom: 6px;
    }

    .page-login .auth-box p {
        margin-bottom: 24px;
    }

    .page-login .field-group {
        margin-bottom: 16px;
    }

    .page-login .field-group input {
        min-height: 52px;
        font-size: 15px;
    }

    .divider {
        margin: 18px 0;
        font-size: 12px;
    }
}
