* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0f0f0f 100%);
    color: #e5e7eb;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Enhanced Header Styles */
.header {
    position: relative;
    text-align: center;
    margin-bottom: 60px;
    padding: 60px 0 80px;
    overflow: hidden;
}

.header-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
    border-radius: 0 0 50px 50px;
}

.header-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

.header-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 300px;
    background: radial-gradient(ellipse, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    filter: blur(40px);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.1); }
}

.header-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.logo-section {
    text-align: center;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}

.logo-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
    animation: iconFloat 3s ease-in-out infinite;
}

.logo-icon svg {
    width: 32px;
    height: 32px;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

.logo {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #3b82f6, #60a5fa, #10b981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -2px;
}

.subtitle {
    color: #9ca3af;
    font-size: 1.2rem;
    font-weight: 400;
    max-width: 500px;
    margin: 0 auto;
}

.header-stats {
    display: flex;
    gap: 40px;
    justify-content: center;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    padding: 20px 30px;
    background: rgba(45, 45, 45, 0.6);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    min-width: 140px;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    border-color: rgba(59, 130, 246, 0.3);
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #3b82f6;
    margin-bottom: 5px;
}

.stat-label {
    color: #9ca3af;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Enhanced Search Section */
.search-section {
    margin-bottom: 60px;
}

.search-container {
    display: flex;
    justify-content: center;
}

.search-box {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 700px;
    background: rgba(45, 45, 45, 0.8);
    border-radius: 16px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.search-box:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}

.search-icon {
    width: 24px;
    height: 24px;
    color: #6b7280;
    margin-left: 20px;
    transition: color 0.3s ease;
}

.search-box:focus-within .search-icon {
    color: #3b82f6;
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #e5e7eb;
    font-size: 1.1rem;
    padding: 18px 20px;
    border-radius: 12px;
}

.search-input::placeholder {
    color: #6b7280;
}

.search-btn {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: none;
    color: white;
    padding: 18px 28px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    min-width: 150px;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.search-btn:active {
    transform: translateY(0);
}

/* Chart Section Enhancements */
.chart-section {
    background: rgba(45, 45, 45, 0.8);
    border-radius: 20px;
    padding: 35px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    margin-bottom: 40px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.chart-header h2 {
    color: #3b82f6;
    font-size: 2rem;
    font-weight: 700;
}

.chart-period-selector {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 4px;
    gap: 2px;
}

.period-btn {
    background: transparent;
    border: none;
    color: #9ca3af;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 50px;
}

.period-btn:hover {
    color: #e5e7eb;
    background: rgba(255, 255, 255, 0.05);
}

.period-btn.active {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.chart-container {
    position: relative;
    height: 350px;
    margin-bottom: 25px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

#priceChart {
    width: 100%;
    height: 100%;
}

.price-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    text-align: center;
}

.price-stat {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.price-stat label {
    color: #9ca3af;
    font-size: 0.9rem;
    font-weight: 500;
}

.price-stat span {
    font-size: 1.3rem;
    font-weight: 700;
    color: #e5e7eb;
}

.change-positive {
    color: #10b981 !important;
}

.change-negative {
    color: #ef4444 !important;
}

/* Loader Animation */
.loader {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

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

.hidden {
    display: none !important;
}

/* Main Content */
.main-content {
    animation: fadeIn 0.6s ease-out;
}

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

/* Wallet Details */
.wallet-details {
    margin-top: 30px;
}

.wallet-card {
    background: rgba(45, 45, 45, 0.8);
    border-radius: 20px;
    padding: 35px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    margin-bottom: 40px;
}

.wallet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.wallet-header h2 {
    color: #3b82f6;
    font-size: 2rem;
    font-weight: 700;
}

.back-btn {
    background: rgba(107, 114, 128, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e5e7eb;
    padding: 12px 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.back-btn:hover {
    background: rgba(107, 114, 128, 0.3);
    transform: translateX(-3px);
}

.wallet-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.info-item label {
    color: #9ca3af;
    font-size: 0.95rem;
    font-weight: 600;
}

.address-text {
    font-family: 'Courier New', monospace;
    color: #60a5fa;
    word-break: break-all;
    background: rgba(59, 130, 246, 0.1);
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    font-size: 0.9rem;
}

.balance-text {
    color: #10b981;
    font-size: 1.4rem;
    font-weight: 700;
}

/* Transactions Section */
.transactions-section, .recent-section {
    background: rgba(45, 45, 45, 0.8);
    border-radius: 20px;
    padding: 35px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.transactions-section h3, .recent-section h2 {
    color: #3b82f6;
    margin-bottom: 30px;
    font-size: 1.8rem;
    font-weight: 700;
}

.transactions-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-height: 600px;
    overflow-y: auto;
}

.transaction-item {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.transaction-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    border-color: rgba(59, 130, 246, 0.3);
}

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

.transaction-type {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.type-deposit {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.type-withdrawal {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.type-transfer {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.transaction-amount {
    font-size: 1.2rem;
    font-weight: 700;
    color: #e5e7eb;
}

.transaction-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 18px;
    font-size: 0.95rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.detail-label {
    color: #9ca3af;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.detail-value {
    color: #e5e7eb;
}

.address-link {
    color: #60a5fa;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Courier New', monospace;
    word-break: break-all;
    text-decoration: underline;
    text-decoration-color: transparent;
    font-weight: 600;
}

.address-link:hover {
    color: #3b82f6;
    text-decoration-color: #3b82f6;
}

.hash-text {
    font-family: 'Courier New', monospace;
    color: #9ca3af;
    word-break: break-all;
    background: rgba(156, 163, 175, 0.1);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header {
        padding: 40px 0 60px;
    }
    
    .logo {
        font-size: 2.5rem;
    }
    
    .logo-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .header-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .search-box {
        flex-direction: column;
        gap: 12px;
        padding: 12px;
    }
    
    .search-btn {
        min-width: auto;
    }
    
    .chart-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .wallet-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .wallet-info {
        grid-template-columns: 1fr;
    }
    
    .price-info {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .transaction-details {
        grid-template-columns: 1fr;
    }
}
/* Toasts d’erreur */
#toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
}
.toast {
  background: rgba(239,68,68,0.9);
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  min-width: 200px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  animation: slideIn 0.4s ease-out, fadeOut 0.4s ease-in 3.6s forwards;
}
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);     opacity: 1; }
}
@keyframes fadeOut {
  to { opacity: 0; }
}

/* Scrollbar Styling */
.transactions-list::-webkit-scrollbar {
    width: 8px;
}

.transactions-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.transactions-list::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.5);
    border-radius: 4px;
}

.transactions-list::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.7);
}