/* Import common styles */
@import url('common.css');

/* Page-specific styles for lookup functionality */

/* Container */
        .container {
            max-width: var(--max-width);
            margin: 0 auto;
            padding: 0 20px;
        }

        /* Header */
        .header {
            background-color: white;
            border-bottom: 1px solid var(--gray-200);
            position: sticky;
            top: 0;
            z-index: 100;
            backdrop-filter: blur(10px);
            background-color: rgba(255, 255, 255, 0.9);
        }

        .header-content {
            height: 64px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .logo {
            font-size: 20px;
            font-weight: 700;
            color: var(--gray-900);
            display: flex;
            align-items: center;
            gap: 10px;
            text-decoration: none;
            transition: opacity 0.2s;
        }
        
        a.logo:hover {
            opacity: 0.8;
        }

        .logo-icon {
            width: 32px;
            height: 32px;
            background-color: var(--brand-primary);
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .nav-links {
            display: flex;
            gap: 32px;
            align-items: center;
        }

        .nav-toggle {
            display: none;
            background: none;
            border: none;
            cursor: pointer;
            padding: 8px;
            color: var(--gray-700);
            transition: color 0.2s;
        }

        .nav-toggle:hover {
            color: var(--gray-900);
        }

        .nav-link {
            font-size: 14px;
            font-weight: 500;
            color: var(--gray-600);
            text-decoration: none;
            transition: color 0.2s;
        }

        .nav-link:hover {
            color: var(--gray-900);
        }

        /* Hero Section */
        .hero {
            padding: 80px 20px 60px;
            text-align: center;
            background-color: white;
            border-bottom: 1px solid var(--gray-200);
        }

        .hero-badge {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 4px 12px;
            background-color: var(--gray-100);
            color: var(--gray-700);
            border-radius: 999px;
            font-size: 13px;
            font-weight: 600;
            margin-bottom: 16px;
        }

        .badge-dot {
            width: 6px;
            height: 6px;
            background-color: var(--green);
            border-radius: 50%;
            animation: pulse 2s infinite;
        }

        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }

        .hero-title {
            font-size: 48px;
            font-weight: 800;
            line-height: 1.1;
            color: var(--gray-900);
            margin-bottom: 16px;
            letter-spacing: -0.02em;
        }

        .hero-subtitle {
            font-size: 20px;
            color: var(--gray-600);
            max-width: 600px;
            margin: 0 auto;
        }

        /* Main Content */
        .main {
            padding: 48px 0;
        }

        /* Lookup Card */
        .lookup-card {
            background-color: white;
            border: 1px solid var(--gray-200);
            border-radius: var(--radius-lg);
            padding: 24px;  /* Changed from 32px to match feature cards */
            box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
            margin-bottom: 24px;
        }

        /* Form */
        .form-group {
            margin-bottom: 24px;
        }

        .form-label {
            display: block;
            font-size: 14px;
            font-weight: 600;
            color: var(--gray-700);
            margin-bottom: 8px;
        }

        .input-group {
            position: relative;
            display: flex;
            gap: 12px;
        }

        .form-input {
            flex: 1;
            height: 48px;
            padding: 0 48px 0 16px;
            background-color: var(--gray-50);
            border: 2px solid var(--gray-200);
            border-radius: var(--radius);
            font-size: 16px;
            font-family: var(--font-mono);
            color: var(--gray-900);
            transition: all 0.2s;
            -webkit-appearance: none; /* Remove iOS default styling */
            -moz-appearance: none;
            appearance: none;
            min-height: 48px; /* Ensure minimum height */
            box-sizing: border-box; /* Include padding and border in height */
        }

        .form-input:focus {
            outline: none;
            background-color: white;
            border-color: var(--gray-900);
            box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.1);
        }

        .form-input::placeholder {
            color: var(--gray-400);
        }

        .form-hint {
            display: flex;
            align-items: center;
            gap: 6px;
            margin-top: 8px;
            font-size: 13px;
            color: var(--gray-500);
        }

        .form-hint i {
            font-size: 14px;
        }

        .hash-examples {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-top: 8px;
            font-size: 13px;
            flex-wrap: wrap;  /* Allow wrapping to next line */
        }

        .examples-label {
            color: var(--gray-500);
        }

        .hash-example {
            color: var(--brand-primary);
            text-decoration: none;
            font-family: var(--font-mono);
            font-size: 12px;
            padding: 2px 6px;
            border-radius: var(--radius-sm);
            transition: all 0.2s;
            white-space: nowrap;  /* Prevent individual hashes from breaking */
        }

        .hash-example:hover {
            background-color: var(--gray-100);
            color: var(--gray-900);
        }

        .form-error {
            display: none;
            align-items: center;
            gap: 6px;
            margin-top: 8px;
            font-size: 13px;
            color: var(--error);
        }

        .form-error i {
            font-size: 14px;
        }

        .form-error.show {
            display: flex;
        }

        /* New inline button design */
        .input-with-button {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .input-with-button .form-input {
            flex: 1;
            padding: 0 16px; /* Normal padding since button is outside */
        }

        .btn-search {
            height: 48px;
            width: 48px;
            background-color: var(--gray-900);
            color: white;
            border: none;
            border-radius: var(--radius);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
            font-size: 18px;
            flex-shrink: 0;
        }

        .btn-search:hover {
            background-color: var(--gray-800);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        }

        .btn-search:active {
            transform: translateY(0);
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        .btn-search:disabled {
            background-color: var(--gray-400);
            cursor: not-allowed;
            transform: none;
            box-shadow: none;
        }

        
        
        
        
        
        /* Loading Spinner */
        .spinner {
            width: 16px;
            height: 16px;
            border: 2px solid currentColor;
            border-right-color: transparent;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }

        /* HTMX Indicator - HTMX automatically shows/hides based on hx-indicator */
        .htmx-indicator {
            display: none;
        }
        
        /* When form has htmx-request class, hide search icon */
        .htmx-request .btn-search .fas.fa-search {
            display: none !important;
        }

        .htmx-request .htmx-indicator {
            display: inline-block;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        /* Result Box */
        .result-box {
            display: none;
            background-color: var(--gray-50);
            border: 1px solid var(--gray-200);
            border-radius: var(--radius);
            padding: 24px;
            margin-top: 24px;
        }

        .result-box.show {
            display: block;
            animation: slideIn 0.3s ease-out;
        }

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

        .result-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 16px;
        }

        .result-label {
            font-size: 12px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: var(--gray-500);
        }

        .result-value {
            font-size: 18px;
            font-weight: 500;
            color: var(--gray-900);
            font-family: var(--font-mono);
            word-break: break-all;
            padding: 16px;
            background-color: white;
            border: 1px solid var(--gray-200);
            border-radius: 6px;
            margin-bottom: 16px;
        }

        .result-actions {
            display: flex;
            gap: 12px;
        }

        
        
        /* Stats Panel */
        .stats-panel {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 24px;
            margin-bottom: 24px;  /* Match the gap between items */
        }

        .stat-card {
            background-color: var(--gray-50);
            border: 1px solid var(--gray-200);
            border-radius: var(--radius);
            padding: 20px;
            display: flex;
            align-items: center;
            gap: 16px;
            transition: all 0.2s;
            box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
        }

        .stat-card:hover {
            box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
            transform: translateY(-1px);
        }

        .stat-icon {
            width: 48px;
            height: 48px;
            background-color: var(--gray-100);
            border-radius: var(--radius);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            color: var(--gray-900);
            font-size: 20px;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        }

        .stat-content {
            flex: 1;
            text-align: left;
        }

        .stat-value {
            font-size: 24px;
            font-weight: 700;
            color: var(--gray-900);
            line-height: 1;
            margin-bottom: 4px;
        }

        .stat-label {
            font-size: 13px;
            color: var(--gray-600);
            font-weight: 500;
        }

        /* Features Grid */
        .features {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 24px;
            margin-top: 0;  /* Remove extra top margin - stats panel already has bottom margin */
        }

        .feature-card {
            background-color: white;
            border: 1px solid var(--gray-200);
            border-radius: var(--radius-lg);
            padding: 24px;
            transition: all 0.2s;
        }

        .feature-card:hover {
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
            transform: translateY(-2px);
        }

        .feature-icon {
            width: 48px;
            height: 48px;
            background-color: var(--gray-100);
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 16px;
            color: var(--gray-900);
            font-size: 20px;
        }

        .feature-title {
            font-size: 18px;
            font-weight: 700;
            color: var(--gray-900);
            margin-bottom: 8px;
        }

        .feature-description {
            font-size: 14px;
            color: var(--gray-600);
            line-height: 1.6;
        }

        /* Footer */
        .footer {
            background-color: white;
            border-top: 1px solid var(--gray-200);
            padding: 48px 0;
            margin-top: 96px;
        }

        .footer-content {
            text-align: center;
        }

        .footer-disclaimer {
            background-color: var(--gray-50);
            border: 1px solid var(--gray-200);
            border-radius: var(--radius);
            padding: 20px;
            margin-bottom: 32px;
            font-size: 14px;
            color: var(--gray-600);
            line-height: 1.6;
        }

        .footer-links {
            display: flex;
            justify-content: center;
            gap: 32px;
            flex-wrap: wrap;
        }

        .footer-link {
            font-size: 14px;
            font-weight: 500;
            color: var(--gray-600);
            text-decoration: none;
            transition: color 0.2s;
        }

        .footer-link:hover {
            color: var(--gray-900);
        }

        .footer-separator {
            color: var(--gray-400);
            font-size: 14px;
            user-select: none;
        }

        /* Footer Bottom Section */
        .footer-bottom {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 32px;
            padding-top: 24px;
            border-top: 1px solid var(--gray-200);
        }

        .copyright {
            font-size: 14px;
            color: var(--gray-600);
            margin: 0;
        }

        .social-links {
            display: flex;
            gap: 24px;
        }

        .social-link {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 14px;
            color: var(--gray-900);
            text-decoration: none;
            transition: all 0.2s;
        }

        .social-link:hover {
            color: var(--brand-primary);
            transform: translateY(-1px);
        }

        .social-link i {
            font-size: 18px;
        }

        /* Mobile Responsive */
        @media (max-width: 768px) {
            .hero-title {
                font-size: 36px;
            }

            .hero-subtitle {
                font-size: 18px;
            }

            /* Mobile Navigation */
            .nav-toggle {
                display: block;
            }

            .nav-links {
                display: none;
                position: absolute;
                top: 64px;
                left: 0;
                right: 0;
                background-color: white;
                border-bottom: 1px solid var(--gray-200);
                flex-direction: column;
                padding: 20px;
                gap: 16px;
                box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
            }

            .nav-links.active {
                display: flex;
            }

            .nav-link {
                width: 100%;
                padding: 10px 16px;
                text-align: left;
                border-radius: 6px;
            }

            .nav-link:hover {
                background-color: var(--gray-50);
            }

            /* Keep input group horizontal on tablets */
            .input-group {
                flex-direction: row;
            }

            /* Maintain input field size */
            .form-input {
                flex: 1;
                min-width: 0; /* Allow shrinking but not too much */
                font-size: 16px; /* Prevent zoom on iOS */
            }

            
            .result-actions {
                flex-direction: column;
            }

            .features {
                grid-template-columns: 1fr;
            }

            .stats-panel {
                grid-template-columns: 1fr;
                gap: 16px;
            }

            .stat-card {
                padding: 20px;
            }

            .stat-icon {
                width: 48px;
                height: 48px;
            }

            .stat-value {
                font-size: 24px;
            }

            .footer-links {
                flex-direction: column;
                gap: 16px;
            }

            .footer-separator {
                display: none;
            }

            .footer-bottom {
                flex-direction: column;
                gap: 16px;
                text-align: center;
            }

            .social-links {
                justify-content: center;
            }

            .lookup-card {
                padding: 24px;
            }

            .container {
                padding: 0 16px;
            }
        }

        /* Small phones */
        @media (max-width: 480px) {
            .input-group {
                flex-direction: column;
                gap: 12px;
            }

            /* Input keeps same height, just adjusts width and padding */
            .form-input {
                width: 100%;
                padding: 0 16px; /* Remove right padding since icon is hidden */
                /* Height stays 48px from main definition */
            }

            .input-icon {
                display: none; /* Hide icon on small screens */
            }

            .hero-title {
                font-size: 32px;
            }

            .lookup-card {
                padding: 20px;
            }
        }

        /* Extra small devices (phones in portrait) */
        @media (max-width: 480px) {
            .hero-title {
                font-size: 28px;
            }

            .hero-subtitle {
                font-size: 16px;
            }

            .hero {
                padding: 60px 20px 40px;
            }

            .form-input {
                height: 52px; /* Slightly taller for easier tapping */
                font-size: 16px; /* Ensure 16px to prevent zoom */
            }

            .feature-card {
                padding: 20px;
            }

            .logo-text {
                font-size: 18px;
            }
        }
/* Rate Limit Warning */
.rate-limit-warning {
    background-color: #fff3cd;
    color: #856404;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid rgba(251, 186, 27, 0.2);
    margin-top: 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.rate-limit-warning.show {
    display: flex;
}

.rate-limit-warning i {
    font-size: 20px;
    margin-top: 2px;
    color: #f59e0b;
}

.rate-limit-warning strong {
    display: block;
    margin-bottom: 4px;
}

.rate-limit-warning p {
    margin: 0 0 8px 0;
    font-size: 14px;
}

.countdown {
    font-weight: 600;
    font-size: 16px;
    color: #ef4444;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .btn-search {
        width: 44px;
        height: 44px;
        font-size: 16px;
    }
    
    .input-with-button {
        gap: 6px;
    }
    
    .input-with-button .form-input {
        font-size: 14px;
        height: 44px;
    }
    
    /* Hash examples mobile styling */
    .hash-examples {
        font-size: 12px;
        gap: 6px;
    }
    
    .hash-example {
        font-size: 11px;
        padding: 2px 4px;
    }
}

/* Hash Finder Section */
.hash-finder-section {
    margin-top: 24px;
    background-color: var(--gray-50);
    border-radius: var(--radius);
    overflow: hidden;
}

.hash-finder-toggle {
    width: 100%;
    padding: 16px 20px;
    background: none;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: var(--gray-700);
    transition: all 0.2s;
}

.hash-finder-toggle:hover {
    color: var(--gray-900);
    background-color: var(--gray-100);
}

.hash-finder-toggle i {
    transition: transform 0.2s;
}

.hash-finder-toggle.active i {
    transform: rotate(180deg);
}

.hash-finder-content {
    padding: 0 20px 20px 20px;
}

.hash-finder-content h4 {
    margin-bottom: 12px;
    font-size: 16px;
    color: var(--gray-900);
}

.hash-finder-content p {
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--gray-600);
}

.code-block {
    position: relative;
    background-color: var(--gray-900);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
}

.code-block pre {
    margin: 0;
    overflow-x: auto;
}

.code-block code {
    color: white;
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 1.5;
}

.copy-code-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: var(--gray-700);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.copy-code-btn:hover {
    background-color: var(--gray-600);
}

.copy-code-btn.copied {
    background-color: var(--success);
}

.hash-finder-instructions {
    background-color: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 16px;
}

.hash-finder-instructions ol {
    margin: 0;
    padding-left: 20px;
    font-size: 13px;
    color: var(--gray-700);
}

.hash-finder-instructions li {
    margin-bottom: 6px;
}

/* Compact Tool Styles */
.compact-tool {
    padding: 0;
}

.compact-tool > p {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: var(--gray-700);
}

.code-block-compact {
    position: relative;
    background-color: var(--gray-900);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 12px;
}

.code-block-compact pre {
    margin: 0;
    padding-right: 40px;
}

.code-block-compact code {
    font-size: 12px;
    line-height: 1.4;
    color: var(--gray-100);
    font-family: var(--font-mono);
}

.code-block-compact .copy-code-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 6px 10px;
    background-color: var(--gray-700);
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.code-block-compact .copy-code-btn:hover {
    background-color: var(--gray-600);
}

.code-block-compact .copy-code-btn.copied {
    background-color: var(--success);
}

.learn-more-link {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    color: var(--brand-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.learn-more-link:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}