* {
    box-sizing: border-box;
}

:root {
    --primary: #ef4444;
    --primary-dark: #dc2626;
    --primary-hover: #f87171;
    --success: #16a34a;
    --text-dark: #111827;
    --text-mid: #374151;
    --text-light: #6b7280;
    --border: #e5e7eb;
    --border-input: #d1d5db;
    --bg-page: #f3f4f6;
    --bg-card: #ffffff;
    --bg-light: #f9fafb;
    --shadow-card: 0 10px 25px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --radius-card: 16px;
    --radius-input: 10px;
}

/* ============================================
   BASE
   ============================================ */
.robux-section {
    padding: 24px 0 40px;
    min-height: 100vh;
    background: var(--bg-page);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* ============================================
   HEADER
   ============================================ */
.robux-header {
    text-align: center;
    margin-bottom: 24px;
}

.robux-title {
    font-size: 28px;
    font-weight: 800;
    color: #111827;
    margin: 0 0 6px 0;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.robux-subtitle {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-light);
    margin: 0;
}

/* ============================================
   LAYOUT
   ============================================ */
.robux-main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.robux-left,
.robux-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ============================================
   CARDS
   ============================================ */
.robux-packages-wrapper,
.robux-form-wrapper,
.robux-summary,
.robux-features {
    background: var(--bg-card);
    border-radius: var(--radius-card);
    padding: 20px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border);
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title i {
    color: var(--primary);
    font-size: 15px;
    flex-shrink: 0;
}

/* ============================================
   INPUT AMOUNT SECTION
   ============================================ */
.robux-input-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rate-info {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-dark);
}

.rate-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.rate-info strong {
    color: var(--primary-dark);
    font-weight: 700;
}

.amount-input-wrap label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.amount-input-wrap label i {
    color: var(--primary);
}

.input-with-suffix {
    position: relative;
}

.input-with-suffix .form-control {
    width: 100%;
    padding: 12px 44px 12px 14px;
    background: #fff;
    border: 1.5px solid var(--border-input);
    border-radius: var(--radius-input);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
    -webkit-font-smoothing: antialiased;
}

.input-with-suffix .form-control::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.input-with-suffix .form-control:focus {
    outline: none;
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
    background: #fff;
}

.input-suffix {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    pointer-events: none;
}

.quick-amounts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.quick-btn {
    padding: 5px 12px;
    background: var(--bg-light);
    border: 1.5px solid var(--border-input);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-mid);
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.quick-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.quick-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.robux-result {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-light);
    border: 1.5px dashed var(--border-input);
    border-radius: 10px;
    padding: 12px 16px;
    transition: border-color 0.25s ease, background 0.25s ease;
}

.robux-result.has-value {
    background: #fff5f5;
    border-color: var(--primary);
    border-style: solid;
}

.result-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.result-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.result-label {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-light);
}

.result-amount {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary-dark);
    line-height: 1.2;
    -webkit-font-smoothing: antialiased;
}

/* ============================================
   FORM
   ============================================ */
.robux-form .form-group {
    margin-bottom: 14px;
}

.robux-form label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.robux-form label i {
    color: var(--primary);
    font-size: 13px;
    flex-shrink: 0;
}

.required {
    color: var(--primary);
}

.robux-form .form-control {
    width: 100%;
    padding: 11px 14px;
    background: #fff;
    border: 1.5px solid var(--border-input);
    border-radius: var(--radius-input);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
    -webkit-font-smoothing: antialiased;
}

.robux-form .form-control::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.robux-form .form-control:focus {
    outline: none;
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
    background: #fff;
}

.robux-form textarea.form-control {
    resize: vertical;
    min-height: 70px;
}

/* ============================================
   PACKAGES
   ============================================ */
.robux-packages {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
    gap: 10px;
}

.robux-package {
    position: relative;
    background: var(--bg-light);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 110px;
}

.robux-package:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.12);
}

.robux-package.active {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-color: var(--primary-dark);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}

.robux-package.active .pkg-amount,
.robux-package.active .pkg-price {
    color: #fff;
}

.robux-package.active .package-check {
    display: flex;
}

.badge {
    position: absolute;
    top: -6px;
    right: 4px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
}

.pkg-icon {
    width: 26px;
    height: 26px;
    margin-bottom: 5px;
    flex-shrink: 0;
}

.pkg-amount {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 2px;
    line-height: 1.2;
}

.pkg-price {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    line-height: 1.2;
}

.package-check {
    position: absolute;
    top: 5px;
    left: 5px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.package-check i {
    color: var(--primary);
    font-size: 11px;
}

/* ============================================
   SUMMARY CARD (ĐƠN HÀNG)
   ============================================ */
.robux-summary {
    position: sticky;
    top: 70px;
    z-index: 10;
}

.summary-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 14px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.summary-title i {
    color: var(--primary);
    font-size: 15px;
    flex-shrink: 0;
}

.summary-content {
    margin-bottom: 16px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-light);
    gap: 8px;
}

.summary-item strong {
    color: var(--text-dark);
    font-weight: 600;
    text-align: right;
}

.summary-divider {
    height: 1px;
    background: var(--border);
    margin: 12px 0;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    gap: 8px;
}

.summary-total strong {
    font-size: 25px;
    font-weight: 800;
    color: #dc2626;
    -webkit-font-smoothing: antialiased;
}

/* Nút thanh toán */
.btn-checkout {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    -webkit-font-smoothing: antialiased;
}

.btn-checkout:hover:not(:disabled) {
    background: linear-gradient(135deg, #f87171, #ef4444);
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.35);
    transform: translateY(-1px);
}

.btn-checkout:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: none;
}

.btn-checkout:disabled {
    background: #d1d5db;
    color: #9ca3af;
    cursor: not-allowed;
}

.btn-checkout i {
    font-size: 14px;
}

.summary-note {
    background: #fff5f5;
    border-left: 3px solid var(--primary);
    padding: 10px 12px;
    border-radius: 6px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.summary-note i {
    color: var(--primary);
    font-size: 13px;
    flex-shrink: 0;
    margin-top: 1px;
}

.summary-note p {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-mid);
    line-height: 1.5;
}

/* ============================================
   CAM KẾT
   ============================================ */
.robux-features h4 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.robux-features h4 i {
    color: var(--primary);
    font-size: 15px;
    flex-shrink: 0;
}

.robux-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.robux-features ul li {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-mid);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.robux-features ul li i {
    color: var(--success);
    font-size: 13px;
    flex-shrink: 0;
}

/* ============================================
   PROMO BAR
   ============================================ */
.promo-bar-robux {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 4px solid #f97316;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 20px;
    overflow: hidden;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    box-shadow: var(--shadow-sm);
}

.promo-bar-icon {
    display: inline-block;
    font-size: 18px !important;
    color: #e53e3e !important;
    flex-shrink: 0;
    animation: bellRing 1.5s ease infinite;
    width: auto !important;
    height: auto !important;
}

@keyframes bellRing {
    0%, 100% { transform: rotate(0deg); }
    15%       { transform: rotate(15deg); }
    30%       { transform: rotate(-12deg); }
    45%       { transform: rotate(10deg); }
    60%       { transform: rotate(-8deg); }
    75%       { transform: rotate(5deg); }
}

.promo-bar-track-wrap {
    flex: 1;
    overflow: hidden;
    position: relative;
}

#promoBarTrack {
    position: relative;
    height: 1.5em;
}

.promo-bar-track {
    position: absolute;
    top: 0;
    left: 0;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    animation: promoScroll 22s linear infinite;
    will-change: transform;
}

.promo-bar-track-wrap:hover .promo-bar-track {
    animation-play-state: paused;
}

@keyframes promoScroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.promo-bar-text {
    display: inline-block;
}

.promo-bar-sep {
    display: inline-block;
    margin: 0 18px;
    color: #f97316;
    font-weight: 700;
}

/* ============================================
   CHI TIẾT DỊCH VỤ
   ============================================ */
.service-details-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin: 24px 0;
    box-shadow: var(--shadow-sm);
}

.service-block-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
}

.service-details-wrapper {
    display: flex;
    flex-direction: column;
}

.service-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 1px solid var(--border);
}

.service-item:last-child {
    border-bottom: none;
}

.service-cell-left,
.service-cell-right {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    transition: background 0.2s ease;
}

.service-cell-left {
    border-right: 1px solid var(--border);
}

.service-cell-left:hover,
.service-cell-right:hover {
    background: var(--bg-light);
}

.service-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
    width: 24px;
    min-width: 24px;
    margin-top: 1px;
}

.service-icon.check {
    color: var(--success);
}

.service-icon.star {
    color: #f59e0b;
}

.service-text {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-mid);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.service-text strong {
    font-weight: 700;
    color: var(--text-dark);
}

/* ============================================
   RESPONSIVE – MOBILE (<768px)
   ============================================ */
@media (max-width: 767px) {
    .service-details-block {
        padding: 16px;
        margin: 20px 0;
    }

    .service-block-title {
        font-size: 14px;
        margin-bottom: 12px;
    }

    .service-item {
        display: flex;
        flex-direction: column;
        border-bottom: 1px solid var(--border);
    }

    .service-cell-left,
    .service-cell-right {
        padding: 12px;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .service-cell-left:last-child,
    .service-cell-right:last-child {
        border-bottom: none;
    }

    .service-text {
        font-size: 13px;
    }

    .service-icon {
        width: 20px;
        min-width: 20px;
        font-size: 16px;
    }
}

/* ============================================
   RESPONSIVE – TABLET (≥768px)
   ============================================ */
@media (min-width: 768px) {
    .robux-section { padding: 28px 0 48px; }
    .robux-container { padding: 0 20px; }
    .robux-header { margin-bottom: 28px; }
    .robux-title { font-size: 30px; }
    .robux-main { gap: 20px; }
    .robux-left, .robux-right { gap: 20px; }

    .robux-packages-wrapper,
    .robux-form-wrapper,
    .robux-summary,
    .robux-features { padding: 24px; }

    .robux-packages {
        grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
        gap: 12px;
    }

    .robux-package { min-height: 115px; }

    .summary-total strong { font-size: 24px; }
}

/* ============================================
   RESPONSIVE – DESKTOP (≥1024px)
   ============================================ */
@media (min-width: 1024px) {
    .robux-section { padding: 32px 0 56px; }
    .robux-container { padding: 0 24px; }
    .robux-header { margin-bottom: 32px; }
    .robux-title { font-size: 32px; }

    .robux-main {
        grid-template-columns: 1fr 320px;
        gap: 24px;
    }

    .robux-left, .robux-right { gap: 24px; }

    .robux-packages-wrapper,
    .robux-form-wrapper,
    .robux-summary,
    .robux-features { padding: 28px; }

    .robux-packages {
        grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
        gap: 14px;
    }

    .robux-package { min-height: 120px; }

    .robux-summary { top: 80px; }

    .summary-total strong { font-size: 26px; }

    .btn-checkout { font-size: 15px; padding: 14px; }
}
