/* Tools Specific Styles - Enhanced with Sophisticated Color Palette */
.tools-hero {
    background: linear-gradient(135deg, rgba(100, 181, 246, 0.85) 0%, rgba(66, 165, 245, 0.8) 100%), 
                linear-gradient(45deg, rgba(121, 134, 203, 0.4) 0%, rgba(92, 107, 192, 0.3) 100%),
                url('https://images.unsplash.com/photo-1590753684039-6adc03c5d6dc?q=80&w=1330&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D') center/cover;
    color: white;
    padding: 100px 0 80px;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    overflow: hidden;
    animation: gradientShift 10s ease infinite alternate;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

.tools-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(255, 215, 0, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(121, 134, 203, 0.08) 0%, transparent 50%);
    pointer-events: none;
    animation: float 20s ease-in-out infinite alternate;
}

@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-10px, -10px) rotate(1deg); }
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    display: inline-block;
    background: linear-gradient(45deg, #ffffff, #e3f2fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 10px rgba(100, 181, 246, 0.5), 0 0 20px rgba(66, 165, 245, 0.3); }
    to { text-shadow: 0 0 15px rgba(100, 181, 246, 0.7), 0 0 25px rgba(66, 165, 245, 0.5); }
}

.hero-content h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #64b5f6, #798ecb);
    border-radius: 2px;
    animation: widthPulse 2s ease-in-out infinite;
}

@keyframes widthPulse {
    0%, 100% { width: 100px; }
    50% { width: 120px; }
}

.hero-content > p {
    font-size: 1.4rem;
    margin-bottom: 50px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.95;
    line-height: 1.6;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
    margin-top: 40px;
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

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

.stat {
    text-align: center;
    position: relative;
    padding: 0 20px;
    transition: transform 0.3s ease;
}

.stat:hover {
    transform: translateY(-5px);
}

.stat::after {
    content: '';
    position: absolute;
    right: -30px;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.5), transparent);
}

.stat:last-child::after {
    display: none;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: inline-block;
    animation: countUp 1s ease-out;
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #e8f4fd;
}

/* Tools Navigation - Enhanced with Sophisticated Colors */
.tools-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 50px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0 20px;
}

.tool-nav-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    border: 2px solid #e3f2fd;
    background: white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    color: #455a64;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(100, 181, 246, 0.1);
}

.tool-nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    transition: left 0.7s ease;
}

.tool-nav-btn:hover::before {
    left: 100%;
}

.tool-nav-btn.active {
    background: linear-gradient(135deg, #64b5f6, #798ecb);
    color: white;
    border-color: transparent;
    box-shadow: 0 8px 25px rgba(100, 181, 246, 0.4);
    transform: translateY(-2px);
}

.tool-nav-btn:hover:not(.active) {
    border-color: #64b5f6;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(100, 181, 246, 0.2);
}

.tool-nav-btn i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.tool-nav-btn:hover i {
    transform: scale(1.1);
}
/* ===== TOP BAR ===== */
.top-bar {
    background: #1a237e;
    color: white;
    padding: 10px 0;
    font-size: 0.9rem;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    color: white;
    font-size: 1rem;
    transition: color 0.3s;
}

.social-icons a:hover {
    color: #bbdefb;
}

.contact-info {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.contact-info span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ===== NAVIGATION BAR (NEW STYLE - SAME AS PDF LIBRARY) ===== */
.navbar {
    background: white;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0;
    margin: 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* Logo Styles */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #1a237e;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: translateY(-2px);
}

.logo-icon {
    font-size: 2rem;
    font-weight: normal;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #1a237e, #3949ab);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
    padding: 0;
}

/* Navigation Links */
.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: #475569;
    font-weight: 500;
    padding: 8px 0;
    position: relative;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: #1a237e;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #1a237e, #3949ab);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* Search Bar */
.search-bar {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    min-width: 250px;
}

.search-bar:focus-within {
    border-color: #1a237e;
    box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.1);
}

.search-bar input {
    padding: 10px 15px;
    border: none;
    background: transparent;
    flex: 1;
    outline: none;
    font-size: 0.95rem;
    min-width: 0;
}

.search-bar input::placeholder {
    color: #64748b;
}

.search-bar button {
    padding: 10px 15px;
    background: #1a237e;
    color: white;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-bar button:hover {
    background: #283593;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #1a237e;
    cursor: pointer;
    padding: 8px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
    background: #f1f5f9;
    transform: rotate(90deg);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    z-index: 2000;
    padding: 100px 20px 40px;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.mobile-menu.active {
    display: block;
    transform: translateX(0);
}

.mobile-menu .nav-links {
    flex-direction: column;
    gap: 25px;
    align-items: center;
}

.mobile-menu .nav-links a {
    font-size: 1.2rem;
    padding: 10px 20px;
    border-radius: 8px;
    width: 100%;
    text-align: center;
    transition: all 0.3s ease;
}

.mobile-menu .nav-links a:hover,
.mobile-menu .nav-links a.active {
    background: #eef2ff;
    color: #1a237e;
}

.mobile-menu .nav-links a::after {
    display: none;
}

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1999;
    backdrop-filter: blur(3px);
}

.mobile-overlay.active {
    display: block;
}

/* Responsive Design for Navigation Only */
@media (max-width: 992px) {
    .search-bar {
        min-width: 200px;
    }
    
    .nav-links {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .nav-links,
    .search-bar {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-container {
        padding: 12px 20px;
    }
    
    .logo h1 {
        font-size: 1.6rem;
    }
    
    .logo-icon {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 10px 15px;
    }
    
    .logo h1 {
        font-size: 1.4rem;
    }
    
    .logo-icon {
        font-size: 1.6rem;
    }
    
    .mobile-menu {
        padding: 80px 20px 40px;
    }
    
    .mobile-menu .nav-links a {
        font-size: 1.1rem;
        padding: 12px 15px;
    }
    
    .top-bar-content {
        justify-content: center;
    }
    
    .contact-info {
        display: none;
    }
}
/* Difficulty Filter - Enhanced */
.difficulty-filter-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    animation: fadeIn 0.5s ease-out;
}

.difficulty-filter {
    padding: 8px 20px;
    border: 2px solid #e8f4fd;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    color: #546e7a;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

.difficulty-filter:hover {
    border-color: #64b5f6;
    color: #42a5f5;
    transform: translateY(-2px);
}

.difficulty-filter.active {
    background: linear-gradient(135deg, #64b5f6, #42a5f5);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(66, 165, 245, 0.3);
}

/* Tools Grid Section - Enhanced */
.tools-grid-section {
    margin-bottom: 80px;
    padding: 0 20px;
}

.tool-counter {
    background: linear-gradient(135deg, #ffffff, #f8fdff);
    padding: 15px 25px;
    border-radius: 25px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #42a5f5;
    margin: 20px 0;
    box-shadow: 0 6px 20px rgba(100, 181, 246, 0.15);
    border: 2px solid #e8f4fd;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.tool-counter:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(100, 181, 246, 0.25);
    border-color: #64b5f6;
}

.tool-counter i {
    color: #42a5f5;
    font-size: 1.2rem;
    animation: floatIcon 3s ease-in-out infinite;
}

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

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 30px;
}

.tool-card {
    background: linear-gradient(135deg, #ffffff, #fafdff);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(100, 181, 246, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid #f0f9ff;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    backdrop-filter: blur(10px);
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #64b5f6, #798ecb);
    transform: scaleX(0);
    transition: transform 0.5s ease;
}

.tool-card:hover::before {
    transform: scaleX(1);
}

.tool-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(100, 181, 246, 0.2);
    border-color: #64b5f6;
}

.tool-number {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #64b5f6, #42a5f5);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(66, 165, 245, 0.3);
    z-index: 1;
    transition: all 0.3s ease;
}

.tool-card:hover .tool-number {
    transform: scale(1.1) rotate(5deg);
}

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

.category-badge {
    padding: 6px 14px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.tool-card:hover .category-badge {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Updated Category Colors with Sophisticated Palette */
.clinical-badge {
    background: linear-gradient(135deg, rgba(77, 182, 172, 0.15), rgba(77, 182, 172, 0.25));
    color: #26a69a;
    border: 1px solid rgba(77, 182, 172, 0.3);
}

.stats-badge {
    background: linear-gradient(135deg, rgba(121, 134, 203, 0.15), rgba(121, 134, 203, 0.25));
    color: #5c6bc0;
    border: 1px solid rgba(121, 134, 203, 0.3);
}

.lab-badge {
    background: linear-gradient(135deg, rgba(102, 187, 106, 0.15), rgba(102, 187, 106, 0.25));
    color: #4caf50;
    border: 1px solid rgba(102, 187, 106, 0.3);
}

.bioinfo-badge {
    background: linear-gradient(135deg, rgba(249, 168, 37, 0.15), rgba(249, 168, 37, 0.25));
    color: #ff9800;
    border: 1px solid rgba(249, 168, 37, 0.3);
}

.writing-badge {
    background: linear-gradient(135deg, rgba(171, 71, 188, 0.15), rgba(171, 71, 188, 0.25));
    color: #9c27b0;
    border: 1px solid rgba(171, 71, 188, 0.3);
}

.tool-difficulty {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.tool-difficulty.beginner {
    background: linear-gradient(135deg, rgba(102, 187, 106, 0.15), rgba(102, 187, 106, 0.25));
    color: #388e3c;
    border: 1px solid rgba(102, 187, 106, 0.3);
}

.tool-difficulty.intermediate {
    background: linear-gradient(135deg, rgba(249, 168, 37, 0.15), rgba(249, 168, 37, 0.25));
    color: #f57c00;
    border: 1px solid rgba(249, 168, 37, 0.3);
}

.tool-difficulty.advanced {
    background: linear-gradient(135deg, rgba(239, 83, 80, 0.15), rgba(239, 83, 80, 0.25));
    color: #d32f2f;
    border: 1px solid rgba(239, 83, 80, 0.3);
}

.tool-card h3 {
    background: linear-gradient(45deg, #42a5f5, #5c6bc0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    font-size: 1.5rem;
    line-height: 1.3;
    font-weight: 700;
}

.tool-card > p {
    color: #546e7a;
    margin-bottom: 20px;
    line-height: 1.6;
    font-size: 0.95rem;
    flex-grow: 1;
}

.tool-inputs {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-weight: 600;
    color: #455a64;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.input-group label::after {
    content: '🔬';
    font-size: 0.8rem;
    margin-left: 2px;
    opacity: 0.7;
}

.input-group label:has(+ :not([required]))::after {
    content: '';
    display: none;
}

.tool-input,
.tool-select,
.tool-textarea {
    padding: 14px 18px;
    border: 2px solid #e8f4fd;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    background: rgba(255, 255, 255, 0.9);
    color: #455a64;
}

.tool-input:focus,
.tool-select:focus,
.tool-textarea:focus {
    border-color: #64b5f6;
    outline: none;
    box-shadow: 0 0 0 4px rgba(100, 181, 246, 0.15);
    transform: translateY(-2px);
    background: white;
}

.tool-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2342a5f5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    padding-right: 45px;
}

.tool-textarea {
    min-height: 100px;
    resize: vertical;
    line-height: 1.5;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #455a64;
    user-select: none;
    transition: color 0.3s ease;
}

.checkbox-label:hover {
    color: #42a5f5;
}

.tool-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #42a5f5;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.tool-checkbox:hover {
    transform: scale(1.1);
}

.tool-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    margin-top: auto;
}

.tool-actions .btn {
    flex: 1;
    padding: 14px 20px;
    font-size: 0.95rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    position: relative;
    overflow: hidden;
}

.tool-actions .btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.tool-actions .btn:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    20% {
        transform: scale(25, 25);
        opacity: 0.3;
    }
    100% {
        opacity: 0;
        transform: scale(40, 40);
    }
}

.tool-btn {
    background: linear-gradient(135deg, #64b5f6, #42a5f5);
    color: white;
    box-shadow: 0 6px 20px rgba(66, 165, 245, 0.3);
}

.tool-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 30px rgba(66, 165, 245, 0.4);
}

.tutorial-btn {
    background: linear-gradient(135deg, #798ecb, #5c6bc0);
    color: white;
    box-shadow: 0 6px 20px rgba(92, 107, 192, 0.3);
}

.tutorial-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 30px rgba(92, 107, 192, 0.4);
}

.example-btn {
    background: linear-gradient(135deg, #4db6ac, #26a69a);
    color: white;
    box-shadow: 0 6px 20px rgba(38, 166, 154, 0.3);
}

.example-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 30px rgba(38, 166, 154, 0.4);
}

/* Enhanced Result Box */
.result-box {
    margin-top: 20px;
    padding: 20px;
    border-radius: 12px;
    display: none;
    animation: fadeIn 0.4s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.result-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.1));
    pointer-events: none;
}

.result-box.active {
    display: block;
}

.result-success {
    background: linear-gradient(135deg, rgba(102, 187, 106, 0.15), rgba(76, 175, 80, 0.1));
    border-color: rgba(76, 175, 80, 0.3);
    color: #2e7d32;
}

.result-info {
    background: linear-gradient(135deg, rgba(100, 181, 246, 0.15), rgba(66, 165, 245, 0.1));
    border-color: rgba(66, 165, 245, 0.3);
    color: #1565c0;
}

.result-warning {
    background: linear-gradient(135deg, rgba(249, 168, 37, 0.15), rgba(255, 152, 0, 0.1));
    border-color: rgba(255, 152, 0, 0.3);
    color: #ef6c00;
}

.result-error {
    background: linear-gradient(135deg, rgba(239, 83, 80, 0.15), rgba(244, 67, 54, 0.1));
    border-color: rgba(244, 67, 54, 0.3);
    color: #c62828;
}

.result-box h4 {
    margin-top: 0;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
}

.result-box h4 i {
    font-size: 1.1rem;
}

.result-box p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.result-box strong {
    color: inherit;
    opacity: 0.9;
    background: linear-gradient(45deg, currentColor, currentColor);
    -webkit-background-clip: text;
    background-clip: text;
}

/* Stats Table for Statistical Results */
.stats-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 15px 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #e8f4fd;
}

.stats-table th {
    background: linear-gradient(135deg, #64b5f6, #42a5f5);
    color: white;
    padding: 14px 18px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
}

.stats-table td {
    padding: 12px 18px;
    border-bottom: 1px solid #f0f9ff;
    color: #455a64;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.stats-table tr:last-child td {
    border-bottom: none;
}

.stats-table tr:hover td {
    background: rgba(100, 181, 246, 0.08);
}

/* Enhanced Sequence Box */
.sequence-box {
    background: linear-gradient(135deg, #2c3e50, #37474f);
    color: #eceff1;
    padding: 20px;
    border-radius: 12px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    overflow-x: auto;
    margin: 10px 0;
    white-space: pre-wrap;
    word-break: break-all;
    border: 1px solid #455a64;
    position: relative;
}

.sequence-box::before {
    content: '🧬 Sequence:';
    display: block;
    color: #4fc3f7;
    font-size: 0.8rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Enhanced Citation and Writing Boxes */
.citation-box,
.abstract-box,
.acknowledgement-box,
.ethics-statement,
.data-statement,
.figure-legend,
.supplementary-template,
.contributions-box,
.disclosure-box,
.funding-box,
.keywords-box {
    background: linear-gradient(135deg, #f8fdff, #f5faff);
    padding: 25px;
    border-radius: 12px;
    margin: 15px 0;
    border-left: 4px solid #64b5f6;
    font-style: italic;
    line-height: 1.7;
    color: #455a64;
    box-shadow: 0 4px 12px rgba(100, 181, 246, 0.08);
    position: relative;
}

/* Quick Tools Section */
.quick-tools-section {
    margin-bottom: 80px;
    padding: 0 20px;
}

.section-title {
    background: linear-gradient(45deg, #42a5f5, #5c6bc0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.5rem;
    margin-bottom: 40px;
    text-align: center;
    position: relative;
    padding-bottom: 20px;
    font-weight: 800;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #64b5f6, #798ecb);
    border-radius: 2px;
    animation: widthPulse 2s ease-in-out infinite;
}

.quick-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.quick-tool-card {
    background: linear-gradient(135deg, #ffffff, #fafdff);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 25px rgba(100, 181, 246, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid #f0f9ff;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.quick-tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #64b5f6, #798ecb);
}

.quick-tool-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(100, 181, 246, 0.2);
    border-color: #64b5f6;
}

.quick-tool-card h4 {
    background: linear-gradient(45deg, #42a5f5, #5c6bc0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 25px;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
}

.quick-tool-card h4 i {
    background: linear-gradient(45deg, #42a5f5, #5c6bc0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.5rem;
}

.quick-input-group {
    margin-bottom: 20px;
}

.quick-input-group:last-child {
    margin-bottom: 0;
}

.quick-btn {
    background: linear-gradient(135deg, #64b5f6, #42a5f5);
    color: white;
    border: none;
    padding: 14px 25px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    margin-top: 15px;
    box-shadow: 0 6px 20px rgba(66, 165, 245, 0.3);
    position: relative;
    overflow: hidden;
}

.quick-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 30px rgba(66, 165, 245, 0.4);
}

/* Modal Styles - Enhanced */
#toolModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

#toolModal.active {
    display: flex;
}

.modal-content {
    background: linear-gradient(135deg, #ffffff, #fafdff);
    border-radius: 20px;
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 40px;
    position: relative;
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 25px 50px rgba(100, 181, 246, 0.3);
    border: 2px solid #f0f9ff;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(100, 181, 246, 0.1);
    border: 2px solid #e8f4fd;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #42a5f5;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
}

.close-modal:hover {
    background: #42a5f5;
    border-color: #42a5f5;
    color: white;
    transform: rotate(90deg);
}

#modalToolName {
    background: linear-gradient(45deg, #42a5f5, #5c6bc0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 25px;
    font-size: 2rem;
    padding-right: 40px;
    border-bottom: 2px solid #e8f4fd;
    padding-bottom: 15px;
    font-weight: 700;
}

#modalContent {
    line-height: 1.7;
    color: #455a64;
}

#modalContent h3 {
    background: linear-gradient(45deg, #42a5f5, #5c6bc0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 25px 0 15px;
    font-size: 1.4rem;
    font-weight: 600;
}

#modalContent p {
    margin-bottom: 20px;
}

#modalContent ul, #modalContent ol {
    margin: 15px 0 25px 25px;
}

#modalContent li {
    margin-bottom: 10px;
    position: relative;
}

#modalContent li::before {
    content: '🔬';
    position: absolute;
    left: -25px;
    top: 2px;
    font-size: 0.8rem;
}

/* Enhanced Search Bar */
.search-container {
    max-width: 600px;
    margin: 0 auto 40px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 16px 20px 16px 55px;
    border: 2px solid #e8f4fd;
    border-radius: 30px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%2342a5f5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E") no-repeat 25px center;
    color: #455a64;
    box-shadow: 0 4px 15px rgba(100, 181, 246, 0.1);
}

.search-input:focus {
    border-color: #64b5f6;
    outline: none;
    box-shadow: 0 0 0 4px rgba(100, 181, 246, 0.15), 0 8px 25px rgba(100, 181, 246, 0.2);
    padding-left: 60px;
}

.search-button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #64b5f6, #42a5f5);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(66, 165, 245, 0.3);
}

.search-button:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 8px 25px rgba(66, 165, 245, 0.4);
}

/* Enhanced Animations */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(15px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes modalSlideIn {
    from { 
        opacity: 0; 
        transform: translateY(-60px) scale(0.95); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 1200px) {
    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
}

@media (max-width: 992px) {
    .hero-content h1 {
        font-size: 2.8rem;
    }
    
    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
    
    .quick-tools-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    .stat::after {
        display: none;
    }
    
    .stat {
        padding: 15px;
        margin: 10px;
        min-width: 150px;
    }
    
    .hero-stats {
        gap: 20px;
        justify-content: space-around;
    }
}

@media (max-width: 768px) {
    .tools-hero {
        padding: 70px 0 40px;
    }
    
    .hero-content h1 {
        font-size: 2.4rem;
        padding: 0 15px;
    }
    
    .hero-content > p {
        font-size: 1.2rem;
        padding: 0 15px;
    }
    
    .hero-stats {
        gap: 15px;
        margin-top: 30px;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .stat-label {
        font-size: 1rem;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .tool-card {
        padding: 22px;
        border-radius: 18px;
    }
    
    .tool-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .tool-actions .btn {
        width: 100%;
    }
    
    .modal-content {
        padding: 30px 20px;
        width: 95%;
        border-radius: 18px;
    }
    
    #modalToolName {
        font-size: 1.6rem;
    }
    
    .tools-nav {
        gap: 8px;
        padding: 0 15px;
    }
    
    .tool-nav-btn {
        padding: 10px 18px;
        font-size: 0.9rem;
        min-width: 45px;
        justify-content: center;
    }
    
    .tool-nav-btn span {
        display: inline;
    }
    
    .tool-nav-btn i {
        font-size: 1.2rem;
    }
    
    .search-input {
        padding: 14px 15px 14px 50px;
        font-size: 0.95rem;
    }
    
    .search-button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .tools-hero {
        padding: 50px 0 30px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content > p {
        font-size: 1.1rem;
    }
    
    .hero-stats {
        flex-direction: column;
        align-items: center;
        gap: 25px;
    }
    
    .stat {
        min-width: 120px;
        padding: 10px;
    }
    
    .tools-grid-section,
    .quick-tools-section {
        padding: 0 15px;
    }
    
    .tool-card {
        padding: 18px;
        border-radius: 16px;
    }
    
    .tool-inputs {
        gap: 12px;
    }
    
    .tool-input,
    .tool-select,
    .tool-textarea {
        padding: 12px 15px;
        font-size: 0.9rem;
        border-radius: 10px;
    }
    
    .tool-actions .btn {
        padding: 12px 15px;
        font-size: 0.9rem;
        border-radius: 10px;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 30px;
    }
    
    .quick-tool-card {
        padding: 22px;
        border-radius: 16px;
    }
    
    .modal-content {
        padding: 25px 18px;
        width: 98%;
        max-height: 90vh;
    }
    
    .search-input {
        padding: 12px 15px 12px 45px;
        font-size: 0.9rem;
    }
    
    .search-button {
        padding: 9px 18px;
        font-size: 0.85rem;
    }
    
    /* Better touch targets */
    .tool-nav-btn,
    .difficulty-filter,
    .tool-checkbox,
    .quick-btn,
    .tool-actions .btn {
        min-height: 44px;
    }
    
    /* Improve readability on small screens */
    .tool-card h3 {
        font-size: 1.3rem;
    }
    
    .tool-card > p {
        font-size: 0.9rem;
    }
    
    .category-badge,
    .tool-difficulty {
        font-size: 0.75rem;
        padding: 4px 10px;
    }
}

/* Loading State - Enhanced */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading::before {
    content: '🔬';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    animation: float 1.5s ease-in-out infinite;
}

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

/* Print Styles */
@media print {
    .tools-hero,
    .tools-nav,
    .tool-actions,
    .search-container,
    .quick-tools-section {
        display: none;
    }
    
    .tool-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
        background: white !important;
    }
    
    .result-box {
        display: block !important;
        background: white !important;
        border: 1px solid #ddd !important;
        color: black !important;
    }
    
    /* Ensure text is black for printing */
    .tool-card h3,
    .tool-card > p,
    .result-box * {
        color: black !important;
        background: none !important;
        -webkit-text-fill-color: black !important;
        text-fill-color: black !important;
    }
}

/* Additional Mobile Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .tool-card:hover,
    .tool-nav-btn:hover:not(.active),
    .difficulty-filter:hover,
    .tool-actions .btn:hover,
    .quick-btn:hover,
    .quick-tool-card:hover {
        transform: none;
    }
    
    /* Increase tap targets */
    .tool-nav-btn,
    .difficulty-filter,
    .tool-actions .btn,
    .quick-btn,
    .tool-checkbox,
    .close-modal {
        min-height: 48px;
        min-width: 48px;
    }
    
    /* Prevent zoom on input focus */
    input, select, textarea {
        font-size: 16px;
    }
}

/* Dark mode adjustments for better readability */
@media (prefers-color-scheme: dark) {
    .tool-card,
    .quick-tool-card,
    .modal-content {
        background: linear-gradient(135deg, #263238, #1c2527);
        border-color: #37474f;
        color: #eceff1;
    }
    
    .tool-input,
    .tool-select,
    .tool-textarea {
        background: rgba(38, 50, 56, 0.8);
        border-color: #546e7a;
        color: #eceff1;
    }
    
    .tool-input:focus,
    .tool-select:focus,
    .tool-textarea:focus {
        background: rgba(48, 60, 66, 0.8);
    }
    
    .tool-card h3,
    .quick-tool-card h4,
    .section-title,
    #modalToolName,
    #modalContent h3 {
        background: linear-gradient(45deg, #4fc3f7, #7986cb);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
}
