/* 404 Error Page Styles */

/* Full Page Layout - No Borders */
.error-page-container {
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 50%, #f1f5f9 100%);
    padding: 0;
    margin: 0;
    position: relative;
    overflow-x: hidden;
}

.error-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
}

/* Animated 404 Numbers */
.error-hero {
    margin-bottom: 4rem;
    padding: 3rem 0;
}

.floating-numbers {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    height: 200px;
}

.floating-element {
    font-size: 8rem;
    font-weight: 900;
    color: var(--primary-color);
    text-shadow: 0 4px 8px rgba(50, 146, 109, 0.3);
    animation: float 3s ease-in-out infinite;
    display: inline-block;
    opacity: 0;
    animation-fill-mode: forwards;
}

.number-4 {
    animation-delay: 0s;
}

.number-0 {
    animation-delay: 0.5s;
    color: #3b82f6;
    text-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.number-4-2 {
    animation-delay: 1s;
}

@keyframes float {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.8);
    }
    20% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-10px) scale(1.05);
    }
    100% {
        transform: translateY(0) scale(1);
    }
}

/* Error Message */
.error-message {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease-out forwards;
}

.error-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.error-description {
    font-size: 1.125rem;
    color: var(--text-light);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* Fade-in Animation */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease-out forwards;
}

.fade-in[data-fade-delay="1.5"] { animation-delay: 1.5s; }
.fade-in[data-fade-delay="2"] { animation-delay: 2s; }

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

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

/* Search Section */
.search-section {
    position: relative;
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    transform: translateY(20px);
}

.search-bar-container {
    position: relative;
    display: flex;
    gap: 0;
    margin-bottom: 1rem;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.page-search-input {
    flex: 1;
    padding: 0.875rem 1.5rem;
    border: none;
    font-size: 1rem;
    background: white;
    outline: none;
    min-height: 48px;
}

.page-search-input::placeholder {
    color: #9ca3af;
}

.page-search-btn {
    background: #8b5cf6;
    color: white;
    border: none;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    min-height: 48px;
}

.page-search-btn:hover {
    background: #7c3aed;
}

.inline-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    margin-top: 4px;
    width: 100%;
    box-sizing: border-box;
}

.inline-search-results.show {
    display: block;
    animation: fadeInUp 0.3s ease-out;
}

.inline-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

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

.inline-result-item:hover {
    background: #f8fafc;
    transform: translateX(4px);
}

.inline-result-item .tool-name {
    font-weight: 500;
    color: var(--text-color);
}

.inline-result-item .tool-description {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.inline-no-results {
    text-align: center;
    color: var(--text-light);
    font-style: italic;
    padding: 2rem;
}

/* Navigation Options */
.navigation-options {
    margin-bottom: 4rem;
}

.button-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    max-width: 500px;
    margin: 0 auto;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    min-width: 160px;
    min-height: 48px;
}

.primary-btn {
    background: #4285f4;
    color: white;
}

.primary-btn:hover {
    background: #3367d6;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

.secondary-btn {
    background: #8b5cf6;
    color: white;
}

.secondary-btn:hover {
    background: #7c3aed;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.action-btn i {
    font-size: 1rem;
}



/* Section Titles */
.section-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.section-title i {
    color: var(--primary-color);
    font-size: 1.5rem;
}





/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .floating-element,
    .fade-in,
    .action-btn {
        animation: none !important;
        transition: none !important;
    }

    .floating-element {
        opacity: 1;
        transform: none;
    }

    .fade-in {
        opacity: 1;
        transform: none;
    }

    .action-btn:hover {
        transform: none;
    }
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .error-content {
        padding: 1rem;
    }

    .floating-numbers {
        height: 150px;
        gap: 0.5rem;
    }

    .floating-element {
        font-size: 5rem;
    }

    .error-title {
        font-size: 2rem;
    }

    .error-description {
        font-size: 1rem;
    }

    .button-container {
        flex-direction: column;
        gap: 0.75rem;
        max-width: 300px;
    }

    .action-btn {
        min-width: 100%;
        padding: 1rem 1.5rem;
    }

    .search-section {
        max-width: 100%;
        margin-bottom: 1.5rem;
        position: relative;
    }

    .search-bar-container {
        border-radius: 20px;
    }

    .page-search-input {
        padding: 0.75rem 1rem;
        font-size: 16px; /* Prevent zoom on iOS */
    }

    .page-search-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    .inline-search-results {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 1001;
        margin-top: 4px;
        border-radius: 12px;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    }

    .inline-result-item {
        padding: 0.875rem 1rem;
    }

    .inline-result-item .tool-name {
        font-size: 0.95rem;
    }

    .inline-result-item .tool-description {
        font-size: 0.8rem;
    }

    .section-title {
        font-size: 1.5rem;
    }
}

/* Extra Small Mobile Screens */
@media (max-width: 480px) {
    .search-section {
        position: relative;
        max-width: 100%;
        padding: 0 0.5rem;
    }

    .inline-search-results {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 1002;
        margin-top: 4px;
        border-radius: 8px;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
        max-height: 250px;
    }

    .inline-result-item {
        padding: 0.75rem 0.875rem;
    }

    .inline-result-item .tool-name {
        font-size: 0.9rem;
    }

    .inline-result-item .tool-description {
        font-size: 0.75rem;
    }
}

/* Tablet Responsive Design */
@media (max-width: 1024px) and (min-width: 769px) {
    .error-content {
        padding: 1.5rem;
    }

    .floating-element {
        font-size: 6rem;
    }

    .button-container {
        max-width: 400px;
    }

    .search-section {
        position: relative;
    }

    .inline-search-results {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 1000;
        margin-top: 4px;
    }
}

/* Large Screen Optimizations */
@media (min-width: 1200px) {
    .error-content {
        padding: 3rem;
    }

    .floating-element {
        font-size: 10rem;
    }

    .error-hero {
        padding: 4rem 0;
    }

    .section-title {
        font-size: 2.25rem;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .error-page-container {
        background: white;
    }

    .action-btn {
        border: 2px solid black;
    }

    .action-btn:hover {
        background: black;
        color: white;
    }
}

/* Print Styles */
@media print {
    .error-page-container {
        background: white;
    }

    .floating-element {
        animation: none;
        color: black;
        text-shadow: none;
    }

    .action-btn {
        border: 1px solid black;
        box-shadow: none;
    }
}
