/* ===== CSS Variables & Reset ===== */
:root {
    --bg-primary: #0a0b0f;
    --bg-secondary: #12131a;
    --bg-card: rgba(20, 22, 30, 0.8);
    --bg-card-hover: rgba(30, 32, 45, 0.9);
    
    --text-primary: #ffffff;
    --text-secondary: #a0a3b1;
    --text-muted: #6b6e7a;
    
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-gradient: #6366f1;
    
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(99, 102, 241, 0.3);
    
    --shadow-sm: none;
    --shadow-md: none;
    --shadow-lg: none;
    --shadow-glow: none;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Effects */
/* Background Effects - Removed */
body::before {
    content: none;
}

/* ===== Layout ===== */
.app-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== Header ===== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 2rem;
    /* filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.5)); */
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.network-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.network-badge:hover {
    border-color: var(--border-glow);
    background: var(--bg-card-hover);
}

.network-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--danger);
    animation: pulse 2s infinite;
}

.network-badge.connected .network-dot {
    background: var(--success);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ===== Main Content ===== */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ===== Cards ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.card:hover {
    border-color: var(--border-glow);
    /* box-shadow: var(--shadow-glow); */
}

.step-card {
    padding: 30px;
}

.card-content {
    text-align: center;
    padding: 20px 0;
}

.card-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.card-content p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* ===== Step Indicator ===== */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 30px;
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    color: var(--text-muted);
    transition: all var(--transition-normal);
}

.step-number.active {
    background: var(--accent-gradient);
    border-color: transparent;
    color: white;
    /* box-shadow: 0 0 20px rgba(99, 102, 241, 0.4); */
}

.step-number.completed {
    background: var(--success);
    border-color: transparent;
    color: white;
}

.step-line {
    width: 40px;
    height: 2px;
    background: var(--border-color);
    transition: all var(--transition-normal);
}

.step-line.completed {
    background: var(--success);
}

/* ===== Icons ===== */
.icon-large {
    font-size: 4rem;
    margin-bottom: 20px;
    /* filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.3)); */
}

.success-icon {
    animation: bounce 1s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.btn::before {
    display: none;
}

.btn:hover::before {
    display: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    /* box-shadow: var(--shadow-lg), 0 0 30px rgba(99, 102, 241, 0.4); */
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-glow);
}

.btn-danger {
    background: #ef4444;
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(239, 68, 68, 0.4);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn-large {
    padding: 18px 36px;
    font-size: 1.125rem;
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn-icon {
    font-size: 1.25rem;
}

/* ===== Wallet Info ===== */
.wallet-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-top: 20px;
}

.wallet-address {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wallet-address .label {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.wallet-address .address {
    font-family: monospace;
    color: var(--accent-primary);
    font-weight: 500;
}

/* ===== Progress Bar ===== */
.scan-progress {
    margin-top: 24px;
}

.progress-bar {
    height: 8px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--accent-gradient);
    border-radius: var(--radius-sm);
    transition: width var(--transition-normal);
}

.progress-text {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 12px;
}

/* ===== Modal ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.modal-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.modal-description {
    font-size: 0.875rem;
    color: var(--text-muted) !important;
    margin-bottom: 24px !important;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* ===== Token List ===== */
.token-list {
    max-height: 400px;
    overflow-y: auto;
    margin: 20px 0;
}

.token-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    border: 1px solid transparent;
    transition: all var(--transition-fast);
}

.token-item:hover {
    border-color: var(--border-glow);
}

.token-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.token-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.token-details h4 {
    font-weight: 600;
    font-size: 1rem;
}

.token-details p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 0;
}

.token-balance {
    text-align: right;
}

.token-balance .amount {
    font-weight: 600;
    font-size: 1rem;
}

.token-balance .value {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.token-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 16px;
}

.status-badge {
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.pending {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.status-badge.approved {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.status-badge.failed {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.approval-actions {
    text-align: center;
    margin-top: 20px;
}

.approval-status {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 12px;
}

/* ===== Transfer Form ===== */
.transfer-form {
    margin-top: 20px;
}

.input-group {
    margin-bottom: 24px;
}

.input-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.input-field {
    width: 100%;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: monospace;
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.input-field:focus {
    outline: none;
    border-color: var(--accent-primary);
    /* box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2); */
}

.input-field::placeholder {
    color: var(--text-muted);
}

.input-hint {
    display: block;
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--warning);
}

/* ===== Transfer Summary ===== */
.transfer-summary {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 20px;
    margin-bottom: 24px;
}

.transfer-summary h4 {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.summary-list {
    max-height: 200px;
    overflow-y: auto;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item .token-name {
    font-weight: 500;
}

.summary-item .token-amount {
    color: var(--text-secondary);
    font-family: monospace;
}

/* ===== Success Section ===== */
.success-card {
    background: var(--bg-card);
    border: 1px solid var(--success);
}

.tx-links {
    margin-top: 20px;
}

.tx-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 0.875rem;
    margin: 4px;
    transition: all var(--transition-fast);
}

.tx-link:hover {
    background: var(--bg-card-hover);
}

/* ===== Toast Notifications ===== */
.status-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1001;
    animation: toastSlideIn 0.3s ease;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.toast-icon {
    font-size: 1.25rem;
}

.toast-message {
    color: var(--text-primary);
    font-size: 0.9rem;
}

/* ===== Footer ===== */
.footer {
    text-align: center;
    padding: 30px 0;
    margin-top: auto;
}

.footer p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ===== Utility Classes ===== */
.hidden {
    display: none !important;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-secondary);
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
    .app-container {
        padding: 16px;
    }
    
    .header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .step-card {
        padding: 20px;
    }
    
    .step-line {
        width: 24px;
    }
    
    .modal-content {
        padding: 24px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .token-item {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .token-status {
        width: 100%;
        justify-content: flex-end;
        margin-left: 0;
    }
}

/* ===== Loading Spinner ===== */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== Password Input ===== */
.password-input-wrapper {
    position: relative;
    width: 100%;
}

.btn-icon-inside {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 4px;
    transition: color 0.2s;
}

.btn-icon-inside:hover {
    color: var(--text-primary);
}

/* ===== Claim Section ===== */
.claim-summary {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 24px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.claim-summary p {
    margin-bottom: 8px;
    color: var(--text-secondary);
}

#claimWalletAddress {
    font-family: monospace;
    color: var(--accent-primary);
    font-weight: 500;
}

.claim-progress {
    margin-top: 24px;
}

/* ===== Blue Button (Info/Update) ===== */
.btn-blue {
    background: #3b82f6;
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-blue:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(59, 130, 246, 0.4);
}
