/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
    color: #1a202c;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    min-height: 100vh;
}

/* Glass morphism effect */
.glass {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

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

/* Header and Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.nav-logo h1 {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-text {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    font-size: 1.8rem;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

.logo-text::before {
    content: "🧮";
    position: absolute;
    left: -2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Logo Image Styling */
.logo-image {
    height: 70px; /* Reduced for better navbar fit */
    width: auto;
    object-fit: contain;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.logo-image:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
}

/* Navbar logo container adjustments */
.nav-logo {
    display: flex;
    align-items: center;
    height: 100%;
    overflow: visible;
    position: relative;
}

.nav-logo a {
    display: flex;
    align-items: center;
    height: 100%;
    overflow: visible;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: #fff;
}

.mobile-menu-toggle {
    display: none;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    padding: 30px 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.8;
}

/* Tools Section */
.tools-section {
    padding: 40px 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.tools-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.tool-card {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    transition: all 0.3s ease;
    color: #fff;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
    background: rgba(30, 41, 59, 0.9);
}

.tool-actions {
    margin-top: 1.2rem;
}

.tool-icon {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
}

.tool-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: #fff;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.tool-card p {
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 1.2rem;
    line-height: 1.6;
    font-size: 0.95rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.tool-btn {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    box-shadow: 0 3px 12px rgba(37, 99, 235, 0.2);
}

.tool-btn:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    color: white;
    text-decoration: none;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
}

.close:hover {
    color: #000;
}

/* Tool Specific Styles */
.tool-container {
    padding: 2rem;
}

.tool-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.tool-header h2 {
    color: #fff;
    margin-bottom: 0.5rem;
    font-size: 2.2rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.tool-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    font-weight: 500;
}

/* Stopwatch Styles */
.stopwatch-display {
    text-align: center;
    margin: 2rem 0;
}

.time-display {
    font-size: 4rem;
    font-weight: 700;
    color: #2563eb;
    font-family: 'Courier New', monospace;
    margin-bottom: 2rem;
}

.stopwatch-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.control-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.start-btn {
    background: #10b981;
    color: white;
}

.start-btn:hover {
    background: #059669;
}

.stop-btn {
    background: #ef4444;
    color: white;
}

.stop-btn:hover {
    background: #dc2626;
}

.reset-btn {
    background: #6b7280;
    color: white;
}

.reset-btn:hover {
    background: #4b5563;
}

.lap-btn {
    background: #2563eb;
    color: white;
}

.lap-btn:hover {
    background: #1d4ed8;
}

.lap-times {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
}

.lap-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.lap-item:last-child {
    border-bottom: none;
}

/* Timer Styles */
.timer-input {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.time-input {
    width: 80px;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
}

.time-input:focus {
    outline: none;
    border-color: #2563eb;
}

.timer-display {
    font-size: 4rem;
    font-weight: 700;
    color: #2563eb;
    font-family: 'Courier New', monospace;
    text-align: center;
    margin: 2rem 0;
}

.timer-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Enhanced Converter Styles */
.converter-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.95rem;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.tab-btn.active {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 3px 12px rgba(37, 99, 235, 0.3);
}

.converter-category {
    display: none;
}

.converter-category.active {
    display: block;
}

.converter-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.converter-group {
    display: flex;
    flex-direction: column;
}

.converter-group label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #fff;
    font-size: 1rem;
}

.converter-group select,
.converter-group input {
    padding: 12px 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.converter-group select:focus,
.converter-group input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.converter-group select option {
    background: #1f2937;
    color: #fff;
}

.conversion-result {
    text-align: center;
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    font-size: 1.3rem;
    font-weight: 600;
    color: #fff;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Calculator Styles */
.calculator {
    max-width: 400px;
    margin: 0 auto;
    background: #1f2937;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.calculator-display {
    background: #000;
    color: #fff;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: right;
    font-size: 2rem;
    font-family: 'Courier New', monospace;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.calculator-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.calc-btn {
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.calc-btn:hover {
    transform: scale(0.95);
}

.number-btn {
    background: #374151;
    color: white;
}

.operator-btn {
    background: #f59e0b;
    color: white;
}

.equals-btn {
    background: #10b981;
    color: white;
}

.clear-btn {
    background: #ef4444;
    color: white;
}

/* Tool Section */
.tool-section {
    padding: 80px 0;
}

.tool-section .tool-container {
    max-width: 1000px;
    margin: 0 auto;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

/* Round Watch Design */
.watch-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.watch-face {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 2rem auto;
    border-radius: 50%;
    background: linear-gradient(135deg, #1f2937, #111827);
    border: 8px solid #374151;
    box-shadow: 0 0 0 4px #4b5563, inset 0 0 0 2px #6b7280, 0 20px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.watch-center {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #333;
    border-radius: 50%;
    z-index: 10;
}

.watch-hand {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: 50% 100%;
    border-radius: 2px;
    z-index: 5;
}

.hour-hand {
    width: 4px;
    height: 60px;
    background: linear-gradient(to top, #ef4444, #dc2626);
    margin-left: -2px;
    margin-top: -60px;
}

.minute-hand {
    width: 3px;
    height: 80px;
    background: linear-gradient(to top, #3b82f6, #2563eb);
    margin-left: -1.5px;
    margin-top: -80px;
}

.second-hand {
    width: 1px;
    height: 90px;
    background: #10b981;
    margin-left: -0.5px;
    margin-top: -90px;
    z-index: 5;
}

.watch-number {
    position: absolute;
    font-weight: bold;
    font-size: 18px;
    color: #333;
    z-index: 3;
}

.digital-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: #10b981;
    padding: 8px 16px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: 600;
    border: 2px solid #10b981;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
    z-index: 15;
}

.watch-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.control-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.btn-icon {
    font-size: 1.2rem;
}

.start-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

.stop-btn {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.stop-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.3);
}

.reset-btn {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
}

.reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 114, 128, 0.3);
}

.lap-btn {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
}

.lap-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}

.lap-times {
    width: 100%;
    max-width: 500px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
}

.lap-times h3 {
    text-align: center;
    margin-bottom: 1rem;
    color: #fff;
    font-size: 1.2rem;
}

.lap-list {
    max-height: 200px;
    overflow-y: auto;
}

.lap-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-weight: 500;
}

.lap-item:last-child {
    margin-bottom: 0;
}

/* Info Section */
.info-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.info-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.info-card {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    text-align: center;
}

.info-card h3 {
    color: #60a5fa;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.info-card p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Ensure text visibility on dark backgrounds */
.tool-section, .tool-container, .info-card, .modal-content, .info-section {
    color: #ffffff;
}

.tool-section h1, .tool-section h2, .tool-section h3, .tool-section h4, .tool-section h5, .tool-section h6,
.info-section h1, .info-section h2, .info-section h3, .info-section h4, .info-section h5, .info-section h6 {
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.tool-section p, .tool-section span, .tool-section div,
.info-section p, .info-section span, .info-section div {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Footer */
footer {
    background: #1f2937;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #f9fafb;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #60a5fa;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    color: #9ca3af;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero, #home, section.hero, section#home, main section.hero, main #home {
        display: none !important; /* Hide hero section on mobile */
        visibility: hidden !important;
        height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
    }
    
    footer, .footer-content, .footer-bottom, body footer, main + footer {
        display: none !important; /* Hide footer on mobile */
        visibility: hidden !important;
        height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
    }
    
    /* Smaller fonts on mobile */
    body {
        font-size: 14px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.3rem;
    }
    
    h3 {
        font-size: 1.1rem;
    }
    
    p {
        font-size: 0.9rem;
    }
    
    .tool-card h3 {
        font-size: 1rem;
    }
    
    .tool-card p {
        font-size: 0.85rem;
    }
    
    .tool-section {
        padding: 40px 0 20px 0; /* Add top padding for individual tool pages */
    }

    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .tool-card {
        padding: 1.2rem;
    }
    
    .tool-icon {
        font-size: 2rem;
        margin-bottom: 0.6rem;
    }
    
    .tool-card h3 {
        font-size: 1.2rem;
        margin-bottom: 0.6rem;
    }
    
    .tool-card p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .converter-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 0 0 16px 16px;
        padding: 1rem 0;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }
    
    .nav-menu.active {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }
    
    .nav-container {
        position: relative;
    }
    
    .mobile-menu-toggle {
        display: block;
        background: none;
        border: none;
        color: #fff;
        font-size: 1.5rem;
        cursor: pointer;
        padding: 0.5rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .time-display,
    .timer-display {
        font-size: 2.5rem;
    }
    
    .tool-section {
        padding: 40px 0;
    }
    
    .tool-section .tool-container {
        padding: 1.5rem;
        border-radius: 16px;
    }
    
    .tab-container {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .tab-btn {
        width: 100%;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero, #home, section.hero, section#home, main section.hero, main #home {
        display: none !important; /* Hide hero section on small mobile */
        visibility: hidden !important;
        height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
    }
    
    footer, .footer-content, .footer-bottom, body footer, main + footer {
        display: none !important; /* Hide footer on small mobile */
        visibility: hidden !important;
        height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
    }
    
    /* Even smaller fonts on small mobile */
    body {
        font-size: 13px;
    }
    
    h1 {
        font-size: 1.3rem;
    }
    
    h2 {
        font-size: 1.1rem;
    }
    
    h3 {
        font-size: 1rem;
    }
    
    p {
        font-size: 0.85rem;
    }
    
    .tool-card h3 {
        font-size: 0.9rem;
    }
    
    .tool-card p {
        font-size: 0.8rem;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .hero-content p {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    
    .tools-section {
        padding: 30px 0 20px 0; /* Add top padding since hero is hidden */
    }
    
    .tool-section {
        padding: 30px 0 20px 0; /* Add top padding for individual tool pages */
    }
    
    footer {
        display: none; /* Hide footer on mobile */
    }
    
    .tool-card {
        padding: 1rem;
    }
    
    .tool-icon {
        font-size: 1.8rem;
    }
    
    .tool-card h3 {
        font-size: 1.1rem;
    }
    
    .tool-card p {
        font-size: 0.85rem;
    }
    
    .tool-section .tool-container {
        padding: 1rem;
    }
    
    .tool-header h2 {
        font-size: 1.8rem;
    }
    
    .tool-header p {
        font-size: 1rem;
    }
}

/* Calculator Button Grouping */
.calculator-buttons {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-top: 15px;
}

.calc-btn {
    padding: 12px 8px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.number-btn {
    background: linear-gradient(135deg, #374151, #4b5563);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.number-btn:hover {
    background: linear-gradient(135deg, #4b5563, #6b7280);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.operator-btn {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.operator-btn:hover {
    background: linear-gradient(135deg, #ef4444, #f87171);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.function-btn {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    font-size: 12px;
}

.function-btn:hover {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.clear-btn {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.clear-btn:hover {
    background: linear-gradient(135deg, #ef4444, #f87171);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.equals-btn {
    background: linear-gradient(135deg, #059669, #10b981);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    font-size: 16px;
    font-weight: 700;
}

.equals-btn:hover {
    background: linear-gradient(135deg, #10b981, #34d399);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}


.calculator-display {
    background: rgba(15, 23, 42, 0.9);
    color: #ffffff;
    padding: 20px;
    border-radius: 12px;
    font-size: 24px;
    font-weight: 600;
    text-align: right;
    margin-bottom: 15px;
    height: 80px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    box-sizing: border-box;
    font-size: clamp(16px, 4vw, 24px);
}

/* Dynamic font sizing for long numbers */
.calculator-display.long-number {
    font-size: clamp(12px, 3vw, 18px);
}

.calculator-display.very-long-number {
    font-size: clamp(10px, 2.5vw, 14px);
}

/* Calculator Layout */
.calculator-container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    align-items: flex-start;
}

.calculator-main {
    flex: 1;
    min-width: 0; /* Allow flex item to shrink */
}

.calculator-history {
    width: 320px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
}

.calculator-history h3 {
    color: #ffffff;
    margin-bottom: 15px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.history-controls {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.clear-history-btn {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.clear-history-btn:hover {
    background: linear-gradient(135deg, #ef4444, #f87171);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.use-result-btn {
    background: linear-gradient(135deg, #059669, #10b981);
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.use-result-btn:hover {
    background: linear-gradient(135deg, #10b981, #34d399);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.history-list {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.history-list::-webkit-scrollbar {
    width: 6px;
}

.history-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.history-entry {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 8px;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.history-entry::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.history-entry:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(4px);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.history-entry:hover::before {
    left: 100%;
}

.history-entry:active {
    transform: translateX(2px) scale(0.98);
}

.history-entry .expression {
    font-weight: 600;
    color: #60a5fa;
    margin-bottom: 4px;
}

.history-entry .result {
    color: #10b981;
    font-weight: 700;
    font-size: 16px;
}

.history-list p {
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    font-style: italic;
    margin: 40px 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
}

/* Mobile responsive */
@media (max-width: 1024px) {
    .calculator-container {
        flex-direction: column;
    }
    
    .calculator-history {
        width: 100%;
        margin-top: 20px;
        position: static;
        max-height: 300px;
    }
}

@media (max-width: 768px) {
    .calculator-history {
        max-height: 250px;
    }
    
    .history-entry {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .history-entry .result {
        font-size: 14px;
    }
}

/* Force hide hero and footer on mobile - ULTRA AGGRESSIVE */
@media (max-width: 768px) {
    .hero, #home, section.hero, section#home, main section.hero, main #home,
    .hero-content, .hero-stats, .hero-title, .hero-description,
    .hero-stats-item, .stat-number, .stat-label {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        max-height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        left: -9999px !important;
        opacity: 0 !important;
        transform: scale(0) !important;
        pointer-events: none !important;
    }
    
    footer, .footer-content, .footer-bottom, body footer, main + footer,
    .footer-section, .footer-links, .footer-copyright {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        max-height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        left: -9999px !important;
        opacity: 0 !important;
        transform: scale(0) !important;
        pointer-events: none !important;
    }
    
    .tools-section {
        padding: 20px 0 !important;
        margin-top: 0 !important;
    }
    
    .tools-section h2 {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
}


/* Expression Input Container */
.expression-input-container {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.expression-input-container label {
    display: block;
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 10px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.expression-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.expression-input-wrapper input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.expression-input-wrapper input:focus {
    outline: none;
    border-color: #3b82f6;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.expression-input-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.solve-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #059669, #10b981);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.solve-btn:hover {
    background: linear-gradient(135deg, #10b981, #34d399);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.expression-result {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
}

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

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

/* BCrypt Generator Specific Styles */
.salt-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.salt-controls input[type="range"] {
    flex: 1;
    margin: 0;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.salt-controls input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.4);
    border: 2px solid #ffffff;
}

.salt-controls input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.4);
    border: 2px solid #ffffff;
}

.salt-controls input[type="range"]::-webkit-slider-track {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    height: 6px;
}

.salt-controls input[type="range"]::-moz-range-track {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    height: 6px;
    border: none;
}

.salt-value {
    color: #60a5fa !important;
    font-weight: 600;
    font-size: 1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.salt-info {
    margin-top: 5px;
}

.salt-info small {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 0.85rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.bcrypt-section label {
    color: #ffffff !important;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    margin-bottom: 8px;
    display: block;
}

.section-header h3 {
    color: #60a5fa !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.section-header p {
    color: rgba(255, 255, 255, 0.9) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Timer Clock UI Improvements */
.timer-display {
    background: rgba(15, 23, 42, 0.9) !important;
    color: #ffffff !important;
    padding: 30px !important;
    border-radius: 20px !important;
    font-size: 3rem !important;
    font-weight: 700 !important;
    text-align: center !important;
    margin: 20px 0 !important;
    min-height: 120px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(20px) !important;
}

/* Timer digital display inside watch face - match stopwatch exactly */
#timer-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: #10b981;
    padding: 8px 16px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: 600;
    border: 2px solid #10b981;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
    z-index: 15;
}

/* Ensure timer watch face matches stopwatch exactly */
.timer-container .watch-face {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 2rem auto;
    border-radius: 50%;
    background: linear-gradient(135deg, #1f2937, #111827) !important;
    border: 8px solid #374151 !important;
    box-shadow: 0 0 0 4px #4b5563, inset 0 0 0 2px #6b7280, 0 20px 40px rgba(0, 0, 0, 0.3) !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timer-display.running {
    background: rgba(59, 130, 246, 0.2) !important;
    border-color: rgba(59, 130, 246, 0.5) !important;
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.3) !important;
}

.timer-display.paused {
    background: rgba(59, 130, 246, 0.2) !important;
    border-color: rgba(59, 130, 246, 0.5) !important;
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.3) !important;
}

.timer-display.finished {
    background: rgba(59, 130, 246, 0.2) !important;
    border-color: rgba(59, 130, 246, 0.5) !important;
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.3) !important;
}

/* Stopwatch Display */
.stopwatch-display {
    background: rgba(15, 23, 42, 0.9) !important;
    color: #ffffff !important;
    padding: 30px !important;
    border-radius: 20px !important;
    font-size: 3rem !important;
    font-weight: 700 !important;
    text-align: center !important;
    margin: 20px 0 !important;
    min-height: 120px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(20px) !important;
}

.stopwatch-display.running {
    background: rgba(59, 130, 246, 0.2) !important;
    border-color: rgba(59, 130, 246, 0.5) !important;
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.3) !important;
}

/* Mobile responsive for timer displays */
@media (max-width: 768px) {
    .timer-display, .stopwatch-display {
        font-size: 2.5rem !important;
        padding: 20px !important;
        min-height: 100px !important;
    }
}

@media (max-width: 480px) {
    .timer-display, .stopwatch-display {
        font-size: 2rem !important;
        padding: 15px !important;
        min-height: 80px !important;
    }
}

/* Info cards with glass class */
.info-card.glass {
    background: rgba(15, 23, 42, 0.8) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4) !important;
}

.info-card.glass h3 {
    color: #60a5fa !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    font-weight: 600 !important;
}

.info-card.glass p {
    color: rgba(255, 255, 255, 0.9) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
    line-height: 1.6 !important;
}

/* Force hide hero and footer on mobile - highest priority */
@media screen and (max-width: 768px) {
    section#home,
    section.hero,
    .hero,
    #home,
    main section.hero,
    main #home {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        max-height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        left: -9999px !important;
        opacity: 0 !important;
    }
    
    footer,
    body footer,
    main + footer {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        max-height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        left: -9999px !important;
        opacity: 0 !important;
    }
}

/* Additional mobile hiding rules */
@media (max-width: 768px) {
    .hero, #home, section.hero, section#home, main section.hero, main #home {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        max-height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        left: -9999px !important;
        opacity: 0 !important;
    }
    
    footer, body footer, main + footer {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        max-height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        left: -9999px !important;
        opacity: 0 !important;
    }
}
