@font-face {
  font-family: 'ElmsSans';
  src: url('../components/fonts/ElmsSans.ttf') format('truetype');
}

@font-face {
  font-family: 'IntelOneMono';
  src: url('../components/fonts/IntelOneMono.ttf') format('truetype');
}

:root {
    /* Backgrounds */
    --bg-body: #13151c;
    --bg-card: #1e293b;
    --bg-nav: #171921;

    /* Buttons */
    --btn-nav-hover: #1f222c;
    --btn-nav-click: #282c37;
    --btn-nav-border: #2a3038;

    --btn-section: #1d2027;
    --btn-section-border: #292c37;
    --btn-section-hover: #282c39;
    --btn-section-hover-border: #3c4051;

    /* Card */
    --card-border: #272932;

    /* Accents */
    --accent-primary: #2bbd8c;
    --accent-primary-ghost: rgba(43, 189, 140, 0.3);
    --accent-price: #12813b;
    --accent-sale: #f43f5e;
    --accent-border: #1d2127;

    /* Text */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
}

body {
    display: flex;
    flex-direction: row;
    margin: 0;
    font-family: "IntelOneMono";
    color: var(--text-main);
    background-color: var(--bg-body);
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
}


nav {
    display: flex;
    flex-direction: column;
    height: 100vh;
    min-width: 250px;
    position: sticky;
    top: 0;
    border-right: 1px solid var(--accent-border);
    background-color: var(--bg-nav);

    .logo-wrapper {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 38px;
        gap: 4px;

        .logo img {
            width: 123px;
            height: auto;
        }

        .logo-text {
            font-family: "ElmsSans", "IntelOneMono", sans-serif;
            font-size: 20px;
            font-weight: bold;
            color: var(--text-main);
            letter-spacing: 0.05em;
        }

        .logo-tagline {
            font-family: "IntelOneMono", monospace;
            font-size: 13px;
            color: var(--text-muted);
            letter-spacing: 0.02em;
        }
    }

    .tab-wrapper {
        display: flex;
        flex-direction: column;
        flex: 1;
        gap: 12px;

        .tab {
            all: unset;
            display: flex;
            align-items: center;
            cursor: pointer;
            font-weight: normal;
            gap: 12px;
            margin-left: 12px;
            margin-right: 12px;
            padding: 8px;
            padding-left: 12px;
            border-radius: 6px;
            font-size: 16px;
            background-color: transparent;
            border: 1px solid transparent;
            transition: all 0.2s ease-in-out;
        }

        .tab:hover {
            background-color: var(--btn-nav-hover);
            border: 1px solid var(--btn-nav-border);
            box-shadow: 0px 8px 15px 6px rgba(0,0,0,0.15);
        }

        .tab:active {
            border: 1px solid var(--btn-nav-click);
            background-color: var(--btn-nav-border);
        }

        .wishlist {
            border: 1px solid var(--accent-primary);
            background-color: var(--accent-primary-ghost);
        }

        .material-symbols-outlined {
            transition: all 0.2s ease-in-out;
        }

        .tab:hover .material-symbols-outlined {
            color: var(--accent-primary);
        }

        .line-seperator {
            all: unset;
            margin-left: 36px;
            margin-right: 36px;
            border-bottom: 1px solid var(--btn-nav-border);
        }


    }
}


main {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    min-height: 100vh;

    .wrapper-header {
        display: flex;
        align-items: baseline;
        gap: 16px;
        width: 90%;
        padding: 32px 24px 8px;

        .title {
            font-family: "ElmsSans", "IntelOneMono", sans-serif;
            font-size: 48px;
            font-weight: bold;
            color: var(--text-main);
            letter-spacing: 0.02em;
        }

        .game-counter {
            font-size: 14px;
            color: var(--text-muted);
            padding: 4px 12px;
            border-radius: 12px;
            background-color: var(--btn-section);
            border: 1px solid var(--btn-section-border);
        }
    }

    .wishlist-header-controls {
        display: flex;
        justify-content: flex-end;
        width: 90%;
        padding: 0 24px 16px 24px;
    }

    .search {
        background-color: var(--btn-section);
        border: 1px solid var(--btn-section-border);
        color: var(--text-main);
        padding: 10px 16px;
        border-radius: 6px;
        font-family: "IntelOneMono", monospace;
        font-size: 14px;
        outline: none;
        width: 250px;
        transition: all 0.2s ease;
    }

    .search:focus {
        border-color: var(--accent-primary);
        box-shadow: 0 0 0 3px var(--accent-primary-ghost);
    }

    .search::placeholder {
        color: var(--text-muted);
    }
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 80px 0;
    color: var(--text-muted);

    .empty-icon {
        font-size: 48px;
        opacity: 0.3;
    }

    .empty-text {
        font-size: 16px;
        opacity: 0.5;
    }

    .empty-link {
        margin-top: 8px;
        font-size: 14px;
        color: var(--accent-primary);
        text-decoration: none;
        padding: 8px 20px;
        border-radius: 8px;
        border: 1px solid var(--accent-primary);
        background-color: var(--accent-primary-ghost);
        transition: all 0.2s ease-in-out;
    }

    .empty-link:hover {
        background-color: var(--accent-primary);
        color: var(--bg-body);
    }
}

.wishlist-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, 192px);
    justify-content: center;
    width: 90%;
    gap: 24px;
    padding: 24px;

    .game-card {
        position: relative;
        overflow: hidden;
        height: 272px;
        width: 192px;
        color: var(--bg-body);
        border-radius: 6px;
        border: 1px solid var(--card-border);
        box-shadow: 0px 10px 15px 0px rgba(13, 14, 19, 1);
        transition: all 0.2s ease-in-out;

        img {
            display: block;
            height: 100%;
            width: 100%;
            border-radius: 6px;
            object-fit: fill;
            object-position: center;
            z-index: 1;
            transition: scale 0.2s ease-in-out;
        }

        .card-overlay {
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            position: absolute;
            inset: 0;
            opacity: 0;
            z-index: 2;
            background: radial-gradient(
                circle,
                rgba(0, 0, 0, 0) 50%,
                rgba(0, 0, 0, 0.75) 100%
            );
            transition: opacity 0.2s ease-in-out;

            .card-header {
                display: flex;
                justify-content: space-between;
                align-items: center;
                padding: 12px;

                .price {
                    display: flex;
                    justify-content: center;
                    align-items: center;
                    height: 26px;
                    min-width: 72px;
                    padding: 0 8px;
                    border-radius: 6px;
                    font-size: 11px;
                    font-weight: bold;
                    font-family: "IntelOneMono";
                    background-color: var(--accent-price);
                    border: 2px solid var(--btn-section-border);
                    white-space: nowrap;
                }

                .priority-btn {
                    display: flex;
                    justify-content: center;
                    align-items: center;
                    height: 32px;
                    width: 32px;
                    border: none;
                    cursor: pointer;
                    background-color: transparent;
                    transition: all 0.2s ease-in-out;

                    .high-prio-star {
                        font-variation-settings: 'FILL' 0;
                        font-size: 22px;
                        color: white;
                        transition: all 0.15s ease;
                    }
                }

                .priority-btn:hover {
                    scale: 1.15;
                }

                .priority-btn[priority="true"] .high-prio-star {
                    font-variation-settings: 'FILL' 1;
                    color: #fbbf24;
                    filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.6));
                }
            }

            .card-footer {
                display: flex;
                justify-content: space-between;
                align-items: center;
                gap: 8px;
                padding: 12px;

                .view-btn {
                    all: unset;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    height: 28px;
                    width: 100%;
                    border-radius: 6px;
                    font-size: 11px;
                    cursor: pointer;
                    font-weight: bold;
                    font-family: "IntelOneMono";
                    background-color: var(--accent-primary);
                    border: 2px solid var(--btn-section-border);
                    transition: all 0.2s ease-in-out;
                }

                .view-btn:hover {
                    border-color: var(--btn-section-hover-border);
                    box-shadow: 0px 0px 8px 3px rgba(13, 14, 19, 0.3);
                    scale: 1.05;
                }

                .wishlist-btn {
                    display: flex;
                    justify-content: center;
                    align-items: center;
                    flex-shrink: 0;
                    height: 30px;
                    width: 30px;
                    border-radius: 6px;
                    background-color: var(--accent-sale);
                    border: 2px solid var(--btn-section-border);
                    cursor: pointer;
                    transition: all 0.2s ease-in-out;

                    .material-symbols-outlined {
                        font-size: 16px;
                        color: white;
                    }
                }

                .wishlist-btn:hover {
                    border-color: var(--btn-section-hover-border);
                    box-shadow: 0px 0px 8px 3px rgba(13, 14, 19, 0.3);
                    scale: 1.1;
                }
            }
        }

        .card-overlay:hover {
            opacity: 1;
        }
    }

    .game-card:hover {
        scale: 1.05;
    }

    .game-card:has(.priority-btn[priority="true"]) {
        outline: 3px solid #fbbf24;
        box-shadow: 0px 10px 20px 0px rgba(251, 191, 36, 0.15);
    }
}

/* ── Profile / Auth flat rules (not nested — for broad browser compatibility) ── */
.nav-bottom {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 20px;
}

.nav-bottom .line-seperator {
    margin-left: 24px;
    margin-right: 24px;
    border-bottom: 1px solid var(--btn-nav-border);
}

.profile-block {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 12px;
    margin-right: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid var(--btn-nav-border);
    background-color: var(--btn-nav-hover);
}

.profile-block.hidden {
    display: none !important;
}

.profile-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--accent-primary);
    color: var(--bg-body);
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.profile-label {
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.profile-name {
    font-size: 14px;
    font-weight: bold;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.auth-tab.logout-mode {
    color: var(--accent-sale);
}

.auth-tab.logout-mode .material-symbols-outlined {
    color: var(--accent-sale);
}

.auth-tab.logout-mode:hover {
    border-color: var(--accent-sale);
    background-color: rgba(244, 63, 94, 0.1);
}
