/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    color: #333333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
}

/* Header styles */
.header {
    margin-bottom: 3rem;
    color: #333333;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.logo svg {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.wallet-info-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #f8f9fa;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

.wallet-summary {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.wallet-address {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #333333;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

.wallet-balance {
    font-size: 0.75rem;
    color: #666666;
    font-weight: 500;
}

.copy-btn-small {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.125rem;
    border-radius: 4px;
    color: #666666;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-btn-small:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333333;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-family: 'Google Sans Code', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #007bff;
}

.subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.9;
}



/* Main content */
.main {
    background: #ffffff;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid #e0e0e0;
}

/* Wallet section */
.wallet-section {
    margin-bottom: 3rem;
}

.wallet-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.status-indicator.connected {
    background: #28a745;
    box-shadow: 0 0 0 4px rgba(40, 167, 69, 0.2);
}

.status-indicator.disconnected {
    background: #dc3545;
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.2);
}

.status-indicator.connecting {
    background: #ffc107;
    box-shadow: 0 0 0 4px rgba(255, 193, 7, 0.2);
    animation: pulse 1.5s infinite;
}

.status-indicator.error {
    background: #dc3545;
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.2);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

#statusText {
    font-weight: 500;
    color: #333333;
}

/* Wallet info */
.wallet-info {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid #e0e0e0;
}

.account-info > div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.account-info > div:last-child {
    margin-bottom: 0;
}

.label {
    font-weight: 600;
    color: #333333;
    min-width: 80px;
}

.address {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background: #f8f9fa;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #333333;
    flex: 1;
    border: 1px solid #e0e0e0;
}

.balance, .network {
    font-weight: 500;
    color: #333333;
}

.copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    color: #666666;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333333;
}

/* Buttons */
.wallet-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.6);
}

.btn-secondary {
    background: #6c757d;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.4);
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.6);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-icon {
    width: 20px;
    height: 20px;
}

/* Wallet options */
.wallet-options {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid #e0e0e0;
}

.wallet-options h3 {
    margin-bottom: 1rem;
    color: #333333;
    font-size: 1.1rem;
}

.wallet-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.wallet-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #333333;
}

.wallet-btn:hover {
    border-color: #007bff;
    background: rgba(0, 123, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.2);
}

.wallet-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

/* Staking section */
.staking-section {
    margin-top: 3rem;
}

.staking-section h2 {
    text-align: center;
    margin-bottom: 0.5rem;
    color: #333333;
    font-size: 1.8rem;
    font-family: 'Google Sans Code', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.staking-subtitle {
    text-align: center;
    color: #666666;
    margin-bottom: 2rem;
    font-size: 1rem;
}

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

.staking-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.staking-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #007bff;
}

.staking-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}

.staking-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.token-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.crypto-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.token-info h3 {
    margin: 0 0 0.25rem 0;
    color: #333333;
    font-size: 1.1rem;
    font-weight: 600;
}

.token-name {
    margin: 0;
    color: #666666;
    font-size: 0.875rem;
    font-weight: 400;
}

.staking-details {
    margin-bottom: 1.5rem;
}

.apr-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(0, 123, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(0, 123, 255, 0.2);
}

.apr-label {
    color: #333333;
    font-size: 0.875rem;
    font-weight: 500;
}

.apr-value {
    color: #007bff;
    font-size: 1.25rem;
    font-weight: 700;
}

.staking-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-label {
    color: #666666;
    font-size: 0.75rem;
    font-weight: 500;
}

.stat-value {
    color: #333333;
    font-size: 0.875rem;
    font-weight: 600;
}

.stake-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.stake-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.4);
}

.stake-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Staking modal form */
.staking-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: #333333;
    font-size: 0.9rem;
}

.form-group input {
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #ffffff;
    color: #333333;
}

.form-group input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-group small {
    color: #666666;
    font-size: 0.8rem;
}

.apr-display, .return-display {
    padding: 0.75rem;
    background: rgba(0, 123, 255, 0.1);
    border: 1px solid rgba(0, 123, 255, 0.2);
    border-radius: 8px;
    color: #007bff;
    font-weight: 700;
    font-size: 1.1rem;
    text-align: center;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: #ffffff;
    border-radius: 20px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease;
    border: 1px solid #e0e0e0;
}

@keyframes modalSlideIn {
    from {
        
        transform: translateY(-20px);
    }
    to {
        
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e9ecef;
}

.modal-header h3 {
    color: #333333;
    font-size: 1.3rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666666;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333333;
}

.modal-body {
    padding: 2rem;
}

.wallet-options-simple {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.wallet-btn-simple {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    font-weight: 500;
    color: #333333;
    width: 100%;
}

.wallet-btn-simple:hover {
    border-color: #007bff;
    background: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.wallet-btn-simple .wallet-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .header-content {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
        justify-content: space-between;
    }
    
    .header-left {
        flex-shrink: 0;
    }
    
    .header-right {
        flex: 1;
        justify-content: flex-end;
        min-width: 0;
    }
    
    .wallet-info-header {
        flex-direction: row;
        gap: 0.5rem;
        padding: 0.5rem;
        align-items: center;
        min-width: 0;
    }
    
    .wallet-summary {
        text-align: left;
        min-width: 0;
        flex: 1;
    }
    
    .wallet-address {
        font-size: 0.8rem;
    }
    
    .wallet-balance {
        font-size: 0.8rem;
    }
    
    .title {
        font-size: 1.5rem;
    }
    
    .main {
        padding: 1.5rem;
    }
    
    .wallet-actions {
        flex-direction: column;
    }
    
    .wallet-buttons {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-header,
    .modal-body {
        padding: 1rem;
    }
    

}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* Toast notifications */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 1001;
    animation: toastSlideIn 0.3s ease;
    max-width: 400px;
    text-align: center;
    background: #000000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    opacity: 1;
}

.toast.success {
    background: #00cc00
    /* opacity: 1; */
}

.toast.error {
    background: #dc3545;
    opacity: 1;
}

.toast.warning {
    background: #ffc107;
    color: #212529;
    opacity: 1;
}

@keyframes toastSlideIn {
    from {
        
        transform: translateX(-50%) translateY(-100%);
    }
    to {
        
        transform: translateX(-50%) translateY(0);
    }
}

/* Network notification */
.network-notification {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid #ffc107;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.2);
    animation: notificationSlideIn 0.3s ease;
}

@keyframes notificationSlideIn {
    from {
        
        transform: translateY(-20px);
    }
    to {
        
        transform: translateY(0);
    }
}

.notification-content {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.notification-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.notification-text {
    flex: 1;
}

.notification-text h4 {
    margin: 0 0 0.5rem 0;
    color: #856404;
    font-size: 1.1rem;
    font-weight: 600;
}

.notification-text p {
    margin: 0;
    color: #856404;
    font-size: 0.9rem;
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #856404;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.notification-close:hover {
    background: rgba(133, 100, 4, 0.1);
}

.switch-network-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #ffc107 0%, #ff8f00 100%);
    color: #212529;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.switch-network-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
}

.switch-network-btn svg {
    width: 16px;
    height: 16px;
}

/* Staking Summary Styles */
.staking-summary {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
    border: 1px solid #e0e0e0;
}

.staking-summary h4 {
    margin: 0 0 1rem 0;
    color: #333333;
    font-size: 1.1rem;
    font-weight: 600;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.summary-stats .stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.summary-stats .stat .label {
    color: #666666;
    font-size: 0.875rem;
    font-weight: 500;
}

.summary-stats .stat .value {
    color: #333333;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Monaco', 'Courier New', monospace;
}

.staking-status {
    background: #e8f5e8;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    border: 1px solid #4caf50;
}

.staking-status h4 {
    margin: 0 0 0.5rem 0;
    color: #2e7d32;
    font-size: 1rem;
    font-weight: 600;
}

.staking-status p {
    margin: 0.25rem 0;
    color: #2e7d32;
    font-size: 0.875rem;
} 