main {
    width: 90%;
}

@media (min-width: 1440px) {
    main {
        width: 80%;
    }
}

.gameLink {
    text-align: center;
}

.gameImg {
    max-width: 90%;
    border-radius: 16px;
    display: block;
    margin: 0 auto;
}

/* Stile für die neuen Steuerelemente */
.view-controls {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    align-items: center;
    margin-bottom: 2.5rem;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* When not all items fit in one row: search + type on top, rest below */
@media (max-width: 1200px) {
    .view-controls {
        grid-template-columns: 1fr 1fr 1fr;
    }

    /* Search bar spans the first 1.5 of 3 cols → use 3-col grid trick */
    /* Row 1: search (col 1-2) + type dropdown (col 3) */
    /* Row 2: multiplayer (col 1) + category (col 2) + sort (col 3) */
    .view-controls>.search-bar {
        grid-column: 1 / 3;
    }

    .view-controls>div:nth-child(2) {
        grid-column: 3 / 4;
    }
}

/* Mobile: full-width stack */
@media (max-width: 768px) {
    .view-controls {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .view-controls>.search-bar,
    .view-controls>div:nth-child(2) {
        grid-column: 1 / -1;
    }
}

/* Search bar icon wrapper */
.search-bar-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.search-bar-wrapper .search-icon {
    position: absolute;
    left: 0.9rem;
    color: var(--text-grey);
    font-size: 0.95rem;
    pointer-events: none;
    z-index: 1;
}

.search-bar input,
.category-filter select {
    width: 100%;
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-color);
    transition: all 0.3s ease;
}

/* Override padding-left for search to make room for the icon — must come AFTER the general rule */
.search-bar-wrapper input {
    padding-left: 2.5rem;
    width: 100%;
}


.search-bar input:focus,
.category-filter select:focus {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(162, 76, 255, 0.2);
}

.category-filter {
    min-width: 200px;
}



.game-card {
    display: block;
    /* Glas-Effekt ist jetzt standardmäßig AUS */
    background: transparent;
    border: none;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-card:hover {
    transform: translateY(-8px);
}

.game-card .gameImg {
    width: 100%;
    display: block;
}

.game-card .game-details {
    flex-grow: 1;
}

/* Titel in der Grid-Ansicht: als Overlay, standardmäßig versteckt */
.game-details {
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0) 100%);
    padding: 1.5rem 0.75rem 0.6rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    border-radius: 0 0 16px 16px;
    z-index: 2;
}

.game-card:hover .game-details {
    transform: translateY(0);
}

.game-title {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Attribute standardmäßig ausblenden */
.game-attributes {
    display: none;
    font-size: 0.9rem;
    color: var(--text-grey);
    margin-top: 0.5rem;
}



.game-attributes span {
    display: inline-block;
    margin-right: 1.5rem;
}

.game-attributes span strong {
    color: var(--text-color);
}

.game-card {
    position: relative;
    /* This is crucial for positioning the ::before pseudo-element */
    /* The overflow: hidden is already set, which is perfect for clipping the shine */
}

/* 2. Create the shine element itself */
.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 60%;
    /* The width of the shine highlight */
    height: 100%;
    z-index: 1;
    /* Ensures the shine is on top of the image */

    /* The angled gradient that creates the shine */
    background: linear-gradient(100deg,
            rgba(255, 255, 255, 0) 20%,
            rgba(255, 255, 255, 0.25) 50%,
            rgba(255, 255, 255, 0) 80%);

    /* Initially position the shine off-screen to the left and add a skew */
    transform: translateX(-160%) skewX(-25deg);
    /* MODIFIED */

    /* Add a smooth transition for the movement */
    transition: transform 0.85s cubic-bezier(0.23, 1, 0.32, 1);
}

/* 3. Trigger the animation on hover */
.game-card:hover::before {
    /* Move the shine across and off-screen to the right */
    transform: translateX(270%) skewX(-25deg);
    /* MODIFIED */
}



/* FIX: Make the image fill the entire card (Standard) */
.game-card .gameImg {
    width: 100%;
    /* Ensure it fills the container's width */
    max-width: 100%;
    /* Override max-width from games.css */
    margin-bottom: 0;
    /* Remove bottom margin for a snug fit */
    border-radius: 0;
    /* Let the parent card handle the rounded corners */
    height: 100%;
    object-fit: cover;
}

/* NEW: Style for the new game label */
.new-game-label {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #a24cff;
    /* Violet */
    color: white;
    padding: 5px 10px;
    font-size: 0.8rem;
    font-weight: bold;
    border-radius: 5px;
    z-index: 3;
    /* Above shine and details */
    text-transform: uppercase;
}



/* On mobile, make filters stack - from inline styles in apps.html */
@media (max-width: 767px) {
    .view-controls {
        flex-direction: column;
        /* Stack them */
    }
}

/* ============ NEUJAHRS COUNTDOWN BANNER ============ */
.neujahr-banner {
    display: block;
    margin-top: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-decoration: none;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg,
            rgba(255, 215, 0, 0.2) 0%,
            rgba(255, 165, 0, 0.2) 25%,
            rgba(255, 107, 107, 0.2) 50%,
            rgba(255, 165, 0, 0.2) 75%,
            rgba(255, 215, 0, 0.2) 100%);
    background-size: 400% 400%;
    animation: banner-gradient 8s ease infinite;
    border: 2px solid rgba(255, 215, 0, 0.4);
    transition: all 0.3s ease;
}

.neujahr-banner:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 40px rgba(255, 215, 0, 0.3);
    border-color: rgba(255, 215, 0, 0.7);
}

@keyframes banner-gradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.neujahr-banner-content {
    display: flex;
    align-items: center;
    padding: 1.25rem 1.5rem;
    gap: 1rem;
    backdrop-filter: blur(10px);
}

.neujahr-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border-radius: 12px;
    color: #1a1a2e;
    animation: icon-pulse 2s ease-in-out infinite;
}

@keyframes icon-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.neujahr-text {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.neujahr-title {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, #FFD700, #FFA500, #FF6B6B);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.neujahr-subtitle {
    font-size: 0.9rem;
    color: var(--text-grey);
}

.neujahr-arrow {
    flex-shrink: 0;
    color: #FFD700;
    transition: transform 0.3s ease;
}

.neujahr-banner:hover .neujahr-arrow {
    transform: translateX(5px);
}

/* Responsive */
@media (max-width: 480px) {
    .neujahr-banner-content {
        padding: 1rem;
    }

    .neujahr-icon {
        width: 40px;
        height: 40px;
    }

    .neujahr-icon svg {
        width: 24px;
        height: 24px;
    }

    .neujahr-title {
        font-size: 1rem;
    }

    .neujahr-subtitle {
        font-size: 0.8rem;
    }
}

/* ============ APPLE WATCH LAYOUT ============ */
@media (max-width: 220px) {

    /* Hide non-watch compatible apps */
    .watch-incompatible {
        display: none !important;
    }

    /* Hide all filter controls */
    .view-controls {
        display: none !important;
    }

    /* Single column cards */
    .game-card-wrapper.watch-compatible {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        padding: 0.15rem !important;
        margin-bottom: 0.25rem !important;
        display: block !important;
    }

    .game-card {
        border-radius: 8px;
    }

    .gameImg {
        height: 80px !important;
        object-fit: cover;
        border-radius: 8px !important;
    }

    /* Show title on watch for navigation */
    .game-details {
        display: block !important;
        position: static !important;
        transform: none !important;
        background: none !important;
        padding: 0.15rem !important;
    }

    .game-title {
        font-size: 0.6rem !important;
        padding: 0.15rem;
        text-align: center;
        color: var(--text-color);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Hide attributes on watch */
    .game-attributes {
        display: none !important;
    }

    /* Hide labels (NEU etc) */
    .new-game-label {
        font-size: 0.45rem;
        padding: 2px 4px;
        top: 4px;
        right: 4px;
    }

    /* Hide card hover effects */
    .game-card:hover {
        transform: none;
    }

    .game-card::before {
        display: none;
    }

    /* Reduce page title */
    #page-title {
        font-size: 0.9rem !important;
    }

    /* Hide action buttons */
    .d-flex.justify-content-center.gap-3.mt-5.pb-5 {
        display: none !important;
    }

    /* Hide new year banner */
    .neujahr-banner {
        display: none !important;
    }

    /* Main apps container */
    main {
        width: 100% !important;
    }

    .container-fluid {
        padding: 0 !important;
    }

    .row {
        margin: 0 !important;
    }
}

/* ============ NO RESULTS EMPTY STATE ============ */
.no-results-msg {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-grey);
    animation: fadeIn 0.4s ease;
}

.no-results-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
    display: block;
    opacity: 0.5;
}

.no-results-msg p {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

.no-results-msg small {
    font-size: 0.85rem;
    opacity: 0.6;
}