/* style_secondary.css */

/* General page header for consistency across secondary pages */
.page-header {
    background-color: var(--card-bg, #2e294e);
    padding: var(--space-xl, 40px);
    margin-top: var(--space-xl, 40px);
    margin-bottom: var(--space-xl, 40px);
    text-align: center;
    border-radius: var(--border-radius, 10px);
    box-shadow: var(--box-shadow-hover); /* Reusing a defined shadow */
}

.page-header h1 {
    font-size: var(--font-xxl, 2.4rem);
    color: var(--accent-color, #ff4da6);
    margin-bottom: var(--space-sm, 10px);
}

.page-header p {
    font-size: var(--font-lg, 1.5rem);
    color: var(--text-muted, #bbb);
}


.main-content {
    padding: 2rem; 
}


/* --- Single Image Post Page Styles --- */
.image-post-detail {
    background-color: var(--card-bg, #2e294e);
    padding: var(--space-xl, 40px);
    border-radius: var(--border-radius, 10px);
    box-shadow: var(--box-shadow-hover);
    margin-top: var(--space-xl, 40px);
    margin-bottom: var(--space-xl, 40px);
    color: var(--text-color, white);
}

.image-post-detail h1 {
    font-size: var(--font-xxl, 2.4rem);
    color: var(--accent-color, #ff4da6);
    text-align: center;
    margin-bottom: var(--space-md, 15px);
}

.image-post-detail .image-meta {
    font-size: var(--font-base, 1rem);
    color: var(--text-muted, #bbb);
    text-align: center;
    margin-bottom: var(--space-xl, 30px);
}

.image-post-detail .image-meta span {
    font-weight: bold;
    color: var(--text-color, white);
}

.image-display-area {
    text-align: center;
    margin-bottom: var(--space-xl, 40px);
}

.main-anime-image {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius, 10px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    display: block; /* Ensures no extra space below image */
    margin: 0 auto var(--space-xl, 30px) auto; /* Center image and add space below */
}

.download-section {
    display: flex;
    justify-content: center;
    gap: var(--space-md, 15px);
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.download-btn, .telegram-btn {
    display: inline-flex; /* Use flex to align icon and text */
    align-items: center;
    gap: 8px; /* Space between icon and text */
    background-color: var(--accent-color, #ff4da6); /* Use accent color for buttons */
    color: var(--button-text-color, white); /* Text color on buttons */
    padding: 12px 25px;
    border-radius: var(--border-radius, 8px);
    text-decoration: none;
    font-weight: bold;
    font-size: var(--font-md, 1.1rem);
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.download-btn:hover, .telegram-btn:hover {
    background-color: var(--accent-color-dark, #e6398f); /* Darker shade on hover */
    transform: translateY(-2px);
}

.download-btn i, .telegram-btn i {
    font-size: 1.2rem;
}

.image-description-box,
.image-tags-section,
.related-images {
    margin-top: var(--space-xl, 40px);
    padding: var(--space-lg, 20px);
    background-color: var(--bg-color, #1a1532); /* Use your primary background color or a slightly different one */
    border-radius: var(--border-radius, 8px);
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.1); /* Subtle inner shadow */
}

.image-description-box h2,
.image-tags-section h2,
.related-images h2 {
    font-size: var(--font-xl, 2rem);
    color: var(--accent-color, #ff4da6);
    margin-bottom: var(--space-md, 15px);
    border-bottom: 1px solid var(--border-color, #4a426b); /* Use your border color */
    padding-bottom: var(--space-sm, 10px);
}

.image-description-box p {
    font-size: var(--font-base, 1rem);
    line-height: 1.7;
    color: var(--text-muted, #bbb);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm, 10px);
    margin-top: var(--space-md, 15px);
}

.tag {
    background-color: #634786; /* A default tag color, main.js will randomize this */
    color: white;
    padding: 8px 15px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: bold;
    transition: transform 0.2s ease;
    cursor: pointer;
}

.tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.related-images .cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-xl, 30px);
    margin-top: var(--space-md, 20px);
}

/* Reusing .card styles from your main site, ensure they are in style.css */
.related-images .card {
    background-color: var(--card-bg, #2e294e);
    border-radius: var(--border-radius, 10px);
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none; /* In case you link the whole card */
    color: inherit;
}

.related-images .card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
}

.related-images .card img {
    width: 100%;
    height: 170px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
}

.related-images .card .card-info {
    padding: var(--space-md, 15px);
}

.related-images .card .card-info h3 {
    font-size: var(--font-lg, 1.5rem);
    color: var(--text-color, white);
    margin-bottom: var(--space-sm, 10px);
}

.related-images .card .card-info p {
    font-size: var(--font-base, 1rem);
    color: var(--text-muted, #bbb);
    line-height: 1.5;
}


/* --- Blog Page Styles (existing, for context) --- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-xl, 40px);
    margin-bottom: var(--space-xl, 40px);
}

.blog-post-card {
    background-color: var(--card-bg, #2e294e);
    border-radius: var(--border-radius, 10px);
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-height: 180px;
}

.blog-post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
}

.blog-post-card .card-content {
    padding: var(--space-md, 15px);
}

.blog-post-card h2 {
    font-size: var(--font-lg, 1.5rem);
    color: var(--text-color, white);
    margin-bottom: var(--space-sm, 10px);
}

.blog-post-card .post-meta {
    font-size: 0.85rem;
    color: var(--text-muted-dark, #999);
    margin-bottom: var(--space-sm, 10px);
}

.blog-post-card p {
    font-size: var(--font-base, 1rem);
    color: var(--text-muted, #bbb);
    line-height: 1.6;
    margin-bottom: var(--space-md, 15px);
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.read-more-link {
    display: inline-block;
    color: var(--accent-color, #ff4da6);
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s ease;
}

.read-more-link:hover {
    color: var(--text-color, white);
    text-decoration: underline;
}

/* Pagination Styles (existing) */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-sm, 10px);
    margin-top: var(--space-xl, 40px);
    margin-bottom: var(--space-xl, 40px);
}

.pagination .page-link {
    background-color: var(--card-bg, #2e294e);
    color: var(--text-color, white);
    padding: var(--space-sm, 10px) var(--space-md, 15px);
    border-radius: var(--border-radius, 10px);
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.pagination .page-link:hover:not(.active):not(.disabled) {
    background-color: var(--accent-color, #ff4da6);
    color: black;
}

.pagination .page-link.active {
    background-color: var(--accent-color, #ff4da6);
    color: white;
    cursor: default;
}

.pagination .page-link.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Genre Page Styles (existing) */
.genre-full-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: var(--space-md, 15px);
    margin-bottom: var(--space-xl, 40px);
}

.genre-tag-large {
    padding: var(--space-lg, 20px);
    border-radius: var(--border-radius, 10px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-lg, 1.5rem);
    font-weight: bold;
    text-align: center;
    background-color: #634786; /* Fallback/initial color */
    color: white;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    min-height: 120px;
}

.genre-tag-large:hover {
    transform: translateY(-3px);
    box-shadow: var(--box-shadow-hover);
}


.show-more-btn {
    display: block; /* Ensures it takes full width below the grid */
    margin: var(--space-xl, 30px) auto 0 auto; /* Center it and add top margin */
    background-color: var(--card-bg, #2e294e); /* Match card background or a neutral color */
    color: var(--accent-color, #ff4da6); /* Accent text color */
    border: 1px solid var(--accent-color, #ff4da6); /* Border to highlight */
    padding: 12px 30px;
    font-size: var(--font-md, 1.1rem);
    font-weight: bold;
    border-radius: var(--border-radius, 8px);
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
    width: fit-content; /* Make button width fit content */
}

.show-more-btn:hover {
    background-color: var(--accent-color, #ff4da6);
    color: var(--button-text-color, white); /* Text color on hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}



/* Premium Page Specific Styles */

.premium-benefits {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    padding: 40px 20px;
    background-color: var(--secondary-bg-color);
    border-radius: 8px;
    margin-bottom: 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.benefit-card {
    flex: 1 1 280px; /* Allows cards to grow/shrink, min-width 280px */
    max-width: 350px;
    background-color: #2a2a2a;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.benefit-card:hover {
    transform: translateY(-8px);
    background-color: #333;
}

.benefit-card i {
    font-size: 3.5em;
    color: var(--pink-color);
    margin-bottom: 20px;
}

.benefit-card h3 {
    font-size: 1.8em;
    color: #fff;
    margin-bottom: 15px;
}

.benefit-card p {
    font-size: 1em;
    color: var(--gray-light);
    line-height: 1.6;
}

/* Premium Join Section */
.premium-join {
    text-align: center;
    padding: 50px 20px;
    background-color: #1a1a1a;
    border-radius: 8px;
    margin-bottom: 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.premium-join h2 {
    font-size: 2.5em;
    color: var(--pink-color);
    margin-bottom: 20px;
}

.premium-join p {
    font-size: 1.1em;
    color: var(--text-color);
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.join-telegram-btn {
    display: inline-block;
    background-color: #0088cc; /* Telegram blue */
    color: #fff;
    padding: 15px 35px;
    border-radius: 8px;
    font-size: 1.3em;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.join-telegram-btn:hover {
    background-color: #006699;
    transform: translateY(-3px);
    text-decoration: none;
}

.join-telegram-btn i {
    margin-right: 10px;
}

.telegram-note {
    font-size: 0.9em;
    color: #aaa;
    margin-top: 20px;
}

/* Premium Pricing Section */
.premium-pricing {
    text-align: center;
    padding: 40px 20px;
    margin-bottom: 40px;
}

.premium-pricing h2 {
    font-size: 2.5em;
    color: var(--pink-color);
    margin-bottom: 40px;
}

.pricing-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.pricing-card {
    flex: 1 1 300px; /* Base width for cards */
    max-width: 380px;
    background-color: var(--secondary-bg-color);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden; /* For the save tag */
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.pricing-card.featured {
    background-color: var(--pink-color);
    transform: scale(1.05); /* Slightly larger for featured */
    box-shadow: 0 8px 25px rgba(255, 0, 127, 0.4);
    border: 2px solid #fff;
}

.pricing-card.featured h3,
.pricing-card.featured .price,
.pricing-card.featured ul li,
.pricing-card.featured .btn-price {
    color: #fff;
}

.pricing-card.featured .btn-price {
    background-color: #fff;
    color: var(--pink-color);
}

.pricing-card.featured .btn-price:hover {
    background-color: #f0f0f0;
}

.pricing-card h3 {
    font-size: 2em;
    margin-bottom: 20px;
    color: #fff;
}

.pricing-card .price {
    font-size: 3.5em;
    font-weight: bold;
    color: var(--pink-color);
    margin-bottom: 30px;
}

.pricing-card .price sup {
    font-size: 0.5em;
    vertical-align: super;
}

.pricing-card .price span {
    font-size: 0.4em;
    font-weight: normal;
    color: var(--gray-light);
}

.pricing-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
    text-align: left;
}

.pricing-card ul li {
    font-size: 1.1em;
    color: var(--text-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.pricing-card ul li i {
    margin-right: 10px;
    font-size: 1.2em;
}

.pricing-card ul li .fa-check-circle {
    color: #28a745; /* Green for checkmark */
}

.pricing-card ul li .fa-times-circle {
    color: #dc3545; /* Red for cross */
}

.pricing-card .btn-price {
    display: block;
    width: calc(100% - 40px); /* Adjust for padding */
    padding: 15px 20px;
    background-color: var(--pink-color);
    color: #fff;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s ease;
    margin: 0 auto; /* Center the button */
}

.pricing-card .btn-price:hover {
    background-color: var(--dark-pink-color);
    text-decoration: none;
}

.save-tag {
    position: absolute;
    top: 15px;
    right: -30px; /* Start off-screen */
    background-color: #28a745; /* Green for "Save" */
    color: #fff;
    padding: 5px 35px;
    font-size: 0.9em;
    font-weight: bold;
    transform: rotate(45deg);
    transform-origin: 100% 0%; /* Rotate from top-right corner */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* Responsive adjustments for Premium page */
@media (max-width: 1024px) {
    .premium-benefits,
    .pricing-cards {
        gap: 20px;
    }
    .benefit-card,
    .pricing-card {
        flex: 1 1 280px;
    }
}

@media (max-width: 768px) {
    .premium-benefits,
    .pricing-cards {
        flex-direction: column;
        align-items: center;
    }
    .benefit-card,
    .pricing-card {
        max-width: 90%; /* Take more width on smaller screens */
    }
    .premium-join h2,
    .premium-pricing h2 {
        font-size: 2em;
    }
    .join-telegram-btn {
        font-size: 1.1em;
        padding: 12px 25px;
    }
    .pricing-card.featured {
        transform: scale(1.02); /* Less aggressive scaling */
    }
}

@media (max-width: 480px) {
    .benefit-card,
    .pricing-card {
        padding: 20px;
    }
    .benefit-card i {
        font-size: 3em;
    }
    .benefit-card h3 {
        font-size: 1.5em;
    }
    .pricing-card h3 {
        font-size: 1.8em;
    }
    .pricing-card .price {
        font-size: 3em;
    }
    .pricing-card ul li {
        font-size: 1em;
    }
    .pricing-card .btn-price {
        font-size: 1.1em;
        padding: 12px 15px;
    }
}

/* --- Contact/DMCA Page Styles --- */

.contact-dmca-container {
    display: flex;
    flex-wrap: wrap; /* Allows sections to wrap on smaller screens */
    gap: 40px; /* Space between the two sections */
    padding: 40px 20px;
    justify-content: center; /* Center content horizontally */
    max-width: 1200px; /* Max width for the container */
    margin: 0 auto 50px auto; /* Center the container and add bottom margin */
}

.contact-section,
.dmca-section {
    flex: 1; /* Allow sections to grow */
    min-width: 300px; /* Minimum width before wrapping */
    background-color: var(--secondary-bg-color);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex; /* Use flex for internal layout */
    flex-direction: column;
}

.contact-section h2,
.dmca-section h2 {
    color: var(--pink-color);
    font-size: 2em;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--pink-color);
    padding-bottom: 10px;
}

.contact-section p,
.dmca-section p,
.dmca-section ol li {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 1em;
}

.dmca-section ol {
    margin-left: 20px;
    padding-left: 0;
}

.dmca-section ol li {
    margin-bottom: 10px;
    list-style-type: decimal; /* Numbered list */
}

.dmca-section .note {
    font-size: 0.9em;
    color: var(--gray-light);
    font-style: italic;
    margin-top: 20px;
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    color: #fff;
    font-weight: bold;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: calc(100% - 20px);
    padding: 10px;
    border: 1px solid var(--pink-color);
    background-color: var(--input-bg-color);
    color: var(--text-color);
    border-radius: 5px;
    font-size: 1em;
}

.contact-form textarea {
    resize: vertical; 
    min-height: 120px;
}

.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form textarea:focus {
    outline: none;
    box-shadow: 0 0 5px rgb(255 0 127 / 75%);
}

.submit-btn {
    background-color: var(--pink-color);
    color: #fff;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    align-self: flex-start; /* Align button to the start of the flex container */
}

.submit-btn:hover {
    background-color: var(--dark-pink-color);
    transform: translateY(-2px);
}

.message {
    padding: 15px;
    margin: 20px auto;
    border-radius: 8px;
    text-align: center;
    max-width: 800px;
    font-weight: bold;
}

.message.success {
    background-color: #28a745; /* Green */
    color: #fff;
}

.message.error {
    background-color: #dc3545; /* Red */
    color: #fff;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .contact-dmca-container {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }
    .contact-section,
    .dmca-section {
        min-width: unset; /* Remove min-width to allow more flexibility */
        width: 90%; /* Take up more width on smaller screens */
        max-width: 600px; /* Constrain max-width */
    }
}

@media (max-width: 480px) {
    .contact-section,
    .dmca-section {
        padding: 20px;
    }
    .contact-section h2,
    .dmca-section h2 {
        font-size: 1.8em;
    }
    .contact-form input[type="text"],
    .contact-form input[type="email"],
    .contact-form textarea,
    .submit-btn {
        font-size: 0.95em;
    }
}
/* --- Small Redirect Banner Styles --- */
.small-redirect-banner {
    width: 100%;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 0 10px;
    box-sizing: border-box;
    position: relative;
    z-index: 99;
    font-family: Arial, sans-serif;
    transition: background-color 1s ease-in-out, transform 0.3s ease-out;
    background-color: rgba(240, 240, 240, 0.9);
}

.small-redirect-banner.hidden {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

.banner-text {
    flex-grow: 1;
    text-align: center;
}

.banner-text a {
    font-size: 1em;
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    padding: 5px 0;
}

.banner-text a:hover {
    text-decoration: underline;
}

.close-banner-btn {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s ease, transform 0.2s ease;
    line-height: 1;
}

.close-banner-btn:hover {
    transform: rotate(90deg);
}

@media (max-width: 768px) {
    .small-redirect-banner {
        height: 60px;
    }
    .banner-text a {
        font-size: 9em;
    }
    .close-banner-btn {
        font-size: 1.3em;
    }
}

@media (max-width: 480px) {
    .small-redirect-banner {
        height: 50px;
        padding: 0 10px;
    }
    .banner-text a {
        font-size: 0.7em;
    }
    .close-banner-btn {
        font-size: 1.2em;
    }
}

/* --- 404 Error Page Styles (Default Background) --- */
.error-404-section {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 120px);
    padding: 40px 20px;
    text-align: center;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow: hidden;
    position: relative;
}




.error-content {
    max-width: 700px;
    background-color: rgba(42, 42, 42, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 50px;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(255, 0, 127, 0.3), 0 0 15px rgba(0, 234, 255, 0.2);
    border: 1px solid rgba(255, 0, 127, 0.5);
    position: relative;
    z-index: 1;

    opacity: 0;
    transform: translateY(20px) scale(0.98);
    animation: fadeInScaleUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-delay: 0.2s;
}

.error-code {
    font-family: 'Orbitron', sans-serif;
    font-size: 8em;
    color: var(--neon-blue);
    margin-bottom: 20px;
    text-shadow:
        0 0 10px var(--neon-blue),
        0 0 20px var(--neon-blue),
        0 0 30px var(--neon-purple),
        0 0 40px var(--neon-purple);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards,
               glitch 1.5s infinite alternate linear;
    animation-delay: 0.5s;
}

.error-heading {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.8em;
    color: var(--pink-color);
    margin-bottom: 25px;
    text-shadow: 0 0 8px rgba(255, 0, 127, 0.6);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-delay: 0.7s;
}

.error-message {
    font-size: 1.2em;
    line-height: 1.6;
    margin-bottom: 30px;
    color: var(--text-color);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-delay: 0.9s;
}

.error-suggestions {
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--neon-blue);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-delay: 1.1s;
}

.suggestion-list {
    list-style: none;
    padding: 0;
    margin-bottom: 40px;
}

.suggestion-list li {
    font-size: 1.1em;
    margin-bottom: 10px;
    color: var(--gray-light);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-delay: 1.3s;
}

.error-link {
    color: var(--neon-blue);
    text-decoration: none;
    transition: text-decoration 0.2s ease, color 0.3s ease;
}

.error-link:hover {
    text-decoration: underline;
    color: var(--pink-color);
}

.back-home-btn {
    display: inline-block;
    background-color: var(--pink-color);
    color: #fff;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.3em;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 0 15px rgba(255, 0, 127, 0.4);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-delay: 1.5s;
}

.back-home-btn:hover {
    background-color: var(--dark-pink-color);
    transform: translateY(-3px);
    box-shadow: 0 0 25px rgba(255, 0, 127, 0.6), 0 0 10px rgba(0, 234, 255, 0.3);
    text-decoration: none;
}

/* --- Keyframe Animations --- */
@keyframes fadeInScaleUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* For the 404 code to gently pulse (made more subtle) */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        text-shadow:
            0 0 8px var(--neon-blue),
            0 0 15px var(--neon-blue),
            0 0 20px var(--neon-purple);
    }
    50% {
        transform: scale(1.01);
        text-shadow:
            0 0 12px var(--neon-blue),
            0 0 20px var(--neon-blue),
            0 0 25px var(--neon-purple);
    }
}

/* Glitch effect for the 404 code (made slightly slower and less aggressive) */
@keyframes glitch {
    0% {
        text-shadow: 1px 1px var(--glitch-red), -1px -1px var(--glitch-blue);
        transform: translate(0);
    }
    25% {
        text-shadow: -1px -1px var(--glitch-blue), 1px 1px var(--glitch-red);
        transform: translate(-1px, 1px);
    }
    50% {
        text-shadow: 1px -1px var(--glitch-green), -1px 1px var(--glitch-purple);
        transform: translate(1px, -1px);
    }
    75% {
        text-shadow: -1px 1px var(--glitch-red), 1px -1px var(--glitch-blue);
        transform: translate(-0.5px, -0.5px);
    }
    100% {
        text-shadow: 1px 1px var(--glitch-red), -1px -1px var(--glitch-blue);
        transform: translate(0);
    }
}

/* REMOVED: @keyframes backgroundShift */
/* REMOVED: @keyframes gridFadeIn */


/* Responsive adjustments for 404 page */
@media (max-width: 768px) {
    .error-content {
        padding: 30px;
    }
    .error-code {
        font-size: 6em;
    }
    .error-heading {
        font-size: 2.2em;
    }
    .error-message,
    .error-suggestions,
    .suggestion-list li {
        font-size: 1em;
    }
    .back-home-btn {
        padding: 12px 25px;
        font-size: 1.1em;
    }
}

@media (max-width: 480px) {
    .error-content {
        padding: 20px;
    }
    .error-code {
        font-size: 5em;
    }
    .error-heading {
        font-size: 1.8em;
    }
    .error-message,
    .error-suggestions,
    .suggestion-list li {
        font-size: 0.9em;
    }
    .back-home-btn {
        padding: 10px 20px;
        font-size: 1em;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .small-redirect-banner {
        height: 60px; /* Slightly shorter on smaller screens */
    }
    .banner-text a {
        font-size: 0.8em;
    }
    .close-banner-btn {
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .small-redirect-banner {
        height: 50px; /* Even shorter on mobile */
        padding: 0 10px;
    }
    .banner-text a {
        font-size: 0.7em; /* Smaller font on very small screens */
    }
    .close-banner-btn {
        font-size: 0.9em;
    }
}


/* Responsive Adjustments for secondary pages */
@media (max-width: 870px) {
    .main-content {
        padding: 1rem;
    }

    .page-header {
        padding: var(--space-lg, 20px);
    }

    .page-header h1 {
        font-size: var(--font-xl, 2rem);
    }

    .page-header p {
        font-size: var(--font-base, 1rem);
    }

    /* Adjustments for image-post-detail */
    .image-post-detail {
        padding: var(--space-lg, 20px);
    }
    .image-post-detail h1 {
        font-size: var(--font-xl, 2rem);
    }
    .image-post-detail .image-meta {
        margin-bottom: var(--space-md, 20px);
    }
    .main-anime-image {
        margin-bottom: var(--space-md, 20px);
    }
    .download-btn, .telegram-btn {
        padding: 10px 20px;
        font-size: var(--font-base, 1rem);
    }
    .image-description-box,
    .image-tags-section,
    .related-images {
        margin-top: var(--space-lg, 30px);
        padding: var(--space-md, 15px);
    }
    .image-description-box h2,
    .image-tags-section h2,
    .related-images h2 {
        font-size: var(--font-lg, 1.5rem);
        margin-bottom: var(--space-sm, 10px);
        padding-bottom: var(--space-xs, 5px);
    }
    .image-description-box p {
        font-size: 0.95rem;
    }

    .blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: var(--space-lg, 20px);
    }

    .blog-post-card {
        min-height: 160px;
    }

    .genre-full-list {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: var(--space-md, 15px);
    }

    .genre-tag-large {
        font-size: var(--font-base, 1rem);
        min-height: 100px;
    }

    .related-images .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: var(--space-lg, 20px);
    }
}

@media (max-width: 700px) {
    .main-content {
        padding: 20px 10px;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .blog-post-card {
        min-height: unset;
    }

    .genre-full-list {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    .genre-tag-large {
        min-height: 80px;
    }

    /* Single image post responsive adjustments */
    .image-post-detail {
        padding: var(--space-md, 15px);
    }
    .image-post-detail h1 {
        font-size: var(--font-lg, 1.8rem);
    }
    .download-section {
        flex-direction: column; /* Stack buttons vertically */
        align-items: stretch; /* Stretch buttons to full width */
    }
    .download-btn, .telegram-btn {
        width: 100%; /* Full width */
        text-align: center;
        justify-content: center; /* Center content within the button */
    }
    .related-images .cards-grid {
        grid-template-columns: 1fr; /* Single column on very small screens */
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 15px 5px;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    .page-header p {
        font-size: 0.9rem;
    }

    .genre-full-list {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    /* Single image post further adjustments */
    .image-post-detail h1 {
        font-size: 1.5rem;
    }
    .image-description-box p {
        font-size: 0.9rem;
    }
    .tag {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}