/* Override body background for cosmic background pages */
body {
    background-color: transparent !important;
    background-image: none !important;
}

/* --- Header Animation --- */
/* Defines the style for the page header elements with animation. */
.page-header {
    opacity: 0; /* Starts the header as invisible for animation. */
    transform: translateY(1.25rem); /* Moves the header down slightly before it animates in. */
    transition: opacity 0.5s ease-out, transform 0.5s ease-out; /* Adds smooth transitions for appearance effects. */
}

/* Defines the style for the header when it becomes visible (class added by JavaScript). */
.page-header.visible {
    opacity: 1; /* Makes the header fully visible. */
    transform: translateY(0); /* Moves the header to its original position. */
}

/* --- Crosshair Cards Animation --- */
/* Defines the style for crosshair cards with animation. */
.crosshair-card {
    opacity: 0; /* Starts the card as invisible for animation. */
    transform: translateY(1.25rem); /* Moves the card down slightly before it animates in. */
    transition: opacity 0.5s ease-out, transform 0.5s ease-out, all 0.3s ease; /* Adds smooth transitions for appearance effects. */
}

/* Defines the style for the crosshair card when it becomes visible (class added by JavaScript). */
.crosshair-card.visible {
    opacity: 1; /* Makes the card fully visible. */
    transform: translateY(0); /* Moves the card to its original position. */
}

.crosshairs-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
    gap: 1.5rem;
    padding: 1.5rem;
}

.crosshair-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 0.25rem 0.9375rem rgba(0,0,0,0.2);
}

.crosshair-card:hover {
    transform: translateY(-0.3125rem);
    border-color: rgba(255, 255, 255, 0.2);
}

.crosshair-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.character-portrait {
    width: 4rem;
    height: 4rem;
    object-fit: cover;
    border-radius: 50%;
    border: 0.125rem solid var(--primary-accent);
}

.crosshair-card h3 {
    margin: 0;
    font-size: 1.5rem;
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 1px;
    color: #fff;
}

.crosshair-preview-container {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: url('../images/maps/central-park.png');
    background-size: cover;
    background-position: center;
}

.crosshair-preview-image {
    width: 8rem;
    height: 8rem;
}

.crosshair-code-wrapper {
    display: flex;
    align-items: center;
    background: rgba(0,0,0,0.3);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
}

.crosshair-code {
    flex-grow: 1;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    color: #e0e0e0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.copy-button {
    background-color: var(--primary-accent);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}

.copy-button:hover {
    background-color: var(--primary-accent-dark);
}

/* --- Search Bar --- */
.search-container {
    margin-top: 1.5rem;
}

#search-input {
    width: 100%;
    max-width: 25rem;
    padding: 0.75rem 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    color: #fff;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

#search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

#search-input:focus {
    outline: none;
    border-color: var(--primary-accent);
    background-color: rgba(255, 255, 255, 0.15);
}

.no-results {
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    grid-column: 1 / -1;
    font-size: 1.2rem;
    padding: 2rem;
}
