/* Root refinements */
:root {
    --bg-color: #0b0d11;
    --surface-color: rgba(20, 24, 33, 0.65);
    --surface-border: rgba(255, 255, 255, 0.06);
    --accent-color: #00e5ff;
    --accent-secondary: #7000ff;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --glass-blur: 12px;
    --card-hover-bg: rgba(30, 41, 59, 0.5);
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Body Refinement */
body {
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(at 0% 0%, rgba(0, 229, 255, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(112, 0, 255, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
}

/* Improved Glassmorphism */
.glassmorphism {
    background: var(--surface-color);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--surface-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-glow {
    0% { box-shadow: 0 0 0 0 rgba(0, 229, 255, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(0, 229, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 229, 255, 0); }
}

.tool-card {
    animation: fadeInUp 0.5s ease backwards;
}

/* Staggered animation for grid items */
.tools-grid .tool-card:nth-child(1) { animation-delay: 0.05s; }
.tools-grid .tool-card:nth-child(2) { animation-delay: 0.1s; }
.tools-grid .tool-card:nth-child(3) { animation-delay: 0.15s; }
.tools-grid .tool-card:nth-child(4) { animation-delay: 0.2s; }
.tools-grid .tool-card:nth-child(5) { animation-delay: 0.25s; }

/* Category Enhancements */
.category-item {
    padding: 12px 16px;
    margin-bottom: 4px;
    border-radius: 12px;
    background: transparent;
    border: 1px solid transparent;
}

.category-item span:first-child {
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-emoji {
    font-size: 1.2rem;
    filter: drop-shadow(0 0 5px rgba(255,255,255,0.2));
}

.category-item.active {
    background: rgba(0, 229, 255, 0.1);
    border-color: rgba(0, 229, 255, 0.2);
    color: var(--accent-color);
    border-left: none; /* Removed the old border-left */
}

/* Card Improvements */
.tool-card {
    background: var(--surface-color);
    border: 1px solid var(--surface-border);
    border-radius: 20px;
    padding: 24px;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, transparent 100%);
    pointer-events: none;
}

.tool-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(0, 229, 255, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    background: var(--card-hover-bg);
}

.tool-name {
    font-size: 1.25rem;
    letter-spacing: -0.01em;
}

.tool-category {
    background: rgba(0, 229, 255, 0.1);
    color: var(--accent-color);
    border: 1px solid rgba(0, 229, 255, 0.1);
    font-weight: 600;
}

/* Action Buttons */
.copy-btn {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--text-secondary);
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.copy-btn.copied {
    color: var(--success);
    background: rgba(0, 210, 128, 0.1);
}

/* Footer & Back to Top */
.footer {
    margin-top: 40px;
    padding: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    text-align: center;
}

.footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-smooth);
}

.footer-links a:hover {
    color: var(--text-primary);
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--accent-color);
    color: #000;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(0, 229, 255, 0.3);
    z-index: 1000;
    transition: var(--transition-smooth);
}

.back-to-top:hover {
    transform: translateY(-5px);
    background: #fff;
}

.back-to-top.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
}

/* Favorites Badge */
.fav-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
    z-index: 2;
}

.fav-btn:hover {
    color: #ff4b4b;
    transform: scale(1.2);
}

.fav-btn.active {
    color: #ff4b4b;
}

/* Scrollbar refine */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 5px;
    border: 3px solid var(--bg-color);
}
::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .header {
        top: 0;
        border-radius: 0;
    }
    .footer {
        flex-direction: column;
    }
}

