/* Flash USDT Wallet - Dark Theme */
:root {
    --bg-primary: #0a0a1a;
    --bg-secondary: #13132a;
    --bg-card: #1a1a2e;
    --bg-card-hover: #23233a;
    --accent-primary: #00d4ff;
    --accent-secondary: #00ff88;
    --accent-danger: #ff4757;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #707080;
    --border-color: #2a2a4a;
    --border-radius: 16px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --warning-color: #ffa502;
    --danger-color: #ff4757;
    --success-color: #00ff88;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    background: linear-gradient(160deg, #0a0a1a 0%, #13132a 100%);
}

#app {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.wallet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo i {
    color: var(--accent-primary);
    font-size: 2rem;
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.5));
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.network-badge {
    background: var(--accent-primary);
    color: var(--bg-primary);
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.card h2, .card h3 {
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.2rem;
}

.card h3 {
    font-size: 1.1rem;
}

/* Wallet Connect Section */
.wallet-connect-section {
    text-align: center;
    padding: 48px 24px;
}

.connect-prompt i {
    font-size: 4rem;
    color: var(--accent-primary);
    margin-bottom: 16px;
    opacity: 0.7;
}

.wallet-connected {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wallet-address {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wallet-address span {
    font-family: 'Courier New', monospace;
    font-weight: 500;
}

.wallet-balance-info span {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-secondary);
}

.btn-copy {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.btn-copy:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

/* Network Section */
.network-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.network-btn {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    color: var(--text-primary);
}

.network-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
}

.network-btn.active {
    background: var(--accent-primary);
    color: var(--bg-primary);
    border-color: var(--accent-primary);
}

.network-btn i {
    font-size: 1.8rem;
    margin-bottom: 8px;
    display: block;
}

.network-btn span {
    display: block;
    font-weight: 600;
    font-size: 1.1rem;
}

.network-btn small {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Dashboard */
.dashboard-section {
    display: none;
}

.balance-card {
    text-align: center;
    padding: 32px 24px;
}

.balance-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.balance-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.balance-divider {
    width: 100%;
    height: 1px;
    background: var(--border-color);
    margin: 20px 0;
}

.flash-balance {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

.flash-amount {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-secondary);
}

.valid-balance {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* Flash Mint Card */
.flash-mint-card h3 {
    color: var(--accent-primary);
}

.mint-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-input {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 1rem;
    color: var(--text-primary);
    transition: border-color 0.3s;
    width: 100%;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.form-select {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 1rem;
    color: var(--text-primary);
    cursor: pointer;
}

.form-select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

/* Token Details */
.token-details {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-item label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-item span {
    color: var(--text-primary);
    font-weight: 500;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    width: fit-content;
}

.status-active { background: rgba(0, 255, 136, 0.15); color: var(--success-color); }
.status-pending { background: rgba(255, 165, 2, 0.15); color: var(--warning-color); }
.status-minted { background: rgba(0, 212, 255, 0.15); color: var(--accent-primary); }
.status-expired { background: rgba(255, 71, 87, 0.15); color: var(--danger-color); }
.status-simulated { background: rgba(255, 165, 2, 0.15); color: var(--warning-color); }

.mint-id, .tx-hash {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    word-break: break-all;
}

/* Actions Section */
.actions-section {
    margin-top: 24px;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
}

.btn {
    border: none;
    border-radius: 12px;
    padding: 16px 24px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.btn-lg { padding: 18px 32px; font-size: 1.1rem; }

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: var(--bg-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 212, 255, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #00cc70);
    color: var(--bg-primary);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 255, 136, 0.3);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover { background: var(--bg-card-hover); }

.btn-action {
    flex-direction: column;
    padding: 20px 16px;
    height: 120px;
}

.btn-swap { background: var(--accent-primary); color: var(--bg-primary); }
.btn-swap:hover { box-shadow: 0 8px 24px rgba(0, 212, 255, 0.3); }

.btn-transfer { background: var(--accent-secondary); color: var(--bg-primary); }
.btn-transfer:hover { box-shadow: 0 8px 24px rgba(0, 255, 136, 0.3); }

.btn-trade { background: #9d4edd; color: var(--text-primary); }
.btn-trade:hover { box-shadow: 0 8px 24px rgba(157, 78, 221, 0.3); }

.btn-burn { background: var(--danger-color); color: #fff; }
.btn-burn:hover { box-shadow: 0 8px 24px rgba(255, 71, 87, 0.3); }

/* Partners Section */
.partners-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.partner-group h3 { font-size: 1rem; margin-bottom: 12px; }

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Wallets Section */
.wallets-section {
    text-align: center;
}

.wallets-section h3 {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 16px;
}

.wallet-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.wallet-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-secondary);
    padding: 10px 20px;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.wallet-logo i {
    color: var(--accent-primary);
}

/* Footer */
.wallet-footer {
    text-align: center;
    padding: 24px 0;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.validity-timer {
    display: none;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    color: var(--accent-warning);
    font-weight: 500;
}

.validity-timer i { color: var(--warning-color); }

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.show, .modal[style*="flex"] {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.btn-close {
    background: transparent;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.btn-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.modal-body { padding: 24px; }

.modal-footer {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
}

.swap-form .form-group,
.transfer-form .form-group,
.trade-form .form-group {
    margin-bottom: 16px;
}

.swap-result {
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 16px;
    margin-top: 16px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.balance-check {
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 12px;
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 24px;
    border-radius: 12px;
    font-weight: 500;
    z-index: 2000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.toast-info { background: rgba(0, 212, 255, 0.15); color: var(--accent-primary); }
.toast-success { background: rgba(0, 255, 136, 0.15); color: var(--success-color); }
.toast-error { background: rgba(255, 71, 87, 0.15); color: var(--danger-color); }

/* Wallet List in Guide */
.wallet-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 24px 0;
}

.wallet-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: 10px;
    color: var(--text-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
    .action-grid { grid-template-columns: repeat(2, 1fr); }
    .wallet-header { flex-direction: column; gap: 12px; }
    .modal { width: 100%; height: 100%; }
    .modal-content { width: 100%; max-width: 100%; border-radius: 0; }
}

@media (max-width: 480px) {
    .action-grid { grid-template-columns: 1fr; }
    .network-grid { grid-template-columns: 1fr; }
    #app { padding: 10px; }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}
