:root {
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --card-border: rgba(255, 255, 255, 0.1);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-usdt: #26A17B;
    --accent-tron: #FF060A;
    --glow: rgba(38, 161, 123, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: transparent; /* Ideal for iframe */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    color: var(--text-primary);
}

/* Glassmorphism Card */
.card-container {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 32px 24px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 
                inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.6s ease-out;
}

/* Subtle background glow */
.card-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at top right, var(--glow) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Header */
.header {
    text-align: center;
    position: relative;
    z-index: 1;
    margin-bottom: 24px;
}



.logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.logo {
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
    animation: float 3s ease-in-out infinite alternate;
}

.tether-logo { animation-delay: 0s; }
.tron-logo { animation-delay: 1.5s; width: 36px; height: 36px; }

h2 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.network-badge {
    display: inline-block;
    background: rgba(38, 161, 123, 0.15);
    color: var(--accent-usdt);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 1px solid rgba(38, 161, 123, 0.2);
}

/* QR Code */
.qr-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 32px;
    position: relative;
    z-index: 1;
}

.qr-wrapper {
    background: #ffffff;
    padding: 12px;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    position: relative;
    transition: transform 0.3s ease;
}

.qr-wrapper:hover {
    transform: translateY(-2px);
}

#qrcode {
    min-width: 180px;
    min-height: 180px;
}

#qrcode img {
    border-radius: 8px;
    display: block;
}

.qr-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.9);
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s;
}

.spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(38, 161, 123, 0.3);
    border-radius: 50%;
    border-top-color: var(--accent-usdt);
    animation: spin 1s ease-in-out infinite;
}

.scan-text {
    margin-top: 16px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Address Input */
.address-section {
    position: relative;
    z-index: 1;
    margin-bottom: 28px;
}

label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.address-box {
    display: flex;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 4px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.address-box:focus-within {
    border-color: rgba(38, 161, 123, 0.5);
    box-shadow: 0 0 0 3px rgba(38, 161, 123, 0.15);
}

input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 12px 16px;
    font-size: 0.875rem;
    font-family: monospace;
    outline: none;
    width: 100%;
}

.copy-btn {
    background: var(--accent-usdt);
    color: white;
    border: none;
    border-radius: 8px;
    width: 44px;
    height: 44px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: #1e8565;
    transform: scale(1.05);
}

.copy-btn:active {
    transform: scale(0.95);
}

.toast {
    position: absolute;
    top: -40px;
    right: 0;
    background: var(--accent-usdt);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Activity Section */
.activity-section {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--card-border);
    padding-top: 24px;
}

.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--accent-usdt);
    font-weight: 600;
}

.pulse {
    width: 6px;
    height: 6px;
    background: var(--accent-usdt);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.transactions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 150px;
    overflow-y: auto;
    padding-right: 4px;
}

/* Custom Scrollbar for list */
.transactions-list::-webkit-scrollbar {
    width: 4px;
}
.transactions-list::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.02);
}
.transactions-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
}

.tx-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    padding: 10px 12px;
    animation: slideIn 0.3s ease-out;
}

.tx-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tx-icon {
    width: 28px;
    height: 28px;
    background: rgba(38, 161, 123, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-usdt);
}

.tx-details {
    display: flex;
    flex-direction: column;
}

.tx-address {
    font-size: 0.75rem;
    font-family: monospace;
    color: var(--text-primary);
    font-weight: 500;
}

.tx-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

.tx-time {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.tx-msg {
    font-size: 0.7rem;
    color: var(--accent-usdt);
    font-style: italic;
    opacity: 0.9;
}

.tx-amount {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent-usdt);
    text-align: right;
}

.tx-currency {
    font-size: 0.65rem;
    opacity: 0.8;
}

.tx-empty, .tx-loading {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
    padding: 20px 0;
}

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

@keyframes float {
    from { transform: translateY(0px); }
    to { transform: translateY(-8px); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(38, 161, 123, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(38, 161, 123, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(38, 161, 123, 0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}
