*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, #1b2735 0, #090a0f 60%, #050608 100%);
    color: #f5f5f5;
    min-height: 100vh;
}

.top-bar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: rgba(7, 11, 18, 0.96);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.logo-emoji {
    font-size: 1.5rem;
}

.brand-text {
    font-size: 1rem;
}

.stats {
    font-size: 0.85rem;
    opacity: 0.85;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary {
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    background: rgba(15, 23, 42, 0.9);
    color: #e5e7eb;
    padding: 0.25rem 0.7rem;
    font-size: 0.78rem;
    cursor: pointer;
    text-decoration: none;
}

.btn-secondary:hover {
    background: rgba(37, 99, 235, 0.9);
    border-color: rgba(59, 130, 246, 1);
}

.page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1rem 2.5rem;
}

.controls {
    display: grid;
    grid-template-columns: minmax(0, 2fr) auto auto;
    gap: 0.75rem 1.25rem;
    align-items: end;
    margin-bottom: 1rem;
}

.registration-panel {
    display: none;
    margin-bottom: 0.75rem;
    padding: 0.6rem 0.8rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(55, 65, 81, 0.9);
    background: rgba(10, 16, 30, 0.9);
    font-size: 0.82rem;
}

@media (max-width: 800px) {
    .controls {
        grid-template-columns: minmax(0, 1fr);
        align-items: stretch;
    }
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    color: #d0d0d0;
    font-size: 0.85rem;
    position: relative;
}

.field-inline {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

.search-suggestions {
    position: absolute;
    top: calc(100% + 0.2rem);
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.98);
    border-radius: 0.5rem;
    border: 1px solid rgba(55, 65, 81, 0.9);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    z-index: 40;
    max-height: 220px;
    overflow-y: auto;
    padding: 0.25rem 0.2rem;
}

.search-suggestion {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: 0.35rem;
}

.search-suggestion:hover {
    background: rgba(37, 99, 235, 0.8);
}

label {
    font-weight: 500;
}

input[type="text"],
select {
    padding: 0.55rem 0.65rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(3, 7, 18, 0.9);
    color: inherit;
    outline: none;
    font-size: 0.9rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

input[type="text"]:focus,
select:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.4);
    background: rgba(7, 12, 24, 0.98);
}

.checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
}

.summary-line {
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
    color: rgba(229, 231, 235, 0.9);
}

.cards-section {
    margin-top: 0.25rem;
}

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

.card {
    position: relative;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(8, 47, 73, 0.9));
    border-radius: 0.75rem;
    padding: 0.875rem 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(148, 163, 184, 0.25);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    min-height: 180px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    border-color: rgba(59, 130, 246, 0.6);
}

/* Card Header - UID and Badge */
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.card-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    color: #f1f5f9;
}

.card-emoji {
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Badge Styles */
.badge {
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    flex-shrink: 0;
}

.badge-status {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.5);
    color: #4ade80;
}

.badge-status.badge-pre-ordered {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.4);
}

.badge-status.badge-claimed {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.5);
    color: #4ade80;
}

.badge-unavailable {
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.5);
    color: #fbbf24;
}

.badge-offline {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
}

.badge-target {
    background: rgba(244, 63, 94, 0.12);
    border: 1px solid rgba(244, 63, 94, 0.7);
    color: #fecaca;
}

/* Card Body - All meta rows */
.card-meta {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.25rem 0.75rem;
    font-size: 0.78rem;
    margin-bottom: 0.5rem;
    align-items: start;
}

.card-meta:last-child {
    margin-bottom: 0;
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Meta Labels */
.meta-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 500;
    color: rgba(148, 163, 184, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.15rem;
}

/* Meta Values */
.card-meta > div {
    min-width: 0; /* Allow text truncation */
}

.card-meta > div > span:not(.meta-label) {
    display: block;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* System Row - System name and Last seen */
.card-meta-top {
    margin-bottom: 0.6rem;
}

.card-meta-top > div:first-child > span:not(.meta-label) {
    font-weight: 500;
    color: #f1f5f9;
    max-width: 140px;
}

.last-seen-container {
    text-align: right;
}

.last-seen-container > span:not(.meta-label) {
    color: #94a3b8;
    font-size: 0.75rem;
}

/* IP Row */
.card-meta-ip {
    margin-bottom: 0.6rem;
}

.card-meta-ip > div:first-child > span:not(.meta-label) {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.72rem;
    color: #cbd5e1;
}

/* Remove the <br> styling issue */
.card-meta-ip > div:first-child > span:not(.meta-label) br {
    display: none;
}

.carrier-block {
    text-align: right;
}

.carrier-block > span:not(.meta-label) {
    color: #60a5fa;
    font-size: 0.75rem;
    max-width: 100px;
}

/* Stats Row - Logins and Cookies */
.card-meta-stats {
    grid-template-columns: auto 1fr;
}

.stats-right {
    text-align: right;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #94a3b8;
    white-space: nowrap;
}

.stats-right span {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

/* Highlight high-value systems */
.card[data-cookies-high="true"] {
    border-color: rgba(34, 197, 94, 0.4);
}

.card[data-cookies-high="true"] .stats-right span:last-child {
    color: #4ade80;
    font-weight: 600;
}

/* Card with logins indicator */
.card .stats-right span:first-child {
    color: #fbbf24;
}

/* Zero values dimmed */
.card .stats-right span[data-value="0"] {
    opacity: 0.5;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .card {
        min-height: auto;
    }
    
    .card-meta {
        grid-template-columns: 1fr;
        gap: 0.4rem;
    }
    
    .last-seen-container,
    .carrier-block,
    .stats-right {
        text-align: left;
    }
    
    .card-meta-stats {
        grid-template-columns: 1fr;
    }
}

.meta-words {
    font-size: 0.75rem;
    color: rgba(148, 163, 184, 0.98);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 50;
}

.backdrop.hidden {
    display: none;
}

.detail-card {
    position: relative;
    max-width: 640px;
    width: 100%;
    background: radial-gradient(circle at top left, #0f172a 0, #020617 45%, #020617 100%);
    border-radius: 1rem;
    padding: 1.25rem 1.4rem 1.1rem;
    border: 1px solid rgba(148, 163, 184, 0.4);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.8);
    max-height: 95vh;
    overflow-y: auto;
}

.close-btn {
    position: absolute;
    top: 0.6rem;
    right: 0.7rem;
    border: none;
    background: transparent;
    color: #e5e7eb;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.15rem 0.3rem;
    border-radius: 999px;
    transition: background 0.12s ease, transform 0.12s ease;
}

.close-btn:hover {
    background: rgba(31, 41, 55, 0.8);
    transform: scale(1.03);
}

.detail-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.6rem;
    margin-bottom: 0.65rem;
}

.detail-domain {
    font-size: 1.05rem;
    font-weight: 600;
    word-break: break-all;
}

.detail-emoji {
    font-size: 1.35rem;
    margin-right: 0.25rem;
}

.detail-meta-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.5rem 0.75rem;
    font-size: 0.82rem;
    margin-bottom: 0.55rem;
}

.detail-domain-list {
    max-height: 260px;
    overflow-y: auto;
    margin-top: 0.4rem;
    position: relative;
}

/* Prevent bypassing restrictions via inspect element */
.detail-domain-list[data-restricted="true"] *,
.detail-domain-list.restricted-content * {
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    pointer-events: none !important;
    -webkit-touch-callout: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

.detail-domain-list[data-restricted="true"],
.detail-domain-list.restricted-content {
    filter: blur(10px) !important;
    pointer-events: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

.detail-domain-list[data-restricted="true"]::before,
.detail-domain-list.restricted-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    background: transparent;
    pointer-events: auto;
}

.domain-search-input[data-restricted="true"],
input[data-restricted="true"] {
    pointer-events: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
}

.detail-domain-row {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) auto auto;
    gap: 0.25rem 0.6rem;
    padding: 0.25rem 0.35rem;
    font-size: 0.78rem;
    border-radius: 0.4rem;
}

.detail-domain-row:nth-child(odd) {
    background: rgba(15, 23, 42, 0.7);
}

.detail-domain-row:nth-child(even) {
    background: rgba(15, 23, 42, 0.4);
}

.detail-domain-row.domain-unlocked-highlight {
    border-radius: 0.25rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.detail-domain-domain {
    word-break: break-all;
}

.detail-domain-cat {
    text-align: right;
    opacity: 0.85;
}

.detail-domain-count {
    text-align: right;
    color: rgba(248, 250, 252, 0.9);
}

.domain-search-input {
    margin-top: 0.4rem;
    margin-bottom: 0.3rem;
}

.meta-block-label {
    opacity: 0.7;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
}

.meta-block-value {
    margin-top: 0.15rem;
}

.detail-line-raw {
    margin-top: 0.55rem;
    padding: 0.5rem 0.65rem;
    border-radius: 0.6rem;
    background: rgba(15, 23, 42, 0.9);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.7rem;
    max-height: 140px;
    overflow: auto;
    border: 1px solid rgba(55, 65, 81, 0.85);
}

.detail-hint {
    margin-top: 0.45rem;
    font-size: 0.75rem;
    color: rgba(148, 163, 184, 0.9);
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    font-size: 0.72rem;
}

.pill-dot {
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 999px;
    background: #22c55e;
}

.pill-dot.red {
    background: #f97316;
}

.no-results {
    grid-column: 1 / -1;
    padding: 1.5rem 0.5rem;
    text-align: center;
    color: rgba(148, 163, 184, 0.9);
    font-size: 0.9rem;
}

@media (max-width: 600px) {
    .top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }
}

.detail-card::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.badge-offline {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.4) !important;
}

.token-display {
    font-size: 0.85rem;
    padding: 0.35rem 0.75rem;
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.2), rgba(251, 191, 36, 0.15));
    color: #fbbf24;
    border: 1px solid rgba(234, 179, 8, 0.4);
    border-radius: 999px;
    margin-right: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.15s ease;
}

.token-display:hover {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.35), rgba(251, 191, 36, 0.25));
    border-color: rgba(234, 179, 8, 0.6);
    transform: scale(1.02);
}

.token-icon {
    font-size: 1rem;
}

.token-amount {
    font-weight: 700;
    font-size: 0.95rem;
}

.token-label {
    opacity: 0.8;
    font-size: 0.75rem;
}

.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(7, 11, 18, 0.96);
    backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.75rem 1.5rem;
    z-index: 10;
}

.footer-stats {
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.85;
}

.btn-unlock {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    background: rgba(234, 179, 8, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(234, 179, 8, 0.4);
    border-radius: 4px;
    cursor: pointer;
    margin-left: auto;
}

.btn-unlock:hover {
    background: rgba(234, 179, 8, 0.3);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.4);
}

.detail-domain-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.unlocked-badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.4);
    border-radius: 4px;
    margin-left: auto;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    color: #f5f5f5;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.modal-body {
    padding: 1.5rem;
}

.modal-body h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: #4ade80;
}

.modal-body h3:first-child {
    margin-top: 0;
}

.modal-body ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.modal-body li {
    margin: 0.5rem 0;
}

/* ==========================================
   ADMIN PANEL STYLES
   ========================================== */

.admin-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 1.5rem 2.5rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-header h1 {
    margin: 0;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(8, 47, 73, 0.9));
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 0.75rem;
    padding: 1rem;
    text-align: center;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #4ade80;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 0.25rem;
}

.stat-card.stat-warning .stat-value {
    color: #fbbf24;
}

.stat-card.stat-danger .stat-value {
    color: #f87171;
}

.admin-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
    flex-wrap: wrap;
}

.admin-tab {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 0.5rem;
    color: #e5e7eb;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.15s ease;
}

.admin-tab:hover {
    background: rgba(37, 99, 235, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
}

.admin-tab.active {
    background: rgba(37, 99, 235, 0.4);
    border-color: rgba(59, 130, 246, 0.8);
    color: #fff;
}

.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.admin-table th,
.admin-table td {
    padding: 0.6rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-table th {
    background: rgba(15, 23, 42, 0.9);
    font-weight: 600;
    color: #94a3b8;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-table tr:hover {
    background: rgba(37, 99, 235, 0.1);
}

.admin-table .token-cell {
    font-family: ui-monospace, monospace;
    font-size: 0.8rem;
    color: #94a3b8;
}

.admin-table .amount-cell {
    font-weight: 600;
    color: #4ade80;
}

.admin-table .status-pending {
    color: #fbbf24;
}

.admin-table .status-completed {
    color: #4ade80;
}

.admin-table .status-failed {
    color: #f87171;
}

.admin-btn {
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
    border-radius: 0.35rem;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.admin-btn-primary {
    background: rgba(37, 99, 235, 0.8);
    color: #fff;
}

.admin-btn-primary:hover {
    background: rgba(37, 99, 235, 1);
}

.admin-btn-success {
    background: rgba(34, 197, 94, 0.8);
    color: #fff;
}

.admin-btn-success:hover {
    background: rgba(34, 197, 94, 1);
}

.admin-btn-danger {
    background: rgba(239, 68, 68, 0.8);
    color: #fff;
}

.admin-btn-danger:hover {
    background: rgba(239, 68, 68, 1);
}

.activity-log {
    max-height: 500px;
    overflow-y: auto;
    font-family: ui-monospace, monospace;
    font-size: 0.75rem;
    background: rgba(15, 23, 42, 0.9);
    border-radius: 0.5rem;
    padding: 1rem;
    border: 1px solid rgba(55, 65, 81, 0.85);
}

.activity-entry {
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: grid;
    grid-template-columns: 140px 100px 1fr auto;
    gap: 0.75rem;
    align-items: start;
}

.activity-entry:last-child {
    border-bottom: none;
}

.activity-time {
    color: #94a3b8;
}

.activity-action {
    font-weight: 600;
}

.activity-action.register { color: #4ade80; }
.activity-action.claim_system { color: #60a5fa; }
.activity-action.unlock_domain { color: #fbbf24; }
.activity-action.deposit_created { color: #a78bfa; }
.activity-action.deposit_approved { color: #34d399; }

.activity-details {
    color: #d1d5db;
    word-break: break-all;
}

.activity-ip {
    color: #6b7280;
    font-size: 0.7rem;
}

/* Billing Page Styles */
.billing-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem 1.5rem 2.5rem;
}

.billing-header {
    text-align: center;
    margin-bottom: 2rem;
}

.billing-header h1 {
    margin: 0 0 0.5rem;
    font-size: 1.75rem;
}

.billing-header p {
    color: #94a3b8;
    margin: 0;
}

.token-packages {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.token-package {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(8, 47, 73, 0.9));
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 0.75rem;
    padding: 1.25rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.token-package:hover {
    border-color: rgba(59, 130, 246, 0.7);
    transform: translateY(-2px);
}

.token-package.selected {
    border-color: rgba(34, 197, 94, 0.8);
    background: linear-gradient(135deg, rgba(15, 23, 42, 1), rgba(12, 74, 110, 0.98));
}

.token-package .package-tokens {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fbbf24;
}

.token-package .package-bonus {
    font-size: 0.75rem;
    color: #4ade80;
    margin-top: 0.25rem;
}

.token-package .package-price {
    font-size: 1.1rem;
    color: #e5e7eb;
    margin-top: 0.5rem;
}

.crypto-select {
    margin-bottom: 1.5rem;
}

.crypto-select h3 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
}

.crypto-options {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.crypto-option {
    padding: 0.5rem 1rem;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.crypto-option:hover {
    border-color: rgba(59, 130, 246, 0.5);
}

.crypto-option.selected {
    border-color: rgba(34, 197, 94, 0.8);
    background: rgba(34, 197, 94, 0.15);
}

.payment-address {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(55, 65, 81, 0.85);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.payment-address label {
    display: block;
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 0.5rem;
}

.payment-address .address {
    font-family: ui-monospace, monospace;
    font-size: 0.85rem;
    word-break: break-all;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0.35rem;
    user-select: all;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.9), rgba(29, 78, 216, 0.9));
    border: 1px solid rgba(59, 130, 246, 0.8);
    border-radius: 0.5rem;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 1), rgba(37, 99, 235, 1));
    transform: translateY(-1px);
}

.deposit-history {
    margin-top: 2rem;
}

.deposit-history h3 {
    margin: 0 0 1rem;
    font-size: 1rem;
}

/* ==========================================
   AUTH MODAL - REGISTRATION & LOGIN
   ========================================== */

.auth-modal-content {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 58, 138, 0.3));
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 30px rgba(59, 130, 246, 0.15);
    backdrop-filter: blur(12px);
    animation: panelSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transform-origin: top center;
}

@keyframes panelSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-modal-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #f1f5f9;
    flex: 1;
}

.auth-modal-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.auth-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #e5e7eb;
}

.auth-modal-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(147, 51, 234, 0.3));
    border-radius: 0.75rem;
    font-size: 1.25rem;
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.auth-field {
    margin-bottom: 1rem;
}

.auth-field:last-of-type {
    margin-bottom: 0;
}

.auth-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: #94a3b8;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.auth-token-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-token-wrapper input {
    width: 100%;
    padding: 0.75rem 1rem;
    padding-right: 3.5rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.85rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0.6rem;
    color: #4ade80;
    letter-spacing: 0.02em;
    transition: all 0.2s ease;
}

.auth-token-wrapper input:focus {
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    outline: none;
}

.auth-token-wrapper input::placeholder {
    color: rgba(148, 163, 184, 0.5);
    font-family: inherit;
}

.auth-copy-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 0.4rem;
    color: #60a5fa;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.auth-copy-btn:hover {
    background: rgba(59, 130, 246, 0.4);
    border-color: rgba(59, 130, 246, 0.7);
    transform: translateY(-50%) scale(1.05);
}

.auth-copy-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.auth-copy-btn.copied {
    background: rgba(34, 197, 94, 0.3);
    border-color: rgba(34, 197, 94, 0.6);
    color: #4ade80;
}

.auth-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0.6rem;
    color: #f1f5f9;
    transition: all 0.2s ease;
}

.auth-input:focus {
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    outline: none;
}

.auth-input::placeholder {
    color: rgba(148, 163, 184, 0.5);
}

.auth-confirm-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.auth-confirm-row input {
    flex: 1;
}

.auth-confirm-btn {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.8), rgba(22, 163, 74, 0.9));
    border: 1px solid rgba(34, 197, 94, 0.6);
    border-radius: 0.6rem;
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.auth-confirm-btn:hover {
    background: linear-gradient(135deg, rgba(34, 197, 94, 1), rgba(22, 163, 74, 1));
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.auth-confirm-btn:active {
    transform: translateY(0);
}

.auth-login-btn {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.8), rgba(37, 99, 235, 0.9));
    border: 1px solid rgba(59, 130, 246, 0.6);
    border-radius: 0.6rem;
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.auth-login-btn:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 1), rgba(37, 99, 235, 1));
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.auth-login-btn:active {
    transform: translateY(0);
}

.auth-generate-btn {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.8), rgba(126, 34, 206, 0.9));
    border: 1px solid rgba(147, 51, 234, 0.6);
    border-radius: 0.6rem;
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.auth-generate-btn:hover {
    background: linear-gradient(135deg, rgba(147, 51, 234, 1), rgba(126, 34, 206, 1));
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(147, 51, 234, 0.3);
}

.auth-generate-btn:active {
    transform: translateY(0);
}

.auth-warning-box {
    margin-top: 1.25rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.05));
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 0.75rem;
    animation: warningPulse 3s ease-in-out infinite;
}

@keyframes warningPulse {
    0%, 100% { border-color: rgba(239, 68, 68, 0.3); }
    50% { border-color: rgba(239, 68, 68, 0.6); }
}

.auth-warning-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #f87171;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.auth-warning-header .warning-icon {
    font-size: 1.1rem;
    animation: shake 0.5s ease-in-out infinite;
}

@keyframes shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

.auth-warning-text {
    color: #fca5a5;
    font-size: 0.85rem;
    line-height: 1.5;
}

.auth-warning-text strong {
    color: #f87171;
}

/* Randomness Generation Box (PuTTYGEN style) */
.auth-randomness-box {
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.6rem;
}

.auth-randomness-instruction {
    color: #94a3b8;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    text-align: center;
    line-height: 1.4;
}

.auth-randomness-progress-wrapper {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.auth-randomness-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
    border-radius: 4px;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.auth-randomness-area {
    width: 100%;
    height: 200px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0.5rem;
    position: relative;
    cursor: crosshair;
    overflow: hidden;
    touch-action: none;
}

.auth-randomness-area canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    position: absolute;
    top: 0;
    left: 0;
}

.auth-switch-link {
    margin-top: 1rem;
    text-align: center;
}

.auth-switch-link button {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.auth-switch-link button:hover {
    color: #60a5fa;
}

/* Copy toast notification */
.copy-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(34, 197, 94, 0.95);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    opacity: 0;
    pointer-events: none;
    z-index: 10001;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.copy-toast.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.copy-toast .toast-icon {
    margin-right: 0.5rem;
}

/* Telegram input wrapper with confirmation buttons */
.auth-telegram-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-telegram-wrapper input {
    padding-right: 6rem;
}

.auth-telegram-wrapper input:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.auth-telegram-confirm-btn,
.auth-telegram-cancel-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.4rem;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    z-index: 10;
}

.auth-telegram-confirm-btn {
    background: rgba(34, 197, 94, 0.3);
    border: 1px solid rgba(34, 197, 94, 0.6);
    color: #4ade80;
    margin-right: 2.5rem;
}

.auth-telegram-confirm-btn:hover {
    background: rgba(34, 197, 94, 0.5);
    border-color: rgba(34, 197, 94, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.auth-telegram-cancel-btn {
    background: rgba(239, 68, 68, 0.3);
    border: 1px solid rgba(239, 68, 68, 0.6);
    color: #f87171;
}

.auth-telegram-cancel-btn:hover {
    background: rgba(239, 68, 68, 0.5);
    border-color: rgba(239, 68, 68, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.auth-telegram-loading {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: translateY(-50%) rotate(0deg); }
    to { transform: translateY(-50%) rotate(360deg); }
}

@keyframes spinSimple {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.auth-loading-spinner {
    display: inline-block;
    animation: authSpinner 1s linear infinite;
    font-size: 1rem;
}

@keyframes authSpinner {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
