/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

#app {
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Page Header Structure (for other pages) */
.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 24px 20px 28px;
    border-radius: 0 0 24px 24px;
    margin: -20px -20px 20px -20px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.25);
}

.page-header .header-top {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 16px;
}

.page-header .nav-buttons {
    display: flex;
    gap: 10px;
}

.page-header .btn-icon {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 1rem;
}

.page-header .btn-icon:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.page-header .page-title {
    text-align: center;
}

.page-header .page-title h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.page-header .page-title p {
    font-size: 0.95rem;
    opacity: 0.85;
    margin: 0;
    font-weight: 400;
}

/* Page Content Structure */
.page-content {
    padding: 20px;
    background: linear-gradient(180deg, #f8f9fa 0%, #eef1f5 100%);
    border-radius: 24px 24px 0 0;
    margin: 0 -20px -20px -20px;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
    min-height: calc(100vh - 200px);
}

/* Screen Management */
.screen {
    display: none;
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;
}

.screen.active {
    display: block;
}

#login-screen {
    padding: 0;
}

/* Login Screen */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    color: white;
    position: relative;
    z-index: 2;
    box-sizing: border-box;
    padding: 40px 20px;
    overflow-y: auto;
}

.login-container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(135deg, rgba(40, 40, 40, 0.9) 0%, rgba(20, 20, 20, 0.9) 100%),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="matrix" patternUnits="userSpaceOnUse" width="60" height="60"><text x="30" y="35" text-anchor="middle" fill="%2300FF00" font-size="8" opacity="0.1">BarterCoin</text></pattern></defs><rect width="100" height="100" fill="url(%23matrix)"/></svg>');
    background-size: 60px 60px, cover;
    animation: backgroundMove 160s linear infinite;
    z-index: -2;
}

.login-container::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.12) 0%, transparent 50%);
    animation: lightMove 15s ease-in-out infinite;
    z-index: -1;
}

@keyframes backgroundMove {
    0% {
        background-position: 0% 0%, 0% 0%;
    }
    100% {
        background-position: 100% 0%, 100% 0%;
    }
}

@keyframes lightMove {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.logo {
    margin-bottom: 24px;
    text-align: center;
}

.logo i {
    font-size: 4rem;
    color: #ffd700;
    margin-bottom: 12px;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(255, 215, 0, 0.4));
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.logo .tagline {
    font-size: 1rem;
    opacity: 0.85;
    font-weight: 400;
    margin: 0;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 40px;
}

/* Hero Section */
.hero-section {
    margin-bottom: 28px;
    text-align: center;
}

.hero-text {
    font-size: 1.1rem;
    opacity: 0.9;
    line-height: 1.5;
    max-width: 320px;
    margin: 0 auto;
}

/* Connect Button Enhancement */
.btn-connect {
    padding: 16px 40px;
    font-size: 1.1rem;
    margin-bottom: 32px;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.35);
}

.btn-connect:hover {
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.5);
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 32px;
    max-width: 340px;
    width: 100%;
}

.feature-item {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.feature-item i {
    font-size: 1.5rem;
    color: #ffd700;
    margin-bottom: 8px;
    display: block;
}

.feature-item span {
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0.9;
}

/* About Section */
.about-section {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px 20px;
    margin-bottom: 24px;
    max-width: 360px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.about-section h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    text-align: center;
    color: #ffd700;
}

.about-section p {
    font-size: 0.9rem;
    line-height: 1.6;
    opacity: 0.85;
    text-align: center;
    margin: 0;
}

/* How It Works Section */
.how-it-works {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px 20px;
    margin-bottom: 24px;
    max-width: 360px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.how-it-works h3 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    text-align: center;
    color: #ffd700;
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 14px;
}

.step-number {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.step-text {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Help Note Link */
.help-note {
    font-size: 0.85rem;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.help-note a {
    color: #ffd700;
    text-decoration: none;
    font-weight: 500;
}

.help-note a:hover {
    text-decoration: underline;
}

.info {
    margin-top: 40px;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.info p {
    margin-bottom: 10px;
    font-weight: 500;
}

.info code {
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    word-break: break-all;
}

.help-dropdown {
    margin-top: 30px;
    text-align: center;
}

.help-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    padding: 12px 24px;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.help-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.help-toggle i {
    font-size: 1.1rem;
}

.help-content {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    margin-top: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 0;
    text-align: left;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.help-content.active {
    max-height: 300px;
    opacity: 1;
}

.help-content h3 {
    margin-bottom: 15px;
    font-size: 1.1rem;
    text-align: center;
    color: white;
}

.help-content ol {
    padding-left: 20px;
    color: white;
}

.help-content li {
    margin-bottom: 10px;
    line-height: 1.5;
}

.help-content p {
    color: white;
    margin-top: 15px;
    text-align: center;
}

/* Wallet Screen */
#wallet-screen {
    background: linear-gradient(180deg, #f8f9fa 0%, #eef1f5 100%);
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 24px 20px 28px;
    border-radius: 0 0 24px 24px;
    margin: -20px -20px 20px -20px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.25);
}

.header-top {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.nav-buttons {
    display: flex;
    gap: 10px;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 16px 20px;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.profile-pic {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.1);
    display: block;
}

.profile-pic:not([src]), .profile-pic[src=""] {
    display: none;
}

.user-details {
    text-align: center;
    width: 100%;
}

.username {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    text-align: center;
    width: 100%;
    display: block;
}

.address-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: monospace;
    font-size: 0.8rem;
    opacity: 0.9;
    background: rgba(255, 255, 255, 0.1);
    padding: 12px 15px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    margin-top: 15px;
}

#wallet-address {
    word-break: break-all;
    flex: 1;
    min-width: 0;
    text-align: center;
}

.copy-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 5px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.balance-section {
    text-align: center;
    padding-top: 4px;
}

.balance-section h2 {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.balance {
    font-size: 2.75rem;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: -1px;
}

.currency {
    font-size: 1rem;
    opacity: 0.75;
    font-weight: 500;
}

.wallet-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.address {
    font-family: monospace;
    font-size: 0.8rem;
    opacity: 0.9;
    word-break: break-all;
}

/* Action Buttons */
.actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.action-btn {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 18px 16px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-weight: 500;
    font-size: 0.9rem;
    color: #333;
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.18);
    border-color: rgba(102, 126, 234, 0.2);
}

.action-btn:active {
    transform: translateY(-1px);
}

.action-btn i {
    font-size: 1.4rem;
    color: #667eea;
    margin-bottom: 2px;
}

/* History Section */
.history-section {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.history-section h3 {
    margin-bottom: 16px;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
}

.transactions {
    min-height: 180px;
}

.empty-state {
    text-align: center;
    color: #9ca3af;
    padding: 40px 20px;
}

.empty-state i {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 0.4;
    color: #667eea;
}

.empty-state p {
    font-size: 0.95rem;
    margin: 0;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: #f0f2f5;
    color: #495057;
    border: 1px solid #e1e4e8;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    background: #e9ecef;
    border-color: #d1d5db;
}

.btn-icon {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(8px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.25s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 24px;
    width: 90%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eef0f2;
}

.modal-header h3 {
    font-size: 1.25rem;
    color: #333;
    font-weight: 600;
}

.close-btn {
    background: #f5f6f7;
    border: none;
    font-size: 1rem;
    color: #666;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: #eef0f2;
    color: #333;
}

/* Form Styles */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.modal .form-group label {
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.25s ease;
    background: #fafbfc;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input::placeholder {
    color: #9ca3af;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    justify-content: center;
}

.form-actions button {
    flex: 1;
}

/* Receive Modal */
.receive-content {
    text-align: center;
}

.qr-container {
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
}

#qr-code {
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.address-display {
    margin-bottom: 20px;
}

.address-display label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

.address-box {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 12px;
    font-family: monospace;
    font-size: 0.8rem;
    word-break: break-all;
    margin-bottom: 15px;
    color: #495057;
}

/* Loading Overlay */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
}

.loading-overlay.active {
    display: flex;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: white;
    color: #333;
    padding: 14px 18px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: toastSlideIn 0.3s ease;
    max-width: 320px;
    font-size: 0.95rem;
    font-weight: 500;
}

.toast.success {
    border-left: 4px solid #22c55e;
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.08) 0%, white 100%);
}

.toast.error {
    border-left: 4px solid #ef4444;
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.08) 0%, white 100%);
}

.toast.info {
    border-left: 4px solid #3b82f6;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.08) 0%, white 100%);
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Transaction Items */
.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #f0f2f4;
    transition: all 0.2s ease;
}

.transaction-item:hover {
    background-color: #fafbfc;
    margin: 0 -12px;
    padding: 14px 12px;
    border-radius: 10px;
}

.transaction-item:last-child {
    border-bottom: none;
}

.transaction-info {
    flex: 1;
}

.transaction-type {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.transaction-type.sent {
    color: #ef4444;
}

.transaction-type.received {
    color: #22c55e;
}

.transaction-address {
    font-size: 0.75rem;
    color: #6b7280;
    font-family: 'SF Mono', 'Consolas', monospace;
}

.transaction-amount {
    font-weight: 700;
    font-size: 1.05rem;
    color: #1f2937;
}

.transaction-date {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 4px;
}

/* Responsive Design */
@media (max-width: 480px) {
    .screen {
        padding: 15px;
    }
    
    #login-screen {
        padding: 0;
    }
    
    .login-container {
        padding: 32px 16px;
    }
    
    .logo i {
        font-size: 3rem;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .hero-text {
        font-size: 1rem;
    }
    
    .btn-connect {
        padding: 14px 32px;
        font-size: 1rem;
        width: 100%;
        max-width: 280px;
    }
    
    .features-grid {
        gap: 10px;
        max-width: 100%;
    }
    
    .feature-item {
        padding: 14px 10px;
    }
    
    .feature-item i {
        font-size: 1.3rem;
    }
    
    .feature-item span {
        font-size: 0.8rem;
    }
    
    .about-section,
    .how-it-works {
        padding: 20px 16px;
        max-width: 100%;
    }
    
    .about-section h3,
    .how-it-works h3 {
        font-size: 1rem;
    }
    
    .about-section p {
        font-size: 0.85rem;
    }
    
    .step-number {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }
    
    .step-text {
        font-size: 0.85rem;
    }
    
    .header {
        margin: -15px -15px 15px -15px;
        padding: 25px 15px;
    }
    
    .page-header {
        margin: -15px -15px 15px -15px;
        padding: 25px 15px;
    }
    
    .page-header .page-title h1 {
        font-size: 1.5rem;
    }
    
    .page-content {
        padding: 15px;
        margin: 0 -15px -15px -15px;
        max-height: calc(100vh - 180px);
    }
    
    .balance {
        font-size: 2.5rem;
    }
    
    .actions {
        gap: 10px;
    }
    
    .action-btn {
        padding: 15px;
    }
    
    .modal-content {
        width: 95%;
        padding: 20px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .setup-instructions {
        margin: 20px 10px 0 10px;
        padding: 15px;
    }
    
    .help-toggle {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .help-content {
        max-width: 100%;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(180deg, #0f0f1a 0%, #1a1a2e 100%);
    }
    
    #wallet-screen {
        background: linear-gradient(180deg, #1a1a2e 0%, #0f0f1a 100%);
    }
    
    .page-content {
        background: linear-gradient(180deg, #1a1a2e 0%, #0f0f1a 100%);
    }
    
    .history-section {
        background: #252538;
        color: white;
        border-color: #333348;
    }
    
    .history-section h3 {
        color: white;
    }
    
    .action-btn {
        background: #252538;
        color: white;
        border-color: #333348;
    }
    
    .action-btn:hover {
        background: #2d2d42;
        border-color: rgba(102, 126, 234, 0.3);
    }
    
    .modal-content {
        background: #252538;
        color: white;
    }
    
    .modal-header {
        border-color: #333348;
    }
    
    .close-btn {
        background: #333348;
        color: #9ca3af;
    }
    
    .close-btn:hover {
        background: #404058;
        color: white;
    }
    
    .form-group label {
        color: #e5e7eb;
    }
    
    .form-group input {
        background: #1a1a2e;
        color: white;
        border-color: #333348;
    }
    
    .form-group input:focus {
        background: #252538;
        border-color: #667eea;
    }
    
    .form-group input::placeholder {
        color: #6b7280;
    }
    
    .address-box {
        background: #1a1a2e;
        color: #e5e7eb;
        border-color: #333348;
    }
    
    .transaction-item {
        border-color: #333348;
    }
    
    .transaction-item:hover {
        background: #2d2d42;
    }
    
    .transaction-amount {
        color: #e5e7eb;
    }
    
    .transaction-address {
        color: #9ca3af;
    }
    
    .empty-state {
        color: #6b7280;
    }
    
    .btn-secondary {
        background: #333348;
        color: #e5e7eb;
        border-color: #404058;
    }
    
    .btn-secondary:hover {
        background: #404058;
        border-color: #4a4a68;
    }
    
    .toast {
        background: #252538;
        color: #e5e7eb;
    }
    
    .toast.success {
        background: linear-gradient(90deg, rgba(34, 197, 94, 0.15) 0%, #252538 100%);
    }
    
    .toast.error {
        background: linear-gradient(90deg, rgba(239, 68, 68, 0.15) 0%, #252538 100%);
    }
    
    .toast.info {
        background: linear-gradient(90deg, rgba(59, 130, 246, 0.15) 0%, #252538 100%);
    }
}

/* Floating Money Elements */
.floating-money {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.matrix-text {
    position: absolute;
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: bold;
    opacity: 0.6;
    animation: matrixFall 12s linear infinite;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
    max-width: 100vw;
    max-height: 100vh;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    white-space: nowrap;
}

.matrix-logo {
    position: absolute;
    opacity: 0.5;
    animation: matrixFall 12s linear infinite;
    filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.6));
    width: 60px;
    height: 60px;
    pointer-events: none;
}



@keyframes matrixFall {
    0% {
        transform: translateY(-50px) rotate(0deg);
        opacity: 0;
    }
    5% {
        opacity: 0.8;
    }
    95% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
}

/* Receive Page Styles */
.receive-page {
    max-width: 500px;
    margin: 0 auto;
    padding: 0;
}

.receive-content {
    max-width: 500px;
    margin: 0 auto;
}

.receive-page .qr-container {
    background: white;
    border-radius: 20px;
    padding: 32px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
}

.receive-page .qr-container canvas,
.receive-page .qr-container img {
    border-radius: 12px;
}

.address-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 24px 20px;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.25);
}

.address-section h3 {
    color: white;
    font-size: 1rem;
    margin-bottom: 14px;
    font-weight: 600;
}

.receive-page .address-box {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 14px 16px;
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 0.75rem;
    word-break: break-all;
    margin-bottom: 18px;
    color: #1f2937;
    border: none;
}

.receive-page .btn-primary {
    background: white;
    color: #667eea;
    border: none;
    padding: 14px 28px;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.receive-page .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.info-section {
    margin-top: 0;
}

.info-card {
    background: white;
    border-radius: 16px;
    padding: 24px 20px;
    text-align: center;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.info-card i {
    font-size: 1.75rem;
    color: #667eea;
    margin-bottom: 14px;
    display: block;
}

.info-card h4 {
    color: #1f2937;
    font-size: 1.05rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.info-card p {
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
    font-size: 0.9rem;
}

/* Mobile responsiveness for receive page */
@media (max-width: 480px) {
    .receive-page {
        padding: 0;
    }
    
    .receive-page .qr-container {
        padding: 24px;
    }
    
    .receive-page .qr-container canvas,
    .receive-page .qr-container img {
        max-width: 200px !important;
        max-height: 200px !important;
    }
    
    .address-section {
        padding: 20px 16px;
    }
    
    .receive-page .address-box {
        font-size: 0.7rem;
        padding: 12px 14px;
    }
    
    .info-card {
        padding: 20px 16px;
    }
}

/* Send Page Styles */
.send-page {
    max-width: 500px;
    margin: 0 auto;
    padding: 0;
}

.send-content {
    max-width: 500px;
    margin: 0 auto;
}

/* Step Management */
.step {
    display: none;
}

.step.active {
    display: block;
}

/* Address Input Section */
.address-input-section {
    background: white;
    border-radius: 16px;
    padding: 24px 20px;
    margin-bottom: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
}

.input-group {
    margin-bottom: 18px;
    text-align: left;
    width: 100%;
}

.input-group label {
    display: block;
    color: #374151;
    font-size: 0.9rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.address-input-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.address-input-container input {
    flex: 1;
    background: #fafbfc;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 0.9rem;
    color: #1f2937;
    transition: all 0.25s ease;
}

.address-input-container input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.paste-btn {
    background: #f0f2f5;
    border: 1px solid #e5e7eb;
    color: #4b5563;
    padding: 14px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 10px;
}

.paste-btn:hover {
    background: #e5e7eb;
    color: #1f2937;
}

.or-divider {
    margin: 20px 0;
    position: relative;
    text-align: center;
    width: 100%;
}

.or-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e5e7eb;
}

.or-divider span {
    background: white;
    color: #9ca3af;
    padding: 0 16px;
    font-size: 0.85rem;
    position: relative;
    z-index: 1;
    font-weight: 500;
}

/* Center the continue button */
#continue-address-btn {
    display: block;
    margin: 0 auto;
    min-width: 200px;
}

/* Amount Section */
.recipient-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 18px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.25);
}

.recipient-pic {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
}

.recipient-details {
    flex: 1;
}

.recipient-name {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.recipient-address {
    color: rgba(255, 255, 255, 0.75);
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 0.7rem;
    word-break: break-all;
}

.amount-section {
    background: white;
    border-radius: 16px;
    padding: 24px 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
}

.balance-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding: 14px 16px;
    background: #f8f9fc;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.balance-info span:first-child {
    color: #6b7280;
    font-size: 0.85rem;
    font-weight: 500;
}

.send-page .balance-amount {
    color: #1f2937;
    font-weight: 600;
    font-size: 1rem;
}

.amount-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.amount-input-container input {
    flex: 1;
    background: #fafbfc;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
    padding-right: 100px;
    font-size: 1.1rem;
    color: #1f2937;
    transition: all 0.25s ease;
}

.amount-input-container input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.send-page .currency-label {
    position: absolute;
    right: 16px;
    color: #9ca3af;
    font-size: 0.85rem;
    pointer-events: none;
    font-weight: 500;
}

.action-buttons {
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.action-buttons .btn-primary,
.action-buttons .btn-secondary {
    flex: 1;
}

/* QR Scanner Modal */
.scanner-content {
    padding: 16px;
}

.scanner-placeholder {
    text-align: center;
    padding: 32px 20px;
}

.scanner-placeholder i {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 14px;
    display: block;
}

.scanner-placeholder p {
    color: #6b7280;
    margin-bottom: 18px;
    font-size: 0.9rem;
}

#qr-reader {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
}

/* Confirmation Modal */
.confirmation-content {
    padding: 8px;
}

.transaction-details {
    background: #f8f9fc;
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eef0f2;
}

.detail-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.detail-row:first-child {
    padding-top: 0;
}

.detail-row span:first-child {
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.detail-row span:last-child {
    color: #1f2937;
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 0.85rem;
    text-align: right;
    max-width: 60%;
    word-break: break-all;
}

.confirmation-actions {
    display: flex;
    gap: 12px;
}

.confirmation-actions .btn-primary,
.confirmation-actions .btn-secondary {
    flex: 1;
}

/* Mobile responsiveness for send page */
@media (max-width: 480px) {
    .send-page {
        padding: 0;
    }
    
    .address-input-section,
    .amount-section {
        padding: 20px 16px;
    }
    
    .address-input-container input {
        font-size: 0.85rem;
        padding: 12px 14px;
    }
    
    .recipient-info {
        padding: 16px;
    }
    
    .recipient-pic {
        width: 46px;
        height: 46px;
    }
    
    .recipient-name {
        font-size: 1rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .confirmation-actions {
        flex-direction: column;
    }
}

/* Top Holders Page Styles */
.top-holders-page {
    max-width: 700px;
    margin: 0 auto;
    padding: 0;
}

.holders-content {
    max-width: 700px;
    margin: 0 auto;
}

.stats-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 2px;
    letter-spacing: -0.5px;
}

.stat-label {
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 500;
}

.holders-list-container {
    background: white;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 14px;
}

.list-header h3 {
    color: #1f2937;
    font-size: 1.15rem;
    margin: 0;
    font-weight: 600;
}

.search-container {
    position: relative;
    flex: 1;
    max-width: 280px;
}

.search-container input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #fafbfc;
    font-size: 0.9rem;
    color: #1f2937;
    transition: all 0.25s ease;
}

.search-container input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-container i {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

.holders-list {
    max-height: 500px;
    overflow-y: auto;
}

.holder-item {
    display: flex;
    align-items: center;
    padding: 14px;
    background: #fafbfc;
    border-radius: 14px;
    margin-bottom: 10px;
    border: 1px solid #e5e7eb;
    transition: all 0.25s ease;
}

.holder-item:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: rgba(102, 126, 234, 0.2);
}

.holder-item:last-child {
    margin-bottom: 0;
}

.holder-rank {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #fbbf24, #fcd34d);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #78350f;
    font-size: 0.9rem;
    margin-right: 14px;
    flex-shrink: 0;
}

.holder-item:nth-child(1) .holder-rank {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.holder-item:nth-child(2) .holder-rank {
    background: linear-gradient(135deg, #d1d5db, #9ca3af);
    color: #374151;
}

.holder-item:nth-child(3) .holder-rank {
    background: linear-gradient(135deg, #d97706, #b45309);
    color: white;
}

.holder-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    gap: 16px;
}

.holder-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.holder-pic {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e5e7eb;
}

.holder-details {
    flex: 1;
}

.holder-name {
    color: #1f2937;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 3px;
}

.holder-address {
    color: #6b7280;
    font-size: 0.75rem;
    font-family: 'SF Mono', 'Consolas', monospace;
}

.holder-balance {
    text-align: right;
    flex-shrink: 0;
}

.top-holders-page .balance-amount {
    color: #1f2937;
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 2px;
}

.balance-label {
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 500;
}

.loading-state {
    text-align: center;
    padding: 40px;
    color: #4b5563;
    background: #fafbfc;
    border-radius: 14px;
    margin: 20px 0;
    border: 1px solid #e5e7eb;
}

.loading-state .spinner {
    margin: 0 auto 16px;
    border-color: rgba(102, 126, 234, 0.2);
    border-top-color: #667eea;
}

.loading-state p {
    margin: 0;
    font-size: 0.95rem;
}

.error-state {
    text-align: center;
    padding: 40px;
    color: #4b5563;
    background: #fef2f2;
    border-radius: 14px;
    margin: 20px 0;
    border: 1px solid #fecaca;
}

.error-state i {
    font-size: 2.5rem;
    color: #ef4444;
    margin-bottom: 16px;
}

.error-state p {
    margin: 0 0 16px 0;
    font-size: 0.95rem;
    color: #991b1b;
}

/* Mobile responsiveness for top holders page */
@media (max-width: 480px) {
    .top-holders-page {
        padding: 0;
    }
    
    .stats-section {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-icon {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }
    
    .stat-value {
        font-size: 1.3rem;
    }
    
    .holders-list-container {
        padding: 16px;
    }
    
    .list-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-container {
        max-width: none;
    }
    
    .holder-item {
        padding: 12px;
    }
    
    .holder-rank {
        width: 38px;
        height: 38px;
        font-size: 0.8rem;
        margin-right: 12px;
    }
    
    .holder-pic {
        width: 34px;
        height: 34px;
    }
    
    .holder-name {
        font-size: 0.9rem;
    }
    
    .holder-address {
        font-size: 0.65rem;
    }
    
    .top-holders-page .balance-amount {
        font-size: 0.95rem;
    }
}

/* Buy Page Styles */
.buy-page {
    max-width: 500px;
    margin: 0 auto;
    padding: 0;
}

.buy-page .balance-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 24px 20px;
    margin-bottom: 20px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.25);
}

.buy-page .balance-section h2 {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.usdc-balance {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
    letter-spacing: -1px;
}

.buy-page .currency-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-weight: 500;
}

.buy-section {
    background: white;
    border-radius: 16px;
    padding: 24px 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
}

.buy-section h2 {
    color: #1f2937;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
}

.buy-section .form-group label {
    color: #374151;
}

.total-cost-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fc;
    border-radius: 10px;
    padding: 12px 16px;
    margin: 16px 0;
    border: 1px solid #e5e7eb;
}

.total-cost-display span:first-child {
    color: #6b7280;
    font-size: 0.9rem;
}

.total-cost-display #total-cost {
    font-size: 1.1rem;
    font-weight: 600;
    color: #667eea;
}

.price-info {
    background: #f8f9fc;
    border-radius: 12px;
    padding: 14px 16px;
    margin: 16px 0;
    text-align: center;
    border: 1px solid #e5e7eb;
}

.price-info p {
    color: #6b7280;
    margin: 4px 0;
    font-size: 0.9rem;
}

.price-info .rate {
    font-size: 1.1rem;
    font-weight: 600;
    color: #667eea;
}

.topup-section {
    background: white;
    border-radius: 16px;
    padding: 24px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
}

.topup-section h2 {
    color: #1f2937;
    margin-bottom: 16px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
}

.topup-content {
    text-align: center;
    color: #4b5563;
}

.topup-content p {
    margin-bottom: 16px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.topup-content ul {
    text-align: left;
    display: inline-block;
    margin: 16px 0;
}

.topup-content li {
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.topup-section .address-box {
    background: #f8f9fc;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px;
    font-family: 'SF Mono', 'Consolas', monospace;
    font-size: 0.8rem;
    word-break: break-all;
    margin-bottom: 16px;
    color: #374151;
}

.coming-soon {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
    text-align: center;
}

.coming-soon p {
    color: #b45309;
    margin: 0;
    font-weight: 600;
    font-size: 0.9rem;
}

@media (max-width: 480px) {
    .buy-page {
        padding: 0;
    }
    
    .usdc-balance {
        font-size: 2rem;
    }
    
    .buy-section,
    .topup-section {
        padding: 20px 16px;
    }
}

/* FAQ Page Styles */
.faq-page {
    max-width: 700px;
    margin: 0 auto;
    padding: 0;
}

.faq-content {
    padding: 8px 0;
}

.faq-section {
    margin-bottom: 32px;
}

.faq-section h2 {
    color: #1f2937;
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.faq-section h2 i {
    color: #667eea;
    font-size: 1.1rem;
}

.faq-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    margin-bottom: 12px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    transition: all 0.25s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.faq-question {
    background: #fafbfc;
    padding: 16px 18px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 0.95rem;
    color: #374151;
    transition: all 0.25s ease;
    gap: 12px;
}

.faq-question:hover {
    background: #f3f4f6;
}

.faq-question.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.faq-answer {
    padding: 0 18px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
}

.faq-answer.active {
    padding: 18px;
    max-height: 600px;
}

.faq-answer p {
    margin: 0 0 14px 0;
    line-height: 1.65;
    color: #4b5563;
    font-size: 0.9rem;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

.faq-answer ul, .faq-answer ol {
    margin: 12px 0;
    padding-left: 20px;
    color: #4b5563;
}

.faq-answer li {
    margin-bottom: 8px;
    line-height: 1.6;
    font-size: 0.9rem;
}

.faq-toggle {
    font-size: 0.85rem;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.faq-question.active .faq-toggle {
    transform: rotate(180deg);
}

@media (max-width: 480px) {
    .faq-page {
        padding: 0;
    }
    
    .faq-section h2 {
        font-size: 1.05rem;
    }
    
    .faq-question {
        padding: 14px 16px;
        font-size: 0.9rem;
    }
    
    .faq-answer.active {
        padding: 16px;
    }
    
    .faq-answer p,
    .faq-answer li {
        font-size: 0.85rem;
    }
}

/* Callback Page Styles */
.callback-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.callback-container {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 500px;
    color: white;
}

.callback-container h1 {
    margin-bottom: 10px;
    font-size: 24px;
}

.callback-container p {
    margin-bottom: 20px;
    opacity: 0.9;
    line-height: 1.5;
}

.callback-container .spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.callback-container .error {
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid rgba(220, 53, 69, 0.5);
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
}

.callback-container .success {
    background: rgba(40, 167, 69, 0.2);
    border: 1px solid rgba(40, 167, 69, 0.5);
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
}

.callback-container .btn {
    background: white;
    color: #667eea;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    margin: 10px;
    transition: all 0.3s ease;
}

.callback-container .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

@media (max-width: 480px) {
    .callback-container {
        padding: 20px;
        margin: 10px;
    }
    
    .callback-container h1 {
        font-size: 20px;
    }
}

/* Wallet Status Display on Login Screen */
.wallet-connected {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.status-indicator.connected {
    background: #28a745;
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.5);
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 20px;
    background: rgba(220, 53, 69, 0.8);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-small:hover {
    background: rgba(220, 53, 69, 1);
    transform: translateY(-1px);
}

/* Success Page Styles */
.success-page {
    max-width: 500px;
    margin: 0 auto;
    padding: 0;
}

.success-container {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 48px 32px;
    border-radius: 20px;
    color: white;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.success-icon {
    font-size: 3.5rem;
    color: #22c55e;
    margin-bottom: 20px;
    animation: successPulse 2s ease-in-out infinite;
    display: block;
}

@keyframes successPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.08);
        opacity: 0.9;
    }
}

.success-container h1 {
    font-size: 1.75rem;
    margin-bottom: 14px;
    font-weight: 700;
}

.success-container p {
    font-size: 1rem;
    margin-bottom: 8px;
    opacity: 0.9;
    line-height: 1.6;
}

/* Mobile responsiveness for success page */
@media (max-width: 480px) {
    .success-page {
        padding: 0;
    }
    
    .success-container {
        padding: 40px 24px;
    }
    
    .success-icon {
        font-size: 3rem;
    }
    
    .success-container h1 {
        font-size: 1.5rem;
    }
    
    .success-container p {
        font-size: 0.95rem;
    }
} 