/* ============================================== */
/* FIXED: EXACT 24PX (1/4 INCH) EDGE PADDING ONLY */
/* ============================================== */

/* Remove ALL default margins/paddings that could interfere */
* {
    box-sizing: border-box;
}

/* CRITICAL: Set body to exactly 24px padding from edges, no more */
body {
    padding: 24px !important;
    margin: 0 !important;
    min-height: 100vh;
}

/* CRITICAL: Container should NOT add any additional padding/margins */
.container {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: none !important;
}

/* CRITICAL: Token tools page should NOT add padding/margins */
.token-tools-page {
    padding: 0 !important;
    margin: 0 !important;
    position: relative;
    z-index: 1;
}

/* Enhanced Page Header with Perfect Glow Box */
.page-header {
    text-align: center !important;
    margin-bottom: 3rem !important;
    padding: 3rem 2rem !important;
    background: rgba(30, 41, 59, 0.95) !important;
    border: 2px solid rgba(59, 130, 246, 0.4) !important;
    border-radius: 24px !important;
    position: relative !important;
    overflow: hidden !important;
    box-shadow: 
        0 0 30px rgba(59, 130, 246, 0.4),
        0 0 60px rgba(139, 92, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 20%, rgba(59, 130, 246, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(139, 92, 246, 0.3) 0%, transparent 50%);
    z-index: -1;
    animation: shimmer 4s ease-in-out infinite alternate;
}

@keyframes shimmer {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

.page-title {
    font-size: 3.5rem !important;
    font-weight: 800 !important;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6, #ec4899) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    margin-bottom: 1rem !important;
    text-shadow: 0 0 30px rgba(59, 130, 246, 0.5);
}

.page-description {
    font-size: 1.3rem !important;
    color: #94a3b8 !important;
    max-width: 700px !important;
    margin: 0 auto !important;
    line-height: 1.7 !important;
}

/* Enhanced Stats Dashboard Boxes */
.stats-dashboard {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
    gap: 2rem !important;
    margin-bottom: 3rem !important;
}

.stat-card {
    background: rgba(30, 41, 59, 0.95) !important;
    border: 2px solid rgba(59, 130, 246, 0.4) !important;
    border-radius: 20px !important;
    padding: 2rem 1.5rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 1.5rem !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
    box-shadow: 
        0 10px 25px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(59, 130, 246, 0.2) !important;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.15));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.4) 0%, transparent 70%);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translate(-50%, -50%);
    z-index: -1;
    border-radius: 50%;
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card:hover::after {
    width: 300px;
    height: 300px;
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.03) !important;
    box-shadow: 
        0 20px 40px rgba(59, 130, 246, 0.5),
        0 0 60px rgba(59, 130, 246, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(59, 130, 246, 0.7) !important;
}

.stat-icon {
    font-size: 2.5rem !important;
    width: 70px !important;
    height: 70px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6) !important;
    border-radius: 18px !important;
    box-shadow: 
        0 8px 25px rgba(59, 130, 246, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    transition: all 0.3s ease !important;
}

.stat-card:hover .stat-icon {
    transform: rotate(5deg) scale(1.1) !important;
    box-shadow: 
        0 12px 35px rgba(59, 130, 246, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

.stat-content h3 {
    font-size: 2.2rem !important;
    font-weight: 800 !important;
    color: #3b82f6 !important;
    margin: 0 !important;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.stat-content p {
    color: #94a3b8 !important;
    margin: 0 !important;
    font-size: 0.95rem !important;
    font-weight: 500;
}

/* Enhanced Search and Filter Bar */
.search-filter-bar {
    display: flex !important;
    gap: 2rem !important;
    margin-bottom: 3rem !important;
    flex-wrap: wrap !important;
    align-items: center !important;
}

.search-container {
    display: flex !important;
    flex: 1 !important;
    min-width: 350px !important;
    position: relative !important;
}

.search-input {
    flex: 1 !important;
    padding: 15px 20px !important;
    border: 2px solid rgba(59, 130, 246, 0.4) !important;
    border-radius: 16px !important;
    background: rgba(30, 41, 59, 0.9) !important;
    color: white !important;
    font-size: 16px !important;
    transition: all 0.4s ease !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
}

.search-input:focus {
    outline: none !important;
    border-color: #3b82f6 !important;
    box-shadow: 
        0 0 25px rgba(59, 130, 246, 0.4),
        0 4px 20px rgba(0, 0, 0, 0.3) !important;
    transform: scale(1.02);
}

.search-btn {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6) !important;
    border: none !important;
    color: white !important;
    padding: 15px 20px !important;
    margin-left: 12px !important;
    border-radius: 14px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3) !important;
    font-size: 1.1rem;
}

.search-btn:hover {
    transform: scale(1.05) translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5) !important;
}

.filter-container {
    min-width: 220px !important;
}

.filter-select {
    width: 100% !important;
    padding: 15px 20px !important;
    border: 2px solid rgba(59, 130, 246, 0.4) !important;
    border-radius: 16px !important;
    background: rgba(30, 41, 59, 0.9) !important;
    color: white !important;
    font-size: 16px !important;
    cursor: pointer !important;
    transition: all 0.4s ease !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
}

.filter-select:focus {
    outline: none !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4) !important;
}

/* ENHANCED TOOLS GRID WITH PERFECT HOVER EFFECTS */
.tools-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)) !important;
    gap: 2.5rem !important;
    margin-bottom: 4rem !important;
}

.tool-card {
    background: rgba(30, 41, 59, 0.95) !important;
    border: 2px solid rgba(59, 130, 246, 0.4) !important;
    border-radius: 24px !important;
    padding: 2.5rem !important;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
    cursor: pointer !important;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(59, 130, 246, 0.2) !important;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.15));
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: -1;
}

.tool-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.4) 0%, transparent 70%);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translate(-50%, -50%);
    z-index: -1;
    border-radius: 50%;
}

.tool-card:hover::before {
    opacity: 1;
}

.tool-card:hover::after {
    width: 400px;
    height: 400px;
}

.tool-card:hover {
    transform: translateY(-15px) scale(1.03) !important;
    box-shadow: 
        0 30px 60px rgba(59, 130, 246, 0.5),
        0 0 100px rgba(59, 130, 246, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(59, 130, 246, 0.8) !important;
}

.tool-card:active {
    transform: translateY(-12px) scale(1.02) !important;
    box-shadow: 
        0 25px 50px rgba(59, 130, 246, 0.6),
        0 0 120px rgba(139, 92, 246, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

.tool-icon {
    font-size: 3.5rem !important;
    width: 90px !important;
    height: 90px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6) !important;
    border-radius: 24px !important;
    margin-bottom: 2rem !important;
    box-shadow: 
        0 12px 30px rgba(59, 130, 246, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    transition: all 0.4s ease !important;
}

.tool-card:hover .tool-icon {
    transform: rotate(8deg) scale(1.15) !important;
    box-shadow: 
        0 16px 40px rgba(59, 130, 246, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

.tool-title {
    font-size: 1.6rem !important;
    font-weight: 800 !important;
    color: white !important;
    margin-bottom: 1.2rem !important;
    transition: all 0.3s ease !important;
}

.tool-card:hover .tool-title {
    color: #60a5fa !important;
    text-shadow: 0 0 15px rgba(96, 165, 250, 0.5);
}

.tool-description {
    color: #94a3b8 !important;
    line-height: 1.7 !important;
    margin-bottom: 1.8rem !important;
    font-size: 1rem;
}

.tool-features {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.8rem !important;
    margin-bottom: 1.5rem !important;
}

.feature-tag {
    background: rgba(59, 130, 246, 0.2) !important;
    color: #60a5fa !important;
    padding: 0.4rem 1rem !important;
    border-radius: 16px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
    transition: all 0.3s ease !important;
}

.tool-card:hover .feature-tag {
    background: rgba(59, 130, 246, 0.3) !important;
    color: white !important;
    border-color: rgba(59, 130, 246, 0.5) !important;
    transform: scale(1.05);
}

/* Coming Soon indicators */
.feature-tag.coming-soon {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: white !important;
    animation: pulse 2s infinite;
}

.feature-tag.pro-feature {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed) !important;
    color: white !important;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.action-btn.coming-soon-btn {
    background: linear-gradient(135deg, #6b7280, #9ca3af) !important;
    position: relative;
    overflow: hidden;
}

.action-btn.coming-soon-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.tool-stats {
    display: flex !important;
    gap: 1.2rem !important;
    margin-bottom: 2rem !important;
    font-size: 0.95rem !important;
    color: #94a3b8 !important;
}

.tool-actions {
    display: flex !important;
    gap: 1.2rem !important;
    margin-top: auto !important;
}

.action-btn {
    padding: 12px 24px !important;
    border-radius: 14px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.4s ease !important;
    border: none !important;
    position: relative !important;
    overflow: hidden !important;
    font-size: 0.95rem;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.4s ease;
    transform: translate(-50%, -50%);
    border-radius: 50%;
}

.action-btn:hover::before {
    width: 300px;
    height: 300px;
}

.action-btn.primary {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6) !important;
    color: white !important;
    flex: 1 !important;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3) !important;
}

.action-btn.primary:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.5) !important;
}

.action-btn.secondary {
    background: rgba(59, 130, 246, 0.15) !important;
    color: #3b82f6 !important;
    border: 2px solid rgba(59, 130, 246, 0.4) !important;
}

.action-btn.secondary:hover {
    background: rgba(59, 130, 246, 0.25) !important;
    border-color: rgba(59, 130, 246, 0.6) !important;
    transform: translateY(-2px);
}

/* Enhanced Quick Access Panel */
.quick-access-panel {
    background: rgba(30, 41, 59, 0.95) !important;
    border: 2px solid rgba(59, 130, 246, 0.4) !important;
    border-radius: 24px !important;
    padding: 2.5rem !important;
    margin-top: 4rem !important;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(59, 130, 246, 0.2) !important;
}

.quick-access-panel h3 {
    color: white !important;
    margin-bottom: 2rem !important;
    font-size: 1.5rem !important;
    font-weight: 700;
}

.quick-actions {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important;
    gap: 1.5rem !important;
}

.quick-action-btn {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 0.8rem !important;
    padding: 2rem 1.5rem !important;
    background: rgba(59, 130, 246, 0.15) !important;
    border: 2px solid rgba(59, 130, 246, 0.3) !important;
    border-radius: 20px !important;
    color: white !important;
    cursor: pointer !important;
    transition: all 0.4s ease !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2) !important;
}

.quick-action-btn:hover {
    transform: translateY(-8px) scale(1.05) !important;
    background: rgba(59, 130, 246, 0.25) !important;
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.4) !important;
    border-color: rgba(59, 130, 246, 0.6) !important;
}

.quick-action-btn .icon {
    font-size: 2.5rem !important;
}

.quick-action-btn .text {
    font-size: 1rem !important;
    font-weight: 600 !important;
}

/* RESPONSIVE DESIGN - MAINTAIN 24PX EDGES */
@media (max-width: 1200px) {
    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)) !important;
        gap: 2rem !important;
    }
}

@media (max-width: 768px) {
    .tools-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    .tool-card {
        padding: 2rem !important;
    }
    
    .page-title {
        font-size: 2.5rem !important;
    }
    
    .search-filter-bar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 1rem !important;
    }
    
    .search-container {
        min-width: unset !important;
    }
    
    .stats-dashboard {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
    }
    
    .tool-actions {
        flex-direction: column !important;
        gap: 1rem !important;
    }
}

@media (max-width: 480px) {
    .tool-card {
        padding: 1.5rem !important;
    }
    
    .tool-icon {
        width: 70px !important;
        height: 70px !important;
        font-size: 2.5rem !important;
    }
    
    .page-header {
        padding: 2rem 1.5rem !important;
    }
    
    .stats-dashboard {
        grid-template-columns: 1fr !important;
    }
}

/* Tool filtering animations */
.tool-card.hidden {
    opacity: 0 !important;
    transform: scale(0.8) !important;
    pointer-events: none !important;
}

.tool-card.visible {
    opacity: 1 !important;
    transform: scale(1) !important;
    pointer-events: auto !important;
}

/* Loading states */
.loading {
    opacity: 0.6 !important;
    pointer-events: none !important;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(59, 130, 246, 0.3);
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Modal Styles - Enhanced */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.modal-content {
    background: rgba(30, 41, 59, 0.98);
    border: 2px solid rgba(59, 130, 246, 0.4);
    border-radius: 24px;
    padding: 2.5rem;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(59, 130, 246, 0.3);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.modal-header h2 {
    color: white;
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
}

.close-btn {
    background: none;
    border: none;
    color: #aaa;
    font-size: 28px;
    cursor: pointer;
    transition: color 0.3s;
    padding: 8px;
    border-radius: 8px;
}

.close-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

/* Coming Soon Modal Styling */
.coming-soon-notice {
    text-align: center;
    padding: 4rem 2rem;
    background: rgba(15, 23, 42, 0.9);
    border-radius: 20px;
    border: 2px solid rgba(59, 130, 246, 0.3);
}

.notice-icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    display: block;
}

.coming-soon-notice h3 {
    color: #3b82f6;
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.coming-soon-notice p {
    color: #94a3b8;
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 2.5rem;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: rgba(59, 130, 246, 0.2);
    border-radius: 5px;
    margin: 1.5rem 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 5px;
    transition: width 0.3s ease;
}

.progress-text {
    color: #3b82f6;
    font-weight: 600;
    margin-top: 1rem;
    font-size: 1.1rem;
}

/* Add to the existing style section */

/* Fix scrollbar positioning - move it away from the boxes */
body {
    padding: 24px 48px 24px 24px !important; /* Increased right padding from 24px to 48px */
    margin: 0 !important;
    min-height: 100vh;
}

/* Alternative approach - add padding to the main content area */
.token-tools-page {
    padding: 0 24px 0 0 !important; /* Add 24px right padding */
    margin: 0 !important;
    position: relative;
    z-index: 1;
}

/* Ensure tools grid has proper spacing from right edge */
.tools-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)) !important;
    gap: 2.5rem !important;
    margin-bottom: 4rem !important;
    padding-right: 24px; /* Additional right padding for tools grid */
}

/* Adjust container to account for the extra scrollbar space */
.container {
    padding: 0 !important;
    margin: 0 !important;
    width: calc(100% - 24px) !important; /* Reduce width to account for extra right padding */
    max-width: none !important;
}

/* Custom scrollbar styling to make it more visually appealing */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(30, 41, 59, 0.3);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 6px;
    border: 2px solid rgba(30, 41, 59, 0.3);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
}

/* Firefox scrollbar styling */
* {
    scrollbar-width: thin;
    scrollbar-color: #3b82f6 rgba(30, 41, 59, 0.3);
}

/* Responsive adjustments to maintain proper scrollbar spacing */
@media (max-width: 1200px) {
    body {
        padding: 24px 40px 24px 24px !important;
    }
}

@media (max-width: 768px) {
    body {
        padding: 24px 36px 24px 24px !important;
    }
    
    .tools-grid {
        padding-right: 16px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 20px 32px 20px 20px !important;
    }
    
    .tools-grid {
        padding-right: 12px;
    }
}
