/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Segoe UI', Tahoma, sans-serif;
    background: #f5f7fa;
    color: #333;
}

/* ===== HEADER ===== */
.main-header {
    background: #1a73e8;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo a {
    font-size: 1.6rem;
    font-weight: bold;
    text-decoration: none;
    color: #fff;
}
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}
.main-nav ul li a {
    text-decoration: none;
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.3s;
}
.main-nav ul li a:hover {
    color: #ffd700;
}
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}
.menu-toggle span {
    width: 25px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
}

/* MOBILE MENU */
@media (max-width: 768px) {
    .main-nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        right: 20px;
        top: 60px;
        background: #1a73e8;
        padding: 15px;
        border-radius: 8px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    }
    .main-nav ul.show {
        display: flex;
    }
    .menu-toggle {
        display: flex;
    }
}

/* ===== CONTENT ===== */
.main-content {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 15px;
}

/* FRAME BOX */
.frame-box {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}
.frame-header {
    background: #1a73e8;
    color: #fff;
    padding: 10px 15px;
    border-radius: 10px 10px 0 0;
}
.frame-header h2 {
    font-size: 1.4rem;
    font-weight: bold;
}
.frame-body {
    padding: 20px;
}

/* COMIC GRID */
.comics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}
.comic-card {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    text-decoration: none;
    color: #333;
    transition: transform 0.3s, box-shadow 0.3s;
}
.comic-card:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.comic-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 8px;
}
.comic-card h3 {
    margin-top: 10px;
    font-size: 1rem;
    font-weight: bold;
}

/* FOOTER */
footer {
    background: #1a73e8;
    color: #fff;
    text-align: center;
    padding: 15px;
    margin-top: 30px;
}
footer {
    background: #1a73e8;
    color: #fff;
    text-align: center;
    padding: 15px;
    margin-top: 30px;
}
/* ==== Login & Register ==== */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    background: #f5f7fa;
}
.login-box {
    background: #fff;
    width: 100%;
    max-width: 400px;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}
.login-title {
    text-align: center;
    color: #1a73e8;
    font-size: 1.8rem;
    margin-bottom: 20px;
}
.login-form .form-group {
    margin-bottom: 20px;
}
.login-form label {
    font-weight: bold;
    margin-bottom: 8px;
    display: block;
}
.login-form input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
}
.btn-login {
    width: 100%;
    padding: 12px;
    background: #1a73e8;
    color: #fff;
    font-size: 1.1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}
.btn-login:hover {
    background: #0c59c5;
}
.error-message {
    background: #ffdddd;
    color: #d8000c;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}

/* ==== Comic Page ==== */
.comic-info {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}
.comic-cover {
    width: 200px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.comic-info p {
    flex: 1;
    font-size: 1rem;
    line-height: 1.5;
}

.frame-box {
    background: #fff;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
    overflow: hidden;
}
.frame-header {
    background: #1a73e8;
    color: #fff;
    padding: 10px 15px;
    font-size: 1.4rem;
    font-weight: bold;
}
.frame-body ul {
    list-style: none;
    padding: 0;
}
.frame-body ul li {
    padding: 10px;
    border-bottom: 1px solid #eee;
}
.frame-body ul li:last-child {
    border-bottom: none;
}
.frame-body a.btn {
    padding: 5px 10px;
    margin-left: 10px;
    background: #1a73e8;
    color: #fff;
    border-radius: 5px;
    text-decoration: none;
}
.frame-body a.btn:hover {
    background: #0c59c5;
}
/* ==== PROFILE PAGE ==== */
.profile-wrapper {
    max-width: 600px;
    margin: 30px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.profile-title {
    margin-bottom: 15px;
    color: #333;
}
.profile-section {
    margin-bottom: 20px;
}
.profile-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}
.profile-item .label {
    font-weight: bold;
}
.profile-actions .btn {
    display: inline-block;
    padding: 10px 15px;
    margin-right: 10px;
    margin-top: 10px;
    border-radius: 4px;
    text-decoration: none;
    color: #fff;
    background: #007bff;
    transition: background 0.3s;
}
.profile-actions .btn:hover {
    background: #0056b3;
}
.profile-actions .btn-danger {
    background: #dc3545;
}
.profile-actions .btn-danger:hover {
    background: #a71d2a;
}
/* ==== SEARCH PAGE ==== */
.search-form {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}
.search-form input {
    width: 300px;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px 0 0 4px;
    outline: none;
}
.search-form button {
    padding: 8px 15px;
    border: none;
    background: #007bff;
    color: #fff;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}
.search-form button:hover {
    background: #0056b3;
}
.comic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}
.comic-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding-bottom: 10px;
}
.comic-cover img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}
.comic-title {
    font-size: 16px;
    font-weight: bold;
    padding: 10px;
}
.comic-desc {
    font-size: 14px;
    color: #666;
    padding: 0 10px;
}
.info-text {
    text-align: center;
    color: #666;
    margin-top: 20px;
}
/* Nạp Xu Page */
.nap-xu-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}
.nap-xu-card {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.qr-section {
    flex: 1 1 300px;
    text-align: center;
}
.qr-image {
    max-width: 220px;
    width: 100%;
    margin-bottom: 10px;
}
.qr-note {
    font-size: 14px;
    color: #555;
    margin-bottom: 5px;
}
.qr-warning {
    font-size: 13px;
    color: #b71c1c;
    font-weight: bold;
    text-transform: uppercase;
}
.info-section {
    flex: 1 1 300px;
}
.bank-info {
    list-style: none;
    padding: 0;
    margin: 0 0 15px;
}
.bank-info li {
    padding: 5px 0;
    font-size: 15px;
}
.syntax {
    background: #f5f5f5;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    color: #333;
}
.form-nap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.form-nap input[type="number"] {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 15px;
}
.btn-nap {
    background: #2196f3;
    color: #fff;
    padding: 12px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
}
.btn-nap:hover {
    background: #1976d2;
}
.alert.success {
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    color: #2e7d32;
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 4px;
}
/* Comic Read Page */
.comic-read-container {
    max-width: 1000px;
    margin: 20px auto;
    padding: 20px;
}
.comic-header {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}
.comic-cover {
    max-width: 200px;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}
.comic-info {
    flex: 1;
}
.comic-title {
    font-size: 28px;
    margin-bottom: 10px;
}
.comic-desc {
    color: #555;
    line-height: 1.5;
    margin-bottom: 15px;
}
.btn-buy-full {
    background: #4CAF50;
    padding: 12px 20px;
    border: none;
    color: #fff;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background 0.3s ease;
}
.btn-buy-full:hover { background: #388E3C; }

.chapters-section h2 {
    font-size: 22px;
    margin-bottom: 15px;
}
.chapter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.chapter-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #eee;
}
.btn-read {
    background: #2196F3;
    color: #fff;
    padding: 8px 12px;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
}
.btn-read:hover { background: #1976D2; }
.btn-buy-chapter {
    background: #FFC107;
    color: #000;
    padding: 8px 12px;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
}
.btn-buy-chapter:hover { background: #FFA000; }
/* Read Chapter Page */
.chapter-read-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    border-radius: 8px;
}
.chapter-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}
.chapter-title {
    font-size: 26px;
    color: #333;
}
.chapter-nav {
    display: flex;
    gap: 10px;
}
.chapter-nav .btn {
    padding: 8px 14px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s;
}
.btn-back { background: #9e9e9e; color: #fff; }
.btn-back:hover { background: #757575; }
.btn-prev { background: #2196F3; color: #fff; }
.btn-prev:hover { background: #1976D2; }
.btn-next { background: #4CAF50; color: #fff; }
.btn-next:hover { background: #388E3C; }
.chapter-content {
    font-size: 18px;
    line-height: 1.8;
    color: #444;
    white-space: pre-wrap;
}
