@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;    /* Deep Obsidian */
    --bg-card: #1e293b;    /* Gunmetal Gray */
    --bg-nav: #171921;     /* Slightly darker for depth */

    /* Buttons */
    --btn-nav-hover: #1f222c;
    --btn-nav-click: #282c37;
    --btn-nav-border: #2a3038;  /* Subtle Slate (Default borders) */

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

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

    /* Accents */
    --accent-primary: #2bbd8c; /* Emerald Green (Buttons/Tabs) */
    --accent-primary-ghost: rgba(43, 189, 140, 0.3);
    --accent-price: #12813b;
    --accent-sale: #f43f5e;    /* Rose Red (Discounts/Price) */
    --accent-border: #1d2127;  /* Subtle Slate (Default borders) */

    /* Text */
    --text-main: #f8fafc;      /* Pearl White */
    --text-muted: #94a3b8;     /* Muted Steel Gray */
}

body{
    display: flex;
    flex-direction: row;
    margin: 0;
    font-family: "IntelOneMono";
    color: var(--text-main);
    background-color: var(--bg-body);
    outline: 0px solid white;
    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{
    outline: 0px solid rgb(243, 232, 32);
    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;
        outline: 0px solid green;
        gap: 12px;

        .profile{
            display: flex;
            height: 60px;
            align-items: center;
            padding: 10px;
            outline: 0px solid blue;
            
            
        }

        .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;
            outline: 0px solid olivedrab;
            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);
        }

        .home{
            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{
    flex-direction: column;
    align-items: center;
    outline: 0px solid blue;
    width: 100%;
}

.top {
    display: flex;
    align-items: center;
    justify-content: center;
    outline: 0px solid rgb(92, 182, 92);
    width: 100%;

    .top-wrapper {
        display: flex;
        flex-direction: column;
        outline: 0px solid orange;
        width: 100%;
        max-width: 1200px;
        padding: 24px;
        gap: 24px;
        .top-text{
            width: fit-content;
            font-family: "ElmsSans", "IntelOneMono", sans-serif;
            font-size: 48px;
            font-weight: bold;
            color: var(--text-main);
            letter-spacing: 0.02em;
        }

        .carousel {
            display: flex;
            align-items: center;
            overflow: hidden;
            gap: 10px;
            outline: 0px solid blue;
        }

        .carousel-viewport {
            flex: 1;
            min-width: 0;
            outline: 0px solid white;
        }

        .game-featured-wrapper {
            display: flex;
            flex-direction: row;
            align-items: center;
            max-width: 100%;
            overflow-x: auto;
            scroll-snap-type: x mandatory;
            scrollbar-width: none;
            gap: 24px;
            outline: 0px solid red;
        }

        .game-featured-highlight {
            position: relative;
            overflow: hidden;
            flex-shrink: 0;
            height: 350px;
            width: calc((100% - (24px * 2)) / 4.15);
            scroll-snap-align: start;
            aspect-ratio: 3/4;
            scroll-snap-stop: normal;
            cursor: pointer;
            overflow: hidden;
            border-radius: 12px;
            border: 1px solid var(--card-border);
            box-shadow: 0px 10px 15px 0px rgba(13, 14, 19, 1);
            outline: 0px solid gold;

            img {
                width: 100%;
                height: 100%;
                object-fit: cover;
                object-position: center top;
                display: block;
            }
        }


        .carousel-btn {
            all: unset;
            cursor: pointer;
            background: var(--btn-section);
            border: var(--btn-section-border);
            color: white;
            font-size: 20px;
            padding: 10px 14px;
            border-radius: 6px;
            flex-shrink: 0;
            transition: background 0.2s;
            z-index: 1;

            &:hover {
                background: var(--btn-section-hover);
                border: var(--btn-section-hover);
            }
        }
    }
}

.bot{
    outline: 0px solid rgb(128, 79, 0);
    padding: 30px;

    .bot-wrapper{
        display: flex;
        flex-direction: column;
        align-items: center;
        outline: 0px solid orange;

        .bot-header{
            display: flex;
            flex-direction: row;
            justify-content: space-between;
            width: 96.5%;
            outline: 0px solid blue;

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

            .tabs{
                display: flex;
                flex-direction: row;
                align-items: center;
                outline: 0px solid green;

                .filter-list{
                    display: flex;
                    flex-direction: row;
                    align-items: center;
                    justify-content: center;
                    gap: 24px;

                    .filter{
                        all: unset;
                        font-size: 16px;
                        padding: 10px;
                        padding-left: 18px;
                        padding-right: 18px;
                        border-radius: 16px;
                        cursor: pointer;
                        background-color: var(--btn-section);
                        border: 1px solid var(--btn-section-border);
                        transition: all 0.2s ease-in-out;
                        outline: 0px solid red;
                    }

                    .filter:hover{
                        background-color: var(--btn-section-hover);
                        border: 1px solid var(--btn-section-hover-border);
                        box-shadow: 0px 0px 12px 6px rgba(13, 14, 19, 0.5);
                    }
                }
            }

            .search {
                all: unset;
                padding: 8px 16px;
                border-radius: 16px;
                font-size: 14px;
                font-family: "IntelOneMono";
                color: var(--text-main);
                background-color: var(--btn-section);
                border: 1px solid var(--btn-section-border);
                transition: all 0.2s ease-in-out;
        }

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

        .search:focus {
            border: 1px solid var(--accent-primary);
            box-shadow: 0px 0px 10px 2px var(--accent-primary-ghost);
        }
        }

        .game-list{ 
            display: grid;
            grid-template-columns: repeat(auto-fit, 192px); 
            justify-content: center;
            width: 90%;
            gap: 24px;
            padding-top: 24px;
            padding-bottom: 24px;
            outline: 0px solid rgb(255, 255, 255);
            
            .game-card{
                position: relative;
                overflow: hidden;
                height: 272px;
                width: 192px;
                border-radius: 6px;
                color: var(--bg-body);
                outline: 0px solid #203e68;
                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: flex;
                    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;
                    height: 100%;
                    width: 100%;
                    opacity: 0;
                    z-index: 2;
                    background: #000000;
                    background: radial-gradient(
                                circle,
                                rgba(0, 0, 0, 0) 50%, 
                                rgba(0, 0, 0, 0.7) 100%);
                    transition: opacity 0.2s ease-in-out;

                    .card-header{
                        display: flex;
                        justify-content: space-between;
                        outline: 0px solid blue;
                        
                        .price{
                            display: flex;
                            justify-content: center;
                            align-items: center;
                            height: 26px;
                            width: 96px;
                            margin: 12px;
                            border-radius: 6px;
                            font-size: 12px;
                            font-weight: bold;
                            font-family: "IntelOneMono";
                            background-color: var(--accent-price);
                            border: 2px solid var(--btn-section-border);
                            opacity: 1;
                        }

                    }

                    .card-footer{
                        display: flex;
                        justify-content: space-between;
                        align-items: center;
                        gap: 12px;
                        padding: 12px;
                        outline: 0px solid rgb(0, 179, 255);

                        .view-btn{
                            all: unset;
                            display: flex;
                            align-items: center;
                            justify-content: center;
                            height: 28px;
                            width: 100%;
                            border-radius: 6px;
                            font-size: 12px;
                            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;
                            opacity: 0.9;
                        }

                        .view-btn:hover{
                            border: 2px solid 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;
                            border: transparent;
                            cursor: pointer;
                            height: 30px;
                            width: 30px;
                            border-radius: 6px;
                            border: 2px solid var(--btn-section-border);
                            transition: all 0.2s ease-in-out;
                            opacity: 0.9;


                            .wishlist-star{
                                font-size: 16px;
                                font-variation-settings:
                                    'FILL' 0;
                                scale: 0.9;
                                color: white;
                            }
                        }

                        .wishlist-btn:hover{
                            border: 2px solid 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[status="1"]{
                outline: 3px solid var(--accent-primary);
            }

            .game-card[status="1"] .wishlist-btn{
                background-color: var(--accent-sale);
            }
            .game-card[status="0"] .wishlist-btn{
                background-color: var(--accent-price);
            }
        }
    }
}

/* ── 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);
}
