:root {
    --bg-main: #0a0e17;
    --bg-secondary: #111424;
    --primary: #ff007f;
    --primary-glow: rgba(255, 0, 127, 0.5);
    --secondary: #ff8c00;
    --accent: #00f0ff;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --card-bg: rgba(17, 20, 36, 0.7);
    --card-border: rgba(255, 255, 255, 0.1);
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.15), transparent 25%);
}

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Utilities */
.text-gradient {
    background: linear-gradient(135deg, var(--accent), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-price {
    color: var(--accent);
}

.font-bold {
    font-weight: 700;
}

.text-lg {
    font-size: 1.25rem;
}

.text-center {
    text-align: center;
}

.hidden {
    display: none !important;
}

/* Views */
.view {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.view.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.glass-header {
    background: rgba(11, 15, 25, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 80px;
    padding: 10px 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo i {
    color: var(--primary);
}

.logo span {
    color: var(--accent);
}

.site-img-logo {
    height: 32px;
    width: auto;
    object-fit: contain;
}

.main-nav ul {
    display: flex;
    align-items: center;
    gap: 30px;
}

.main-nav a:not(.btn-primary):not(.btn-outline) {
    font-weight: 500;
    color: var(--text-muted);
}

.main-nav a:not(.btn-primary):not(.btn-outline):hover {
    color: var(--text-main);
}

/* Buttons */
button,
.btn-primary,
.btn-outline,
.btn-large {
    font-family: inherit;
    cursor: pointer;
    border: none;
    outline: none;
    transition: all 0.3s ease;
    border-radius: 8px;
    font-weight: 600;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 10px 24px;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 9px 23px;
}

.btn-outline:hover {
    background: rgba(59, 130, 246, 0.1);
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
}

.btn-full {
    width: 100%;
    padding: 14px;
    font-size: 1.1rem;
}

.btn-glow {
    position: relative;
    z-index: 1;
}

.btn-glow::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary), var(--secondary), var(--accent), var(--primary));
    z-index: -1;
    border-radius: inherit;
    filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-glow:hover::after {
    opacity: 0.8;
    animation: glow 3s linear infinite;
}

@keyframes glow {
    0% {
        background-position: 0 0;
    }

    50% {
        background-position: 100% 0;
    }

    100% {
        background-position: 0 0;
    }
}

.btn-icon {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Main Content */
main {
    flex: 1;
    padding: 40px 20px;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 60px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-content {
    max-width: 800px;
}

.badge {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid rgba(6, 182, 212, 0.2);
    display: inline-block;
    margin-bottom: 24px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

/* Products Section */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.section-header p {
    color: var(--text-muted);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-10px);
    border-color: rgba(6, 182, 212, 0.5);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(6, 182, 212, 0.2);
}

.product-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    text-align: center;
}

.product-info h3 {
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.product-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 20px;
    text-align: center;
}

.product-card .btn-primary {
    width: 100%;
}

/* Specific Icons Colors */
.icon-adobe {
    color: #ff0000;
}

.icon-shopee {
    color: #ee4d2d;
}

.icon-canva {
    color: #00c4cc;
}

.icon-capcut {
    color: #e5e7eb;
}

.icon-chatgpt {
    color: #10a37f;
}

.icon-youtube {
    color: #ff0000;
}

/* Auth Views */
.auth-container {
    max-width: 450px;
    margin: 0 auto;
    padding: 40px;
    border-radius: 20px;
}

.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
}

.auth-container h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 10px;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.form-group label i {
    margin-right: 5px;
}

.form-group input {
    width: 100%;
    padding: 14px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.4);
}

.error-msg {
    color: var(--danger);
    font-size: 0.9rem;
    margin-bottom: 15px;
    text-align: center;
    min-height: 20px;
}

.auth-switch {
    text-align: center;
    margin-top: 25px;
    color: var(--text-muted);
}

.auth-switch a {
    color: var(--accent);
    font-weight: 600;
}

/* Checkout View */
.checkout-container {
    max-width: 900px;
    margin: 0 auto;
}

.checkout-header {
    margin-bottom: 40px;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

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

.order-summary,
.payment-info {
    padding: 30px;
    border-radius: 16px;
}

.order-summary h3,
.payment-info h3 {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--card-border);
}

.product-details-box {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.p-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.p-row .p-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.p-row .p-price {
    color: var(--accent);
    font-weight: bold;
}

.border-glow {
    position: relative;
}

.border-glow::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    z-index: -1;
    border-radius: inherit;
    opacity: 0.5;
}

.bank-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.bank-item {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 12px 15px;
    border-radius: 8px;
}

.bank-item .label {
    width: 120px;
    color: var(--text-muted);
}

.bank-item .value {
    flex-grow: 1;
}

.bank-item.highlight {
    background: rgba(59, 130, 246, 0.15);
    border: 1px dashed var(--primary);
}

.qr-code-placeholder {
    width: 200px;
    height: 200px;
    margin: 0 auto 25px;
    background: white;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #333;
    padding: 20px;
    text-align: center;
}

.qr-code-placeholder i {
    font-size: 4rem;
    margin-bottom: 10px;
    color: #000;
}

/* Dashboard View */
.dashboard-header {
    margin-bottom: 30px;
}

.dashboard-content {
    padding: 30px;
    border-radius: 16px;
}

.dashboard-content h3 {
    margin-bottom: 20px;
}

.table-responsive {
    overflow-x: auto;
}

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

.orders-table th,
.orders-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--card-border);
}

.orders-table th {
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-completed {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.status-pending {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.acc-info-box {
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.empty-state {
    text-align: center;
    padding: 50px 0;
}

.empty-state i {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state p {
    margin-bottom: 20px;
    color: var(--text-muted);
}

/* Footer */
footer {
    background: rgba(11, 15, 25, 0.95);
    border-top: 1px solid var(--card-border);
    padding: 60px 0 20px;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo p {
    margin-top: 15px;
    color: var(--text-muted);
    max-width: 300px;
}

.footer-links h4,
.footer-contact h4 {
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-contact p {
    color: var(--text-muted);
    margin-bottom: 10px;
}

.footer-contact i {
    width: 20px;
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

    .hero h1 {
        font-size: 2.5rem;
    }

    /* Sửa lỗi che đè Header (Thanh điều hướng) */
    .header-container {
        flex-direction: column;
        gap: 15px;
        padding: 20px 0;
    }

    .main-nav ul {
        gap: 12px;
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Sửa lỗi che đè ô thanh toán Checkout */
    .checkout-grid {
        grid-template-columns: 1fr;
    }

    .p-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    /* Sửa lỗi che đè thông tin ngân hàng */
    .bank-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .bank-item .label {
        width: auto;
        margin-bottom: 2px;
    }

    /* Bo góc và thu gọn form đăng nhập/đăng ký */
    .auth-container {
        padding: 25px 20px;
    }
}

/* Toast & Loading */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: white;
    color: #333;
    padding: 15px 25px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    font-weight: 600;
    animation: slideIn 0.3s ease;
}

.toast i {
    color: var(--success);
    font-size: 1.2rem;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(11, 15, 25, 0.9);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

/* Chat Widget (Customer) */
.chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1500;
}

.chat-toggle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(255, 0, 127, 0.4);
    transition: transform 0.3s;
    position: relative;
}

.chat-toggle:hover {
    transform: scale(1.1);
}

.chat-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-main);
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 450px;
    background: var(--bg-secondary);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.chat-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h4 {
    margin: 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(0, 0, 0, 0.2);
}

.chat-msg {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 16px;
    font-size: 0.95rem;
    line-height: 1.4;
    word-break: break-word;
}

.msg-admin {
    align-self: flex-start;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-bottom-left-radius: 4px;
}

.msg-user {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-input-area {
    display: flex;
    padding: 10px;
    background: var(--bg-main);
    border-top: 1px solid var(--card-border);
    gap: 10px;
}

.chat-input-area input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    padding: 10px 15px;
    border-radius: 20px;
    color: white;
    outline: none;
}

.chat-input-area input:focus {
    border-color: var(--accent);
}

.chat-input-area button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    color: #000;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Admin Chat UI */
.admin-chat-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 20px;
    height: 500px;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    overflow: hidden;
}

.admin-chat-users {
    background: rgba(0, 0, 0, 0.2);
    border-right: 1px solid var(--card-border);
    overflow-y: auto;
}

.admin-chat-user-item {
    padding: 15px;
    border-bottom: 1px solid var(--card-border);
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-chat-user-item:hover,
.admin-chat-user-item.active {
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid var(--accent);
}

.admin-chat-user-item.unread {
    font-weight: bold;
    color: var(--accent);
}

.admin-chat-box {
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.1);
}

.admin-chat-header {
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--card-border);
    font-weight: bold;
}

.admin-chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.admin-chat-input {
    display: flex;
    padding: 15px;
    gap: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid var(--card-border);
}

.admin-chat-input input {
    flex: 1;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    background: rgba(0, 0, 0, 0.2);
    color: white;
    outline: none;
}

@media(max-width: 768px) {
    .admin-chat-container {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 500px;
    }

    .admin-chat-users {
        max-height: 150px;
        border-right: none;
        border-bottom: 1px solid var(--card-border);
    }
}