﻿@import url("https://fonts.googleapis.com/css?family=Roboto:400,400i,700");

html {
    height: 100%;
    overflow: hidden;
}

body {
    background-color: #0a0a0a;
    color: #eaeaea;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    perspective: 2px;
    transform-style: preserve-3d;
}

.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='325' height='325'%3e%3ctext x='81.25' y='81.25' font-family='Roboto, sans-serif' font-weight='700' font-size='32' fill-opacity='0.04' fill='%23ffffff' text-anchor='middle' transform='rotate(-45, 81.25, 81.25)' shape-rendering='geometricPrecision' text-rendering='optimizeLegibility'%3emayiflex.dev%3c/text%3e%3ctext x='243.75' y='243.75' font-family='Roboto, sans-serif' font-weight='700' font-size='32' fill-opacity='0.04' fill='%23ffffff' text-anchor='middle' transform='rotate(-45, 243.75, 243.75)' shape-rendering='geometricPrecision' text-rendering='optimizeLegibility'%3emayiflex.dev%3c/text%3e%3c/svg%3e");
    transform: translateZ(-12px) scale(7);
}

    .parallax-bg::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 250px;
        background: linear-gradient(to top, #0a0a0a 40%, rgba(10, 10, 10, 0));
        pointer-events: none;
    }

/* Shared Container Styles */
.main-container,
.patch-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
    background-color: #121212;
    border-radius: 8px;
    transform: translateZ(0); /* This keeps the content on the main plane */
}

/* Header Styles */
.header-content {
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 2px solid #c89b3c;
    padding-bottom: 10px;
}

.logo-image {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover; /* Prevents internal image distortion */
    aspect-ratio: 1 / 1; /* Enforces a 1:1 square ratio */
    flex-shrink: 0; /* Critical: Prevents the container from squashing the image on mobile */
}

.header h1,
.patch-header h1 {
    font-size: 2.5rem;
    font-weight: bold;
    color: #ffffff;
}

.sub-header {
    color: #888;
    padding-top: 5px;
}

/* --- Main Page Specific Styles --- */
.patch-list {
    margin-top: 30px;
}

.patch-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #1a1a1a;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 3px solid #444;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
    color: #eaeaea;
}

    .patch-link:hover {
        border-left-color: #c89b3c;
        transform: translateX(5px);
        background-color: #222;
    }

.patch-link-content {
    flex-grow: 1;
}

.patch-link h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #f0e6d2;
    margin-bottom: 5px;
}

.patch-link p {
    color: #888;
}

.patch-previews-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.hero-icons-preview,
.item-icons-preview {
    display: flex;
    align-items: center;
}

.preview-icon {
    width: 36px;
    height: 36px;
    border: 2px solid #444;
    margin-left: -12px;
    background-color: #222;
    flex-shrink: 0; /* Prevent squashing on mobile */
}

.hero-icons-preview .preview-icon:first-child,
.item-icons-preview .preview-icon:first-child {
    margin-left: 0;
}

.hero-icon {
    border-radius: 50%;
    object-fit: cover;
}

.item-icon {
    border-radius: 0.375rem;
    object-fit: contain;
    padding: 2px;
}

.more-indicator {
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    color: #888;
    font-weight: bold;
    font-size: 1rem;
    line-height: 1;
}

/* Desktop: Hide icons after the 19th and show 'more' indicator if 20+ exist */
.preview-icon:nth-child(n+20) {
    display: none;
}

.preview-icon:nth-child(19) ~ .more-indicator {
    display: flex;
}

/* Mobile: Hide icons after the 3rd and show 'more' indicator if 4+ exist */
@media (max-width: 768px) {
    .preview-icon:nth-child(n+4) {
        display: none;
    }

    .preview-icon:nth-child(19) ~ .more-indicator {
        display: none; /* Hide desktop indicator */
    }

    .preview-icon:nth-child(3) ~ .more-indicator {
        display: flex; /* Show mobile indicator */
    }
}

/* --- Patch Detail Page Specific Styles --- */
.mid-patch-box {
    background-color: #1a1a1a;
    border-left: 3px solid #c89b3c;
    padding: 20px;
    margin: 25px 0;
    border-radius: 5px;
}

.mid-patch-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #f0e6d2;
    margin-bottom: 15px;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #c89b3c;
    margin-top: 30px;
    margin-bottom: 15px;
}

.change-block {
    margin-bottom: 25px;
}

.change-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 8px; /* Reduced gap between header and content */
}

.icon-container {
    width: 64px;
    height: 64px;
    background-color: #222;
    border: 1px solid #444;
    border-radius: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    flex-shrink: 0;
}

.icon-image {
    width: 110%;
    height: 110%;
    object-fit: cover;
}

/* Updated styles for text pips - Thicker and full height */
.change-list p {
    color: #ccc;
    line-height: 1.4; /* Tightened line height for desktop/mobile consistency */
    margin-left: 15px;
    padding-left: 12px;
    margin-bottom: 3px; /* Reduced vertical spacing between pips */
    margin-top: 0; /* Remove potential default margins */
    position: relative;
    border-left: none;
}

    .change-list p::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px; /* Increased width */
        background-color: #444;
        border-radius: 2px;
    }

    /* Indentation for tabbed lines */
    .change-list p.tabbed-line {
        margin-left: 35px; /* Adds 20px of extra indentation */
    }

    /* Gap indicator styles - Indented, gray, no pip */
    .change-list p.gap-indicator {
        margin-left: 35px;
        color: #888;
        font-family: monospace;
    }

        .change-list p.gap-indicator::before {
            content: none;
        }

.change-separator {
    width: 100%;
    height: calc(var(--gap-lines, 1) * 12px);
    /* Using 12px (half of 24px) as an approximation of line-height + margins to mimic empty lines */
    display: block;
    position: relative;
}

.ability-block {
    margin-top: 0.8rem; /* Slightly reduced top margin */
    padding-left: 11px;
}

.ability-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px; /* Reduced gap */
}

.ability-icon-container {
    width: 42px;
    height: 42px;
    background-color: #2a2a2a;
    border: 1px solid #555;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    flex-shrink: 0;
}

.ability-icon {
    width: 110%;
    height: 110%;
    object-fit: cover;
}

.ability-name {
    font-weight: 500;
    color: #d0d0d0;
}

.ability-changes-list p {
    color: #ccc;
    line-height: 1.4; /* Consistency */
    margin-left: 21px;
    padding-left: 12px;
    margin-bottom: 3px; /* Reduced vertical spacing */
    margin-top: 0;
    position: relative;
    border-left: none;
}

    .ability-changes-list p::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px; /* Increased width */
        background-color: #444;
        border-radius: 2px;
    }

    /* Ensure last paragraph doesn't add unnecessary space */
    .change-list p:last-child,
    .ability-changes-list p:last-child {
        margin-bottom: 0;
    }

.dark-icon-filter {
    filter: brightness(0) invert(1);
}

/* --- New Updates --- */

/* Blinking Indicator */
.new-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #c89b3c;
    border-radius: 50%;
    margin-right: 8px;
    animation: blink 1.2s infinite;
    vertical-align: middle;
    margin-bottom: 2px;
}

@keyframes blink {
    0% {
        opacity: 0;
    }

    40% {
        opacity: 1;
    }

    60% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

/* Mobile Fixes for Headers and Links 
   Targets both main headers (Hero/Item) and Ability headers
*/

/* 1. Force Flex Row & prevent wrapping */
a.change-header-link,
.ability-hover-trigger {
    text-decoration: none !important;
    color: inherit !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: nowrap !important; /* Forces icon and text to stay on same line */
    gap: 0.75rem !important;
}

    /* 2. Remove default link states */
    a.change-header-link:visited,
    a.change-header-link:active,
    a.change-header-link:focus,
    a.change-header-link:hover {
        color: inherit !important;
        text-decoration: none !important;
        outline: none;
    }

    /* 3. Ensure Text Styling persists */
    a.change-header-link h3 {
        color: #eaeaea !important;
        font-size: 1.25rem !important; /* Tailwind text-xl */
        line-height: 1.75rem !important;
        font-weight: 600 !important; /* Tailwind font-semibold */
        margin: 0 !important; /* Removes default browser margins causing gaps */
    }

    /* Ability Name Specifics */
    .ability-hover-trigger .ability-name {
        color: #d0d0d0 !important;
        font-weight: 500 !important;
        margin: 0 !important;
        white-space: nowrap; /* Prevent ability name wrapping if possible, or allow gracefully */
    }
