* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #1a1d23, #1a1d23);
    color: #e2e8f0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

body.light-theme {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    color: #1a202c;
}

body.light-theme .category-nav {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

body.light-theme .category-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #1a202c;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

body.light-theme .category-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.1);
}

body.light-theme .category-btn.active {
    background: rgba(59, 130, 246, 0.2);
    color: #2563eb;
    border-color: rgba(59, 130, 246, 0.4);
}

body.light-theme .tool-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

body.light-theme .tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px -1px rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
}

body.light-theme .tool-type {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

body.light-theme .tool-name {
    color: #1a202c;
}

body.light-theme .tool-desc {
    color: #4a5568;
}

/* Tool Details Modal Light Theme */
body.light-theme #toolDetails {
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
}

body.light-theme #toolDetails .modal-content {
    background: white;
    color: #1a202c;
    border: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.2);
}

body.light-theme #toolDetails h2.text-white {
    color: #1a202c !important;
}

body.light-theme #toolDetails .text-gray-400 {
    color: #4a5568 !important;
}

body.light-theme #toolDetails p.text-white {
    color: #1a202c !important;
}

body.light-theme #toolDetails button {
    color: #4a5568;
}

body.light-theme #toolDetails button:hover {
    color: #1a202c;
}

body.light-theme #toolDetails .bg-slate-800 {
    background: rgba(255, 255, 255, 0.95);
    color: #1a202c;
    border: 1px solid rgba(203, 213, 224, 0.5);
}

body.light-theme #toolDetails .text-white {
    color: #1a202c;
}

body.light-theme #toolDetails a {
    color: #2563eb;
}

body.light-theme #toolDetails a:hover {
    color: #1d4ed8;
}

.container {
    width: 95%;
    max-width: 1800px;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
}

header {
    text-align: center;
    padding: 40px 0;
    margin-bottom: 20px;
}

header h1 {
    font-size: 45px;
    color: #3b82f6;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.category-nav {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 30px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(12px);
    padding: 20px;
    border-radius: 20px;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.category-nav::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    padding: 4px;
    background: linear-gradient(45deg, 
        rgba(59, 130, 246, 0.6),
        rgba(96, 165, 250, 0.6),
        rgba(147, 197, 253, 0.6),
        rgba(59, 130, 246, 0.6)
    );
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    animation: borderGradientRotate 4s linear infinite;
}

.category-nav:hover {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

.category-btn {
    background: rgba(30, 41, 59, 0.7);
    color: #e2e8f0;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1em;
    border: 1px solid rgba(148, 163, 184, 0.1);
    white-space: nowrap;
    flex-shrink: 0;
    backdrop-filter: blur(8px);
}

.category-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.category-btn.active {
    background: #3b82f6;
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    justify-content: center;
    align-items: stretch;
}

.tool-card {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(12px);
    padding: 20px;
    border-radius: 20px;
    cursor: pointer;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    position: relative;
    z-index: 1;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 4px solid transparent;
    background: linear-gradient(#1e293b, #1e293b) padding-box,
                linear-gradient(to right, #60a5fa, #3b82f6) border-box;
    transition: all 0.3s ease;
}

.tool-card::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    padding: 4px;
    background: linear-gradient(45deg, 
        rgba(59, 130, 246, 0.6),
        rgba(96, 165, 250, 0.6),
        rgba(147, 197, 253, 0.6),
        rgba(59, 130, 246, 0.6)
    );
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    animation: borderGradientRotate 4s linear infinite;
}

.tool-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px rgba(59, 130, 246, 0.3);
    border-width: 4px;
}

.tool-card:hover::before {
    opacity: 1;
    background: linear-gradient(45deg,
        rgba(59, 130, 246, 0.8),
        rgba(96, 165, 250, 0.8),
        rgba(147, 197, 253, 0.8),
        rgba(59, 130, 246, 0.8)
    );
}

.tool-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 16px;
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.tool-type {
    position: absolute;
    top: 28px;
    right: 28px;
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.tool-name {
    margin: 0 0 8px 0;
    color: #e2e8f0;
    font-size: 1.4em;
    font-weight: 600;
}

.tool-desc {
    color: #94a3b8;
    font-size: 0.95em;
    line-height: 1.5;
}

.skeleton-card {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(12px);
    padding: 20px;
    border-radius: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.skeleton-card::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    padding: 4px;
    background: linear-gradient(45deg, 
        rgba(59, 130, 246, 0.6),
        rgba(96, 165, 250, 0.6),
        rgba(147, 197, 253, 0.6),
        rgba(59, 130, 246, 0.6)
    );
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    animation: borderGradientRotate 4s linear infinite;
}

.skeleton-image {
    width: 100%;
    height: 180px;
    border-radius: 12px;
    background: linear-gradient(90deg, 
        rgba(49, 60, 78, 0.7) 25%,
        rgba(59, 70, 88, 0.7) 37%,
        rgba(49, 60, 78, 0.7) 63%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
}

.skeleton-type {
    width: 80px;
    height: 24px;
    border-radius: 20px;
    background: linear-gradient(90deg,
        rgba(49, 60, 78, 0.7) 25%,
        rgba(59, 70, 88, 0.7) 37%,
        rgba(49, 60, 78, 0.7) 63%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
    align-self: flex-end;
}

.skeleton-title {
    width: 70%;
    height: 24px;
    border-radius: 6px;
    background: linear-gradient(90deg,
        rgba(49, 60, 78, 0.7) 25%,
        rgba(59, 70, 88, 0.7) 37%,
        rgba(49, 60, 78, 0.7) 63%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
}

.skeleton-desc {
    width: 100%;
    height: 16px;
    border-radius: 6px;
    background: linear-gradient(90deg,
        rgba(49, 60, 78, 0.7) 25%,
        rgba(59, 70, 88, 0.7) 37%,
        rgba(49, 60, 78, 0.7) 63%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
}

footer {
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    justify-content: space-between;
    padding: 20px;
    background: linear-gradient(to bottom, #1e293b, #0f172a);
    border-top: 4px solid transparent;
    background-clip: padding-box;
}

footer::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, #60a5fa, #3b82f6);
}

.footer-content {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(8px);
    padding: 20px 40px;
    border-radius: 12px;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 100%;
}

.footer-content:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
}

.footer-left, .footer-right {
    display: flex;
    align-items: center;
}

.footer-left {
    margin-left: 0;
}

.footer-right {
    margin-right: 0;
}

.footer-right a {
    color: #60a5fa;
    text-decoration: none;
    transition: color 0.3s ease;
    margin: 0 5px;
}

.footer-right a:hover {
    color: #3b82f6;
    text-decoration: underline;
}

footer p {
    background: linear-gradient(to right, #60a5fa, #3b82f6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shimmer 2s infinite linear;
    transition: all 0.3s ease;
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

@keyframes borderGradientRotate {
    0% {
        background: linear-gradient(45deg, 
            rgba(59, 130, 246, 0.6),
            rgba(96, 165, 250, 0.6),
            rgba(147, 197, 253, 0.6),
            rgba(59, 130, 246, 0.6)
        );
    }
    50% {
        background: linear-gradient(225deg,
            rgba(59, 130, 246, 0.6),
            rgba(96, 165, 250, 0.6),
            rgba(147, 197, 253, 0.6),
            rgba(59, 130, 246, 0.6)
        );
    }
    100% {
        background: linear-gradient(405deg,
            rgba(59, 130, 246, 0.6),
            rgba(96, 165, 250, 0.6),
            rgba(147, 197, 253, 0.6),
            rgba(59, 130, 246, 0.6)
        );
    }
}

/* Media Queries */
@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 10px;
    }

    header {
        padding: 20px 0;
    }

    header h1 {
        font-size: 38px;
    }

    h1 {
        font-size: 2.2em;
    }

    .category-nav {
        padding: 12px;
        margin: 0 -10px 20px -10px;
        width: calc(100% + 20px);
        border-radius: 0;
        border: none;
        background: rgba(30, 41, 59, 0.9);
    }

    .category-nav::before {
        display: none;
    }

    .category-btn {
        padding: 8px 16px;
        font-size: 0.9em;
    }

    .tools-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 20px;
        padding: 0;
    }

    .tool-card {
        padding: 16px;
    }

    .tool-image {
        height: 160px;
    }

    .tool-type {
        top: 24px;
        right: 24px;
        padding: 4px 10px;
        font-size: 0.75em;
    }

    .tool-name {
        font-size: 1.2em;
    }

    .tool-desc {
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .container {
        width: 92%;
        padding: 8px;
    }

    header {
        padding: 15px 0;
    }

    header h1 {
        font-size: 30px;
    }

    h1 {
        font-size: 1.8em;
    }

    .category-nav {
        padding: 0 5px;
        gap: 6px;
        margin-bottom: 20px;
    }

    .category-btn {
        padding: 6px 12px;
        font-size: 0.8em;
    }

    .tools-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 12px;
        padding: 0 5px;
    }

    .tool-card {
        padding: 10px;
    }

    .tool-image {
        height: 130px;
    }

    .tool-type {
        font-size: 0.7em;
        padding: 4px 8px;
    }

    .tool-name {
        font-size: 1.1em;
    }

    .tool-desc {
        font-size: 0.8em;
    }

    footer {
        flex-direction: column;
        gap: 5px;
        padding: 8px;
        font-size: 0.8em;
    }
}

@media (hover: none) {
    .tool-card:hover {
        transform: scale(1.02);
    }

    .category-btn {
        -webkit-tap-highlight-color: transparent;
    }

    .category-btn:active {
        background: #19404e;
    }
}

footer a {
    color: #fff;
    text-decoration: none;
    margin-left: 5px;
}
#refer{
    color: #fff;
    text-decoration: none;
    margin-left: 5px;
}

/* Loading Spinner Styles */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
    }
    50% {
        box-shadow: 0 0 25px rgba(59, 130, 246, 0.5);
    }
}

#loading-spinner .border-blue-500 {
    animation: glow 2s ease-in-out infinite;
}

#loading-spinner .bg-blue-500 {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

body.light-theme .tool-desc {
    color: #1a202c; /* Darker color for light theme */
}

body.light-theme .tool-name {
    color: #1a202c;
}

body.light-theme .tool-desc {
    color: #4a5568;
}

body.light-theme .tool-card {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(203, 213, 224, 0.3);
}

body.light-theme #toolDetails .bg-slate-800 {
    background: rgba(255, 255, 255, 0.95);
    color: #1a202c;
    border: 1px solid rgba(203, 213, 224, 0.5);
}

body.light-theme #toolDetails .text-gray-400 {
    color: #4a5568;
}

body.light-theme #toolDetails .text-white {
    color: #1a202c;
}

/* Skeleton Loading Animation - Light Theme */
body.light-theme .skeleton {
    background: #ffffff;
    background: linear-gradient(110deg, #ffffff 8%, #fafafa 18%, #ffffff 33%);
    background-size: 200% 100%;
    animation: 1.5s shine linear infinite;
}

body.light-theme .tool-card.skeleton {
    background: #ffffff;
    background: linear-gradient(110deg, #ffffff 8%, #fafafa 18%, #ffffff 33%);
    border: 1px solid rgb(255, 255, 255);
}

body.light-theme .skeleton .tool-type {
    background: #ffffff;
    border: none;
}

body.light-theme .skeleton .tool-name,
body.light-theme .skeleton .tool-desc {
    background: #ffffff;
    color: transparent;
}

/* Fade in animation for the spinner */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

#loading-spinner {
    animation: fadeInScale 0.3s ease-out;
}

/* Custom gradient animation for the spinning ring */
@keyframes gradientSpin {
    0% {
        transform: rotate(0deg);
        border-top-color: #3b82f6;
        border-right-color: #60a5fa;
    }
    50% {
        border-top-color: #60a5fa;
        border-right-color: #93c5fd;
    }
    100% {
        transform: rotate(360deg);
        border-top-color: #3b82f6;
        border-right-color: #60a5fa;
    }
}

#loading-spinner .animate-spin {
    animation: gradientSpin 1.5s linear infinite;
}

#theme-toggle {
    transition: all 0.3s ease;
    transform: scale(1);
}

#theme-toggle:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .tool-card {
        margin-bottom: 20px;
    }
    
    body.light-theme .tool-card {
        background: rgba(255, 255, 255, 0.95);
    }
    
    body.light-theme #toolDetails .bg-slate-800 {
        margin: 20px;
        max-height: 90vh;
        overflow-y: auto;
    }
}