/**
 * Web3 Integration Styles
 * Save The Planet Token (STP)
 */

/* ============================================
   WALLET CONNECTION BUTTON
   ============================================ */

.wallet-section {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 15px;
}

#connectWalletBtn {
    background: linear-gradient(135deg, #f4d03f 0%, #e6b800 100%);
    color: #0a1f1f;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(244, 208, 63, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

#connectWalletBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 208, 63, 0.4);
}

#connectWalletBtn.connected {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
}

#connectWalletBtn::before {
    content: '🦊';
    font-size: 18px;
}

#connectWalletBtn.connected::before {
    content: '✓';
}

/* ============================================
   WALLET INFO DISPLAY
   ============================================ */

#walletInfo {
    background: rgba(10, 31, 31, 0.9);
    backdrop-filter: blur(10px);
    border: 2px solid #f4d03f;
    border-radius: 12px;
    padding: 12px 20px;
    display: none;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

#walletInfo.show {
    display: flex;
}

.wallet-address {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #f4d03f;
    font-weight: 600;
}

.wallet-address i {
    color: #2ecc71;
}

#stpBalance {
    color: white;
    font-weight: 700;
    font-size: 16px;
}

/* ============================================
   WEB3 WIDGET
   ============================================ */

.web3-widget {
    background: linear-gradient(135deg, rgba(10, 31, 31, 0.95) 0%, rgba(15, 40, 40, 0.95) 100%);
    border: 2px solid #f4d03f;
    border-radius: 20px;
    padding: 30px;
    margin: 40px 0;
    box-shadow: 0 8px 32px rgba(244, 208, 63, 0.2);
}

.web3-widget-header {
    text-align: center;
    margin-bottom: 30px;
}

.web3-widget-header h3 {
    color: #f4d03f;
    font-size: 28px;
    margin-bottom: 10px;
}

.web3-widget-header p {
    color: #b8c5c5;
    font-size: 14px;
}

.web3-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.web3-action-btn {
    background: linear-gradient(135deg, #f4d03f 0%, #e6b800 100%);
    color: #0a1f1f;
    padding: 15px 25px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(244, 208, 63, 0.3);
}

.web3-action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(244, 208, 63, 0.5);
}

.web3-action-btn.secondary {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.2) 0%, rgba(39, 174, 96, 0.2) 100%);
    border: 2px solid #2ecc71;
    color: #2ecc71;
}

.web3-action-btn.secondary:hover {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.3) 0%, rgba(39, 174, 96, 0.3) 100%);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.3);
}

.web3-action-btn i {
    font-size: 18px;
}

/* ============================================
   BALANCE DISPLAY CARD
   ============================================ */

.balance-card {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.1) 0%, rgba(39, 174, 96, 0.1) 100%);
    border: 2px solid #2ecc71;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    margin: 20px 0;
}

.balance-label {
    color: #b8c5c5;
    font-size: 14px;
    margin-bottom: 10px;
}

.balance-amount {
    color: #2ecc71;
    font-size: 36px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.balance-amount .token-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.balance-usd {
    color: #b8c5c5;
    font-size: 16px;
    margin-top: 10px;
}

/* ============================================
   NOTIFICATIONS
   ============================================ */

.web3-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: rgba(10, 31, 31, 0.98);
    border-radius: 12px;
    padding: 15px 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 100000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    min-width: 300px;
    border-left: 4px solid #f4d03f;
}

.web3-notification.show {
    transform: translateX(0);
}

.web3-notification.success {
    border-left-color: #2ecc71;
}

.web3-notification.error {
    border-left-color: #e74c3c;
}

.web3-notification.info {
    border-left-color: #3498db;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
    font-weight: 500;
}

.notification-content i {
    font-size: 24px;
}

.web3-notification.success .notification-content i {
    color: #2ecc71;
}

.web3-notification.error .notification-content i {
    color: #e74c3c;
}

.web3-notification.info .notification-content i {
    color: #3498db;
}

/* ============================================
   TOKEN INFO CARDS
   ============================================ */

.token-quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.quick-action-card {
    background: linear-gradient(135deg, rgba(10, 31, 31, 0.8) 0%, rgba(15, 40, 40, 0.8) 100%);
    border: 2px solid rgba(244, 208, 63, 0.3);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.quick-action-card:hover {
    transform: translateY(-5px);
    border-color: #f4d03f;
    box-shadow: 0 8px 25px rgba(244, 208, 63, 0.2);
}

.quick-action-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.quick-action-card h4 {
    color: #f4d03f;
    font-size: 18px;
    margin-bottom: 10px;
}

.quick-action-card p {
    color: #b8c5c5;
    font-size: 14px;
    line-height: 1.6;
}

/* ============================================
   PANCAKESWAP WIDGET
   ============================================ */

.pancake-widget {
    background: linear-gradient(135deg, rgba(237, 148, 93, 0.1) 0%, rgba(207, 118, 63, 0.1) 100%);
    border: 2px solid #ed945d;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    margin: 30px 0;
}

.pancake-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
}

.pancake-widget h3 {
    color: #ed945d;
    font-size: 24px;
    margin-bottom: 10px;
}

.pancake-widget p {
    color: #b8c5c5;
    margin-bottom: 20px;
}

.btn-buy-pancake {
    background: linear-gradient(135deg, #ed945d 0%, #cf763f 100%);
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(237, 148, 93, 0.3);
}

.btn-buy-pancake:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(237, 148, 93, 0.5);
}

/* ============================================
   CONTRACT INFO SECTION
   ============================================ */

.contract-info-widget {
    background: rgba(10, 31, 31, 0.6);
    border: 2px solid rgba(244, 208, 63, 0.3);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
}

.contract-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(184, 197, 197, 0.1);
}

.contract-info-row:last-child {
    border-bottom: none;
}

.contract-info-label {
    color: #b8c5c5;
    font-size: 14px;
}

.contract-info-value {
    color: #f4d03f;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.copy-address-btn {
    background: rgba(244, 208, 63, 0.1);
    border: 1px solid #f4d03f;
    color: #f4d03f;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
}

.copy-address-btn:hover {
    background: rgba(244, 208, 63, 0.2);
    transform: scale(1.05);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .wallet-section {
        top: 10px;
        right: 10px;
        flex-direction: column;
        align-items: flex-end;
    }
    
    #connectWalletBtn {
        padding: 10px 20px;
        font-size: 12px;
    }
    
    #walletInfo {
        flex-direction: column;
        align-items: flex-end;
        padding: 10px 15px;
    }
    
    .web3-widget {
        padding: 20px;
    }
    
    .web3-actions {
        grid-template-columns: 1fr;
    }
    
    .token-quick-actions {
        grid-template-columns: 1fr;
    }
    
    .balance-amount {
        font-size: 28px;
    }
    
    .web3-notification {
        right: 10px;
        bottom: 10px;
        min-width: auto;
        width: calc(100% - 20px);
    }
}

@media (max-width: 480px) {
    .wallet-section {
        position: relative;
        top: 0;
        right: 0;
        width: 100%;
        padding: 10px;
        background: rgba(10, 31, 31, 0.95);
    }
    
    #connectWalletBtn {
        width: 100%;
        justify-content: center;
    }
    
    #walletInfo {
        width: 100%;
    }
}

/* ============================================
   LOADING STATES
   ============================================ */

.web3-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(244, 208, 63, 0.3);
    border-radius: 50%;
    border-top-color: #f4d03f;
    animation: spin 0.8s linear infinite;
}

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

.btn-loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

/* ============================================
   ANIMATIONS
   ============================================ */

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

.web3-widget,
.balance-card,
.pancake-widget {
    animation: fadeIn 0.6s ease-out;
}

/* ============================================
   CUSTOM SCROLLBAR FOR WEB3 ELEMENTS
   ============================================ */

.web3-widget::-webkit-scrollbar {
    width: 8px;
}

.web3-widget::-webkit-scrollbar-track {
    background: rgba(10, 31, 31, 0.3);
    border-radius: 10px;
}

.web3-widget::-webkit-scrollbar-thumb {
    background: #f4d03f;
    border-radius: 10px;
}

.web3-widget::-webkit-scrollbar-thumb:hover {
    background: #e6b800;
}
