/* VIP Rewards Page Custom Styles */

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

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 0;
}

.mobile-container {
    width: 450px;
    max-width: 100%;
    background: url('../images/bg.png') top center/cover no-repeat;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

/* Header Section */
.header-section {
    position: relative;
    padding: 0 15px 15px;
    background: transparent;
}

.top-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
    position: relative;
    background: linear-gradient(135deg, #8b6ce8 0%, #7a5ad6 100%);
    border-radius: 0;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: 15px;
}

.logo-container {
    text-align: center;
    flex: 1;
}

.logo-image {
    max-width: 200px;
    max-height: 50px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.logo-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
}

.header-icons {
    position: absolute;
    right: max(15px, calc((100vw - 450px) / 2 + 15px));
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 10px;
}

.header-icon {
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.header-icon:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.banner-image {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin-top: 10px;
}

/* Banner constrained to header-section width */
.banner-container {
    width: 100%;
    margin-left: 0;
}

.banner-container .banner-image {
    width: 100%;
    height: auto;
    display: block;
}

/* VIP Card Section */
.vip-card {
    background-image: url('../images/kapian.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    margin: 20px 15px;
    padding: 25px 20px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    backdrop-filter: blur(10px);
}

.vip-level {
    color: white;
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    /* padding-left: 50px; */
    position: relative;
}

.vip-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    margin-bottom: 20px;
}

.input-group-custom {
    margin-bottom: 20px;
}

.input-group-custom input {
    background: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    padding: 12px 15px;
    width: 100%;
    font-size: 14px;
}

.input-group-custom input::placeholder {
    color: #999;
}

.button-group {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-custom {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid white;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-query {
    background: transparent;
    color: white;
}

.btn-query:hover {
    background: white;
    color: #7a5ad6;
}

.btn-receive {
    background: white;
    color: #7a5ad6;
}

.btn-receive:hover {
    background: #f0f0f0;
}

/* Table Section */
.table-section {
    background: white;
    margin: 0 15px 20px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.rewards-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.rewards-table thead {
    background: linear-gradient(135deg, #9d7bea 0%, #7a5ad6 100%);
    color: white;
}

.rewards-table thead th {
    padding: 12px 8px;
    font-weight: bold;
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.rewards-table thead th:last-child {
    border-right: none;
}

.rewards-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background 0.2s ease;
}

.rewards-table tbody tr:hover {
    background: #f8f5ff;
}

.rewards-table tbody td {
    padding: 12px 8px;
    text-align: center;
    border-right: 1px solid #e0e0e0;
}

.rewards-table tbody td:last-child {
    border-right: none;
}

.rewards-table tbody td:first-child {
    background: linear-gradient(135deg, #9d7bea 0%, #7a5ad6 100%);
    color: white;
    font-weight: bold;
}

/* Highlighted Column */
.highlight-column {
    background: linear-gradient(135deg, #ff6b9d 0%, #ff4081 100%) !important;
    color: white !important;
    font-weight: bold;
    position: relative;
}

.rewards-table thead .highlight-column {
    border: 2px solid #ff4081;
}

/* Decorative Elements */
.decoration-icon {
    position: absolute;
    opacity: 0.3;
    pointer-events: none;
}

.decoration-top-left {
    top: 5px;
    left: 5px;
    font-size: 35px;
    color: white;
}

.decoration-bottom-right {
    bottom: 5px;
    right: 5px;
    font-size: 35px;
    color: white;
}

/* Customer Service Button */
.customer-service {
    position: fixed;
    right: max(20px, calc((100vw - 450px) / 2 + 20px));
    bottom: 100px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ff6b9d 0%, #ff4081 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 64, 129, 0.4);
    z-index: 1000;
}

/* Responsive */
@media (max-width: 480px) {
    .mobile-container {
        width: 100%;
    }

    .rewards-table {
        font-size: 11px;
    }

    .rewards-table thead th,
    .rewards-table tbody td {
        padding: 8px 4px;
    }

    .vip-level {
        font-size: 24px;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-container {
    animation: fadeIn 0.5s ease;
}

/* Rules Modal Styles */
.rules-modal-content {
    border-radius: 15px;
    border: none;
    max-width: 400px;
    margin: auto;
    background: linear-gradient(180deg, #6b8bf9 0%, #5a7ae8 100%);
}

.rules-modal-header {
    background: linear-gradient(135deg, #6b8bf9 0%, #5a7ae8 100%);
    border: none;
    padding: 15px 20px;
    border-radius: 15px 15px 0 0;
    position: relative;
}

.rules-modal-header .modal-title {
    color: white;
    font-weight: bold;
    font-size: 18px;
    text-align: center;
    width: 100%;
}

.btn-close-custom {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

.btn-close-custom:hover {
    opacity: 0.8;
}

.rules-modal-body {
    padding: 20px;
    background: #f9f9f9;
    max-height: 70vh;
    overflow-y: auto;
}

.rules-content {
    color: #333;
}

.rules-section-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.rules-item {
    margin-bottom: 20px;
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.rules-subtitle {
    color: #5a7ae8;
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 10px;
}

.rules-text {
    font-size: 14px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 10px;
}

.rules-text:last-child {
    margin-bottom: 0;
}

.highlight-text {
    color: #ff4081;
    font-weight: bold;
}

.rules-example {
    background: #fff8e1;
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
    color: #666;
    border-left: 3px solid #ffd54f;
    margin-top: 10px;
}

.amount-highlight {
    color: #ff4081;
    font-weight: bold;
    font-size: 14px;
}

.time-info {
    margin-top: 10px;
}

.time-item {
    font-size: 13px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 10px;
    padding-left: 10px;
}

.time-highlight {
    color: #5a7ae8;
    font-weight: bold;
}

.note-text {
    color: #ff6b6b;
    font-size: 12px;
}

.rules-list {
    margin: 10px 0;
    padding-left: 20px;
}

.rules-list li {
    font-size: 14px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 8px;
}

/* Modal backdrop */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.6);
}

/* Scrollbar for modal body */
.rules-modal-body::-webkit-scrollbar {
    width: 6px;
}

.rules-modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.rules-modal-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.rules-modal-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Mobile responsive for modal */
@media (max-width: 480px) {
    .modal-dialog {
        margin: 10px;
    }

    .rules-modal-content {
        max-width: 100%;
    }

    .rules-modal-body {
        max-height: 60vh;
    }

    .rules-subtitle {
        font-size: 14px;
    }

    .rules-text,
    .rules-list li {
        font-size: 13px;
    }
}
