* { box-sizing: border-box; }

    body {
        font-size: 16px;
        line-height: 1.5;
    }

    .otp-page {
        max-width: 980px;
        margin: 0 auto;
        padding: 0.75rem;
    }

    .page-hero {
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        color: #fff;
        border-radius: 18px;
        padding: 1.15rem;
        box-shadow: 0 8px 24px rgba(13, 110, 253, 0.18);
        margin-bottom: 1rem;
        overflow: hidden;
        position: relative;
    }

    .page-hero::after {
        content: '';
        position: absolute;
        width: 160px;
        height: 160px;
        border-radius: 999px;
        background: rgba(255,255,255,0.12);
        right: -70px;
        top: -70px;
    }

    .page-hero h1 {
        position: relative;
        z-index: 1;
        font-size: 1.35rem;
        font-weight: 800;
        margin: 0 0 0.65rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        flex-wrap: wrap;
        word-break: break-word;
    }

    .hero-subtitle {
        position: relative;
        z-index: 1;
        font-size: 0.9rem;
        opacity: 0.94;
        margin-bottom: 0.85rem;
    }

    .wallet-summary {
        position: relative;
        z-index: 1;
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.55rem;
    }

    .wallet-line {
        background: rgba(255,255,255,0.14);
        border: 1px solid rgba(255,255,255,0.18);
        border-radius: 14px;
        padding: 0.7rem 0.85rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        flex-wrap: wrap;
    }

    .wallet-label {
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        font-size: 0.9rem;
        opacity: 0.95;
    }

    .wallet-value {
        font-size: 1.15rem;
        font-weight: 800;
        white-space: nowrap;
    }

    .wallet-line .btn {
        border-radius: 999px;
        font-weight: 700;
        padding: 0.35rem 0.8rem;
        min-height: 36px;
        color: var(--primary-color);
    }

    .mobile-card,
    .feature-card,
    .history-section {
        background: #fff;
        border: 1px solid rgba(0,0,0,0.06);
        border-radius: 16px;
        padding: 1rem;
        box-shadow: 0 4px 14px rgba(0,0,0,0.07);
        margin-bottom: 1rem;
    }

    .section-title {
        font-size: 1.1rem;
        font-weight: 800;
        color: var(--dark-color);
        margin: 0 0 0.75rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .section-subtitle {
        color: #6c757d;
        font-size: 0.88rem;
        margin-top: -0.35rem;
        margin-bottom: 0.85rem;
    }

    .usage-guide-toggle {
        width: 100%;
        border: 1px solid #e9ecef;
        background: #fff;
        border-radius: 14px;
        padding: 0.85rem 1rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        text-align: left;
        font-weight: 800;
        color: #212529;
        box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    }

    .usage-guide-toggle small {
        color: #6c757d;
        font-weight: 600;
        white-space: nowrap;
    }

    .guide-steps {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.55rem;
        margin-top: 0.75rem;
    }

    .guide-step {
        background: #f8f9fa;
        border: 1px solid #e9ecef;
        border-radius: 12px;
        padding: 0.7rem 0.8rem;
        display: flex;
        align-items: flex-start;
        gap: 0.65rem;
        font-size: 0.9rem;
    }

    .step-no {
        min-width: 26px;
        height: 26px;
        border-radius: 999px;
        background: var(--primary-color);
        color: #fff;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 0.78rem;
        font-weight: 800;
        flex-shrink: 0;
    }

    .notice-stack {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.65rem;
        margin-bottom: 1rem;
    }

    .notice-card {
        background: #fff;
        border: 1px solid #dbeafe;
        border-left: 5px solid var(--primary-color);
        border-radius: 14px;
        padding: 0.72rem 0.85rem;
        display: flex;
        align-items: flex-start;
        gap: 0.65rem;
        box-shadow: 0 3px 12px rgba(0,0,0,0.05);
        font-size: 0.9rem;
    }

    .notice-card i {
        color: var(--primary-color);
        font-size: 1.1rem;
        margin-top: 0.05rem;
        flex-shrink: 0;
    }

    .section-title-row {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 0.8rem;
        flex-wrap: wrap;
        margin-bottom: 0.85rem;
    }

    .inline-badge {
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
        border-radius: 999px;
        padding: 0.35rem 0.65rem;
        font-size: 0.78rem;
        font-weight: 700;
        color: var(--primary-color);
        background: #eef2ff;
        border: 1px solid #dbe4ff;
        white-space: nowrap;
    }

    .price-search-form {
        background: #f8f9fa;
        border: 1px solid #e9ecef;
        border-radius: 14px;
        padding: 0.85rem;
    }

    .price-toolbar,
    .action-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .form-floating { margin-bottom: 0.75rem; }

    .form-floating > .form-control,
    .form-floating > .form-select {
        border-radius: 12px;
        border: 2px solid #e2e8f0;
        font-size: 16px;
        min-height: 58px;
        background: #fff;
    }

    .form-floating > .form-control:focus,
    .form-floating > .form-select:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 0.2rem rgba(99,102,241,0.15);
    }

    .form-text,
    .search-hint {
        display: block;
        font-size: 0.82rem;
        color: #6c757d;
    }

    .search-hint {
        margin-top: 0.65rem;
        line-height: 1.4;
    }

    .btn {
        border-radius: 12px;
        font-weight: 700;
        min-height: 46px;
        padding: 0.72rem 1rem;
    }

    .btn-sm {
        min-height: 38px;
        padding: 0.45rem 0.75rem;
        border-radius: 999px;
    }

    .price-loading {
        text-align: center;
        margin-top: 0.85rem;
        padding: 0.85rem;
        border-radius: 14px;
        background: #f8f9fa;
        border: 1px dashed #dee2e6;
        color: #6c757d;
        font-weight: 700;
    }

    #price-results-container.loading {
        opacity: 0.55;
        pointer-events: none;
        transition: opacity 0.18s ease;
    }

    .price-table-wrap {
        margin-top: 0.85rem;
        border: 1px solid #e9ecef;
        border-radius: 14px;
        overflow: hidden;
        background: #fff;
        box-shadow: 0 2px 10px rgba(0,0,0,0.045);
    }

    .price-compact-table {
        width: 100%;
        margin: 0;
        table-layout: fixed;
        font-size: 0.84rem;
    }

    .price-compact-table col.col-app { width: 20%; }
    .price-compact-table col.col-country { width: 35%; }
    .price-compact-table col.col-price { width: 10%; }
    .price-compact-table col.col-action { width: 16%; }

    .price-compact-table thead th {
        background: #f8f9fa;
        color: #475569;
        font-size: 0.74rem;
        font-weight: 800;
        padding: 0.5rem 0.45rem;
        border-bottom: 1px solid #e9ecef;
        white-space: nowrap;
        vertical-align: middle;
    }

    .price-compact-table tbody td {
        padding: 0.48rem 0.45rem;
        border-bottom: 1px solid #eef2f7;
        vertical-align: middle;
    }

    .price-compact-table tbody tr:last-child td {
        border-bottom: 0;
    }

    .price-compact-table tbody tr:hover {
        background: #f8fbff;
    }

    .price-cell-main {
        display: block;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-weight: 800;
        color: #212529;
        line-height: 1.22;
    }

    .price-cell-sub {
        display: block;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        color: #6c757d;
        font-size: 0.72rem;
        line-height: 1.2;
        margin-top: 0.12rem;
    }

    .price-cell-value {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 999px;
        padding: 0.25rem 0.45rem;
        background: #ecfdf3;
        color: #087f5b;
        border: 1px solid #b7ebc6;
        font-weight: 900;
        line-height: 1.1;
        white-space: nowrap;
        max-width: 100%;
        font-size: 0.78rem;
    }

    .price-select-btn {
        min-height: 32px;
        padding: 0.28rem 0.42rem;
        border-radius: 9px;
        font-size: 0.76rem;
        width: 100%;
        white-space: nowrap;
    }

    .price-select-btn i {
        margin-right: 0.12rem;
    }

    .price-pagination {
        margin-top: 0.75rem;
    }

    .price-pagination .pagination {
        margin: 0;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .price-pagination .page-link {
        border-radius: 10px !important;
        min-width: 36px;
        text-align: center;
        font-size: 0.82rem;
        padding: 0.35rem 0.55rem;
    }

    .price-summary-line {
        margin-top: 0.65rem;
        color: #6c757d;
        font-size: 0.8rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .empty-state,
    .phone-info-display,
    .sms-code-display,
    .card-note {
        background: #f8f9fa;
        border: 1px solid #e9ecef;
        border-radius: 14px;
        padding: 0.85rem;
    }

    .empty-state {
        margin-top: 0.85rem;
        color: #6c757d;
        display: flex;
        align-items: flex-start;
        gap: 0.6rem;
        font-size: 0.9rem;
    }

    .feature-card h2 {
        font-size: 1.08rem;
        font-weight: 800;
        margin-bottom: 0.85rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        color: var(--dark-color);
    }

    .feature-card.request-card { border-top: 5px solid #10b981; }
    .feature-card.otp-card { border-top: 5px solid var(--primary-color); }
    .feature-card.reuse-card { border-top: 5px solid #0ea5e9; }

    .card-note {
        font-size: 0.86rem;
        color: #495057;
        margin-bottom: 0.8rem;
    }

    .phone-info-display,
    .sms-code-display {
        margin-top: 0.85rem;
    }

    .phone-number-display {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.65rem;
        background: #fff;
        border: 1px solid #dbeafe;
        border-radius: 14px;
        padding: 0.85rem;
        margin-top: 0.65rem;
    }

    .phone-number-main {
        font-size: 1.32rem;
        font-weight: 900;
        color: var(--primary-color);
        word-break: break-all;
        text-align: center;
    }

    .discount-used-info {
        display: none;
        margin-top: 0.65rem;
        border-radius: 14px;
        padding: 0.72rem 0.78rem;
        background: #eff6ff;
        border: 1px solid #bfdbfe;
        color: #1d4ed8;
        font-size: 0.86rem;
        font-weight: 700;
    }

    .spinner-container {
        text-align: center;
        padding: 1rem;
    }

    #countdown-timer {
        font-size: 0.95rem;
        font-weight: 800;
        color: var(--primary-color);
        margin-top: 0.35rem;
    }

    .sms-code-display h3 {
        font-size: 1rem;
        font-weight: 800;
        margin-bottom: 0.75rem;
        color: #198754;
        text-align: center;
    }

    .otp-big-code {
        font-size: 1.5rem;
        font-weight: 900;
        letter-spacing: 1px;
        color: #198754;
        text-align: center;
        background: #fff;
        border: 1px solid #bbf7d0;
        border-radius: 14px;
        padding: 0.72rem;
        margin-bottom: 0.65rem;
        word-break: break-all;
    }

    .sms-content-box,
    .otp-sms-full {
        background: #fff;
        border: 1px dashed #cbd5e1;
        border-radius: 12px;
        padding: 0.78rem;
        color: #495057;
        font-size: 0.9rem;
        word-break: break-word;
        white-space: pre-wrap;
    }

    .history-section .history-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.65rem;
        flex-wrap: wrap;
        margin-bottom: 0.75rem;
    }

    .history-section .history-head small {
        color: #6c757d;
        font-weight: 700;
    }

    .otp-history-compact {
        display: flex;
        flex-direction: column;
        gap: 0.62rem;
    }

    .otp-row {
        border: 1px solid #e9ecef;
        border-radius: 14px;
        padding: 0.72rem 0.78rem;
        background: #fff;
        box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    }

    .otp-row-top {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 0.65rem;
    }

    .otp-row-left,
    .otp-meta-line {
        display: flex;
        align-items: center;
        gap: 0.42rem;
        flex-wrap: wrap;
        min-width: 0;
    }

    .otp-index {
        min-width: 28px;
        height: 28px;
        border-radius: 999px;
        background: #64748b;
        color: #fff;
        font-size: 0.76rem;
        font-weight: 800;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .otp-code {
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
        padding: 0.28rem 0.6rem;
        border-radius: 999px;
        background: #f0fff4;
        border: 1px solid #b7ebc6;
        color: #198754;
        font-weight: 800;
        line-height: 1.2;
    }

    .otp-code-value {
        font-size: 1rem;
        letter-spacing: 0.5px;
    }

    .otp-time {
        font-size: 0.78rem;
        color: #6c757d;
        white-space: nowrap;
    }

    .otp-expand-btn {
        border: 0;
        background: transparent;
        color: var(--primary-color);
        padding: 0;
        font-size: 0.82rem;
        line-height: 1.2;
        white-space: nowrap;
        font-weight: 800;
        flex-shrink: 0;
    }

    .otp-detail-box {
        margin-top: 0.55rem;
        padding-top: 0.55rem;
        border-top: 1px dashed #dee2e6;
    }

    .otp-sms-full {
        margin-top: 0.5rem;
    }

    .copyable {
        cursor: pointer;
        user-select: none;
        transition: transform 0.08s ease, box-shadow 0.15s ease;
    }

    .copyable:hover {
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }

    .copyable:active {
        transform: scale(0.98);
    }

    .copy-toast {
        position: fixed;
        right: 18px;
        bottom: 18px;
        background: #212529;
        color: #fff;
        padding: 0.55rem 0.8rem;
        border-radius: 10px;
        font-size: 0.85rem;
        z-index: 9999;
        opacity: 0;
        transform: translateY(8px);
        pointer-events: none;
        transition: opacity 0.18s ease, transform 0.18s ease;
    }

    .copy-toast.show {
        opacity: 1;
        transform: translateY(0);
    }

    .pagination {
        justify-content: center;
        gap: 0.25rem;
        flex-wrap: wrap;
        margin: 0.9rem 0 0;
    }

    .page-link {
        border-radius: 999px !important;
        min-width: 38px;
        text-align: center;
        font-weight: 700;
    }

    .modal-content {
        border: none;
        border-radius: 18px;
        overflow: hidden;
        box-shadow: 0 18px 45px rgba(15,23,42,0.25);
    }

    .modal-header {
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        color: #fff;
        border: none;
    }

    .modal-title {
        font-weight: 800;
    }

    .modal-footer {
        border: none;
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }

    .modal-footer .btn {
        width: 100%;
        margin: 0;
    }

    @media (min-width: 768px) {
        .wallet-summary { grid-template-columns: 1fr 1fr; }
        .price-toolbar { grid-template-columns: 1.1fr 0.9fr 0.85fr; }
        .action-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
    }

    @media (max-width: 576px) {
        .otp-page { padding: 0.5rem; }
        .page-hero { padding: 1rem; }
        .page-hero h1 { font-size: 1.18rem; }
        .hero-subtitle { font-size: 0.84rem; }
        .mobile-card, .feature-card, .history-section { padding: 0.9rem; }
        .section-title { font-size: 1.02rem; }
        .wallet-line { padding: 0.68rem 0.75rem; }
        .wallet-value { font-size: 1.05rem; }
        .price-compact-table { font-size: 0.76rem; }
        .price-compact-table thead th { font-size: 0.68rem; padding: 0.42rem 0.32rem; }
        .price-compact-table tbody td { padding: 0.42rem 0.32rem; }
        .price-cell-main { font-size: 0.76rem; }
        .price-cell-sub { font-size: 0.66rem; }
        .price-cell-value { font-size: 0.72rem; padding: 0.22rem 0.34rem; }
        .price-select-btn { min-height: 30px; padding: 0.22rem 0.28rem; font-size: 0.7rem; }
        .modal-dialog { margin: 0.5rem; }
    }
