/* NFT Manager Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.contract-info {
    background: rgba(255,255,255,0.1);
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
    font-family: monospace;
    font-size: 0.9rem;
}

.content {
    padding: 30px;
}

.connect-section {
    text-align: center;
    margin-bottom: 30px;
}

.connect-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.connect-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.wallet-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.wallet-header {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 15px 30px;
    text-align: center;
    font-weight: bold;
    border-radius: 10px;
    margin-bottom: 20px;
}

.wallet-address-display {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    background: rgba(255,255,255,0.2);
    padding: 10px 15px;
    border-radius: 5px;
    margin-top: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.wallet-address-display:hover {
    background: rgba(255,255,255,0.3);
}

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

.wallet-detail {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #4facfe;
}

.wallet-detail label {
    font-weight: 600;
    color: #666;
    display: block;
    margin-bottom: 5px;
}

.wallet-detail span {
    font-family: monospace;
    color: #333;
}

.owner {
    color: #28a745;
    font-weight: bold;
}

.user {
    color: #dc3545;
}

.wallet-detail a:hover {
    text-decoration: underline !important;
    opacity: 0.8;
}

/* Global Refresh Status */
.global-refresh-status {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    padding: 8px 30px;
    display: flex;
    justify-content: flex-end;
}

/* Subtle Refresh Styles */
.transfer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.transfer-refresh {
    display: flex;
    align-items: center;
    gap: 8px;
}

.clickable-title {
    cursor: pointer;
    transition: color 0.2s;
}

.clickable-title:hover {
    color: #17a2b8;
}

.clickable-title.refreshing {
    animation: spin 1s linear infinite;
}

.refresh-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    font-size: 0.85rem;
}

.block-status {
    color: #28a745;
    font-weight: 600;
    padding: 4px 8px;
    background: rgba(40, 167, 69, 0.1);
    border-radius: 4px;
    font-size: 0.75rem;
}

.block-info {
    color: #17a2b8;
    font-weight: 500;
    padding: 2px 6px;
    background: rgba(23, 162, 184, 0.1);
    border-radius: 4px;
    font-size: 0.7rem;
    font-family: monospace;
}

.last-update-subtle {
    color: #6c757d;
    font-size: 0.7rem;
}

.block-status-icon {
    transition: all 0.3s ease;
}

.block-status-icon.new-block {
    color: #28a745;
    animation: pulseGreen 1s ease-in-out;
}

.block-status-icon.approaching {
    color: #fd7e14;
    animation: pulseOrange 0.5s ease-in-out infinite alternate;
}

.block-status-icon.delayed {
    color: #dc3545;
    animation: pulseRed 0.3s ease-in-out infinite alternate;
}

@keyframes pulseGreen {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes pulseOrange {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.1); opacity: 1; }
}

@keyframes pulseRed {
    0% { transform: scale(1); opacity: 0.7; }
    100% { transform: scale(1.2); opacity: 1; }
}

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

.stats-section {
    margin-bottom: 30px;
}

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

.stats-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #28a745;
}

.stats-card h3 {
    color: #333;
    margin-bottom: 15px;
}

.stats-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #28a745;
}

.transfer-section {
    margin-top: 20px;
}

.transfer-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #dee2e6;
}

.tab-btn {
    background: none;
    border: none;
    padding: 15px 20px;
    cursor: pointer;
    font-weight: 600;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.tab-btn.active {
    color: #4facfe;
    border-bottom-color: #4facfe;
}

.tab-content {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

.address-dropdown {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    background: #f8f9fa;
    margin-bottom: 8px;
}

.submit-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.submit-btn.disabled,
.submit-btn:disabled {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
}

.submit-btn:disabled:hover {
    transform: none;
}

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

.help-text {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

/* Quantity Input Group Styles */
.quantity-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quantity-input-group input {
    width: 100%;
}

.quantity-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.qty-btn {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f8f9fa;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    min-width: 45px;
    white-space: nowrap;
    text-align: center;
}

.qty-btn:hover {
    background: #e9ecef;
    border-color: #4facfe;
    transform: translateY(-1px);
}

.qty-minus {
    background: linear-gradient(135deg, #dc3545 0%, #fd7e14 100%);
    color: white;
    border-color: #dc3545;
}

.qty-minus:hover {
    background: linear-gradient(135deg, #c82333 0%, #e8681f 100%);
    border-color: #bd2130;
}

.qty-plus {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border-color: #28a745;
}

.qty-plus:hover {
    background: linear-gradient(135deg, #218838 0%, #1ba085 100%);
    border-color: #1e7e34;
}

.qty-plus-5 {
    background: linear-gradient(135deg, #17a2b8 0%, #20c997 100%);
    color: white;
    border-color: #17a2b8;
}

.qty-plus-5:hover {
    background: linear-gradient(135deg, #138496 0%, #1ba085 100%);
    border-color: #117a8b;
}

/* Toast Notification Styles */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 300px;
    max-width: 500px;
    z-index: 10000;
    animation: slideIn 0.3s ease-out;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    font-weight: 500;
}

.toast-success .toast-content {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.toast-error .toast-content {
    background: linear-gradient(135deg, #dc3545 0%, #fd7e14 100%);
    color: white;
}

.toast-pending .toast-content {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    color: white;
}

.toast-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    word-break: break-word;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.tx-link {
    color: white;
    text-decoration: underline;
    font-weight: bold;
    transition: opacity 0.2s;
}

.tx-link:hover {
    opacity: 0.8;
    text-decoration: none;
}

.toast-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.2s, background 0.2s;
}

.toast-close:hover {
    opacity: 1;
    background: rgba(255,255,255,0.2);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* User NFT Collection Styles */
.user-nft-section {
    margin-top: 20px;
}

.nft-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin: 25px 0;
}

.nft-card {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 20px;
    border-left: 4px solid #4facfe;
    transition: transform 0.2s, box-shadow 0.2s;
}

.nft-card.nimman-card {
    border-left: 4px solid #28a745;
    background: linear-gradient(135deg, #f8fffe 0%, #f0fdf4 100%);
}

.nft-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.12);
}

/* SVG Display Styles */
.nft-svg-container {
    margin: 15px 0;
    background: white;
    border-radius: 8px;
    padding: 10px;
    border: 2px solid #e9ecef;
    overflow: hidden;
}

.nft-svg-display {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: white;
}

.nft-svg-display svg {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* Redeemed Badge */
.redeemed-badge {
    background: linear-gradient(135deg, #dc3545 0%, #fd7e14 100%);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.nft-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.nft-id {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 1.2rem;
    color: #333;
}

.color-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.color-badge.color-0 { background: linear-gradient(135deg, #28a745, #20c997); } /* Green */
.color-badge.color-1 { background: linear-gradient(135deg, #007bff, #6f42c1); } /* Blue */
.color-badge.color-2 { background: linear-gradient(135deg, #6f42c1, #e83e8c); } /* Purple */
.color-badge.color-3 { background: linear-gradient(135deg, #fd7e14, #ffc107); } /* Orange */
.color-badge.color-4 { background: linear-gradient(135deg, #dc3545, #fd7e14); } /* Red */
.color-badge.color-5 { background: linear-gradient(135deg, #e83e8c, #fd7e14); } /* Pink */
.color-badge.color-6 { background: linear-gradient(135deg, #20c997, #17a2b8); } /* Teal */
.color-badge.color-7 { background: linear-gradient(135deg, #ffc107, #fd7e14); } /* Yellow */
.color-badge.color-8 { background: linear-gradient(135deg, #6610f2, #6f42c1); } /* Indigo */
.color-badge.color-9 { background: linear-gradient(135deg, #28a745, #ffc107); } /* Lime */
.color-badge.color-10 { background: linear-gradient(135deg, #fd7e14, #e83e8c); } /* Coral */
.color-badge.color-11 { background: linear-gradient(135deg, #6f42c1, #e83e8c); } /* Violet */

.nft-details {
    margin-bottom: 15px;
}

.carbon-amount {
    font-size: 1.1rem;
    font-weight: bold;
    color: #28a745;
    margin-bottom: 5px;
}

.event-info {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

.certificate-type {
    font-size: 0.8rem;
    color: #28a745;
    font-weight: bold;
    margin-top: 5px;
}

.nft-actions {
    text-align: center;
}

.view-link {
    display: inline-block;
    padding: 8px 16px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: transform 0.2s;
}

.view-link:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

.loading-state, .empty-state {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 10px;
    margin: 20px 0;
}

.empty-state p {
    color: #666;
    margin-bottom: 10px;
}

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

.summary-card {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.summary-card h4 {
    margin-bottom: 10px;
    font-size: 1rem;
    opacity: 0.9;
}

.impact-value {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.impact-desc {
    font-size: 0.9rem;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .content {
        padding: 20px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .nft-grid {
        grid-template-columns: 1fr;
    }
    
    .collection-summary {
        grid-template-columns: 1fr;
    }
}