:root {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    
    --bg-sidebar-glass: rgba(13, 17, 23, 0.9);
    --bg-content-wrapper-glass: rgba(13, 17, 23, 0.65);
    --bg-card-glass: rgba(22, 27, 34, 0.75);

    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --border-color: #30363d;
    --accent-primary: #1f8bff;
    --accent-primary-hover: #389dff;
    --glow-color: rgba(31, 139, 255, 0.5);
    --color-success: #238636;
    --color-failure: #da3633;
    --shadow-light: rgba(0, 0, 0, 0.2);
    --shadow-medium: rgba(0, 0, 0, 0.4);
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-primary);
    margin: 0;
    overflow: hidden;
}

.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
}
.video-background video {
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: cover;
}
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

.hidden { display: none !important; }
body.no-scroll { overflow: hidden; }

.grid-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    grid-template-rows: 100vh;
    height: 100vh;
    background: transparent;
}

.sidebar {
    background-color: var(--bg-sidebar-glass);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 25px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
}

.content-wrapper {
    overflow-y: auto;
    padding: 30px;
    background-color: var(--bg-content-wrapper-glass);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
}

#content-area {
    max-width: 100%;
    margin: 0 auto;
    width: 100%; 
    flex-grow: 1;
    display: flex;
}

.content-pane.active {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    width: 100%;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, 196px);
    justify-content: center;
    align-items: start;
    gap: 18px;
    flex-grow: 1;
}

#search-title {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.content-pane { display: none; }


.sidebar h1 {
    font-size: 1.8rem;
    color: var(--accent-primary);
    margin: 0 0 25px 0;
    text-align: center;
    font-weight: 600;
}
.search-container {
    position: relative;
    margin-bottom: 25px;
}
#search-bar {
    width: 100%;
    padding: 10px 40px 10px 15px;
    font-size: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
}
#search-bar:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--glow-color);
}
#search-button, #clear-button {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 45px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    background-repeat: no-repeat;
    background-position: center;
}
#search-button {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%238b949e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
}
#clear-button {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%238b949e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E");
}
.tabs {
    display: flex;
    flex-direction: column;
    gap: 5px;
    overflow-y: auto;
    flex-grow: 1;
}
.tabs button {
    width: 100%;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    background-color: transparent;
    border: none;
    padding: 12px 15px;
    cursor: pointer;
    border-radius: 8px;
    text-align: left;
    transition: color 0.2s, background-color 0.2s;
}
.tabs button:hover {
    background-color: rgba(22, 27, 34, 0.5);
    color: var(--text-primary);
}
.tabs button.active {
    background-color: var(--accent-primary);
    color: #ffffff;
    font-weight: 600;
}
.sidebar-footer {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 0.85rem;
}
.sidebar-footer a {
    color: var(--text-secondary);
    text-decoration: none;
}
.sidebar-footer a:hover {
    text-decoration: underline;
}
.navigation-hint {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    color: var(--text-secondary);
}
.navigation-hint img { width: 24px; filter: invert(75%); }

.pkg-card {
    background-color: var(--bg-card-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 0;
}
.pkg-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px var(--glow-color);
}

.pkg-card .img-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #000;
    border-radius: 12px 12px 0 0;
}
.pkg-card .btn-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.pkg-card .no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--text-secondary);
    background: var(--bg-primary);
}
.pkg-card .info {
    padding: 10px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.pkg-card .title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 5px 0;
    line-height: 1.4; 
    min-height: 2.8em;
    max-height: 2.8em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.pkg-card .file-size {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0;
    margin-top: auto;
    line-height: 1.4;
    min-height: 1.4em;
}

.badge-container {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: flex;
    gap: 6px;
}

.pack-badge, .size-badge {
    font-size: 0.75rem;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 6px;
    text-transform: uppercase;
}

.pack-badge {
    background-color: var(--accent-primary);
    color: white;
}

.size-badge {
    background-color: rgba(0, 0, 0, 0.5);
    color: var(--text-primary);
}

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 14px 0 4px 0;
    margin-top: auto;
    flex-wrap: wrap;
}

.pagination-controls button {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    min-width: 40px;
    height: 40px;
    padding: 6px 12px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.pagination-controls button:hover {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
}

.pagination-controls button:disabled {
    background-color: transparent;
    color: var(--text-secondary);
    border-color: var(--border-color);
    cursor: not-allowed;
    opacity: 0.45;
}

.category-pagination .page-number {
    min-width: 40px;
}

.category-pagination .page-number.active {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
    cursor: default;
}

.category-pagination .pagination-arrow {
    font-size: 0.9rem;
    padding-left: 10px;
    padding-right: 10px;
}

.category-pagination .pagination-refresh {
    margin-left: 12px;
    min-width: auto;
    padding-left: 14px;
    padding-right: 14px;
}

.category-pagination .pagination-refresh.refreshing {
    opacity: 0.6;
    cursor: wait;
}

.page-info {
    font-size: 1rem;
    color: var(--text-secondary);
}
#loading {
    text-align: center;
    padding: 50px;
    font-size: 1.2rem;
    color: var(--text-secondary);
    background-color: var(--bg-card-glass);
    border-radius: 12px;
}
#loading .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.blocker {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(13, 17, 23, 0.6);
    backdrop-filter: blur(5px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-content, .blocker-message {
    background-color: var(--bg-secondary);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 30px var(--shadow-medium);
    width: 90%;
    max-width: 550px;
}
.modal-content h2 { margin-top: 0; font-size: 1.5rem; }
.pack-list-scroll {
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    padding: 8px;
    border-radius: 8px;
    list-style: none;
    margin: 15px 0;
}
.pack-list-scroll li {
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}
.pack-list-scroll li:last-child { border-bottom: none; }
.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}
.btn-modal {
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 20px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.btn-cancel {
    background-color: transparent;
    color: var(--text-primary);
}
.btn-cancel:hover { background-color: var(--bg-secondary); }
.btn-confirm {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}
.btn-confirm:hover { background-color: var(--accent-primary-hover); }
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 500;
    color: #fff;
    box-shadow: 0 4px 15px var(--shadow-medium);
    display: flex;
    align-items: center;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
}
.toast.success { 
    background-color: var(--color-success);
    border: none;
}
.toast.failure { 
    background-color: var(--color-failure);
    border: none;
}

/* ===== Compact PKG list layout ===== */

.gallery {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    justify-content: flex-start;
    align-items: stretch;
}

.pkg-card {
    width: 100%;
    min-height: 64px;
    height: 64px;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 6px 12px 6px 6px;
    border-radius: 8px;
    overflow: hidden;
}

.pkg-card:hover {
    transform: none;
}

.pkg-card .img-container {
    width: 52px;
    height: 52px;
    min-width: 52px;
    aspect-ratio: auto;
    border-radius: 6px;
    overflow: hidden;
    background-color: #000;
}

.pkg-card .btn-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pkg-card .no-image {
    width: 100%;
    height: 100%;
    font-size: 0.65rem;
    text-align: center;
}

.pkg-card .info {
    padding: 0 12px;
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-grow: 1;
    min-width: 0;
    gap: 15px;
}

.pkg-card .title {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.3;
    min-height: 0;
    max-height: 2.6em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pkg-card .file-size {
    flex: 0 0 90px;
    margin: 0;
    min-height: 0;
    text-align: right;
    font-size: 0.8rem;
    white-space: nowrap;
}


/* ===== PKG row alignment fix ===== */

.pkg-card {
    width: 100%;
    min-height: 70px;
    height: 70px;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 7px 14px 7px 7px;
    margin: 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-card-glass);
    overflow: hidden;
}

.pkg-card:hover {
    transform: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px var(--glow-color);
}

.pkg-card .img-container {
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    min-width: 56px;
    border-radius: 6px;
    overflow: hidden;
}

.pkg-card .info {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    height: 100%;
    padding: 0 0 0 14px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
}

.pkg-card .title {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    font-size: 0.95rem;
    line-height: 1.3;
}

.pkg-card .file-size {
    flex: 0 0 100px;
    width: 100px;
    min-width: 100px;
    margin: 0;
    padding: 0;
    text-align: right;
    white-space: nowrap;
    font-size: 0.8rem;
    color: var(--text-secondary);
}


/* ===== Folder navigation ===== */

.folder-card {
    width: 100%;
    min-height: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-card-glass);
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.folder-card:hover {
    border-color: var(--accent-primary);
    background-color: rgba(31, 139, 255, 0.10);
    box-shadow: 0 0 10px var(--glow-color);
}

.folder-icon {
    width: 40px;
    min-width: 40px;
    font-size: 1.6rem;
    text-align: center;
}

.folder-name {
    font-weight: 500;
}

.folder-back {
    background-color: rgba(22, 27, 34, 0.55);
    color: var(--text-secondary);
}


/* Folder navigation sits above the package grid so it does not consume a package-card slot. */
.folder-navigation {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    min-height: 48px;
    margin-bottom: 4px;
}

.folder-navigation .folder-card {
    flex-shrink: 0;
}

/* Download queue selection */
.pkg-card.queue-selected {
    outline: 3px solid var(--accent-primary);
    outline-offset: -3px;
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.35);
    transform: scale(0.98);
}

/* Queue count indicator */
.queue-indicator {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
    display: none;
    padding: 10px 16px;
    border-radius: 10px;
    background: var(--accent-primary);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.queue-indicator.visible {
    display: block;
}


/* PS5-safe folder icon - preserves the existing left-aligned card layout */
.folder-icon-css {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 42px;
    margin: 0;
    flex-shrink: 0;
    border-radius: 4px;
    background: var(--accent-primary);
    border: 2px solid rgba(255, 255, 255, 0.35);
    box-sizing: border-box;
}

/* Folder tab */
.folder-icon-css::before {
    content: '';
    position: absolute;
    left: -2px;
    top: -9px;
    width: 25px;
    height: 11px;
    border-radius: 4px 4px 0 0;
    background: var(--accent-primary);
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-bottom: 0;
    box-sizing: border-box;
}

.folder-icon-label {
    position: relative;
    z-index: 2;
    font-size: 20px;
    line-height: 1;
    font-weight: 800;
    color: #fff;
    text-align: center;
}


/* ================================
   Download Queue View
   ================================ */

.queue-indicator {
    cursor: pointer;
    border: 0;
}

.queue-view {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 30px;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.82);
}

.queue-view.visible {
    display: flex;
}

.queue-panel {
    width: min(900px, 92vw);
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

.queue-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 26px;
    border-bottom: 1px solid var(--border-color);
}

.queue-header h2 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.5rem;
}

.queue-subtitle {
    display: block;
    margin-top: 5px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.queue-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px 20px;
}

.queue-item {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 90px;
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
}

.queue-item:last-child {
    border-bottom: 0;
}

.queue-item-image {
    width: 120px;
    height: 68px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 7px;
    background: #000;
}

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

.queue-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-weight: 700;
}

.queue-item-info {
    flex: 1;
    min-width: 0;
}

.queue-item-title {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.queue-item-size {
    margin-top: 6px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.queue-remove,
.queue-action {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 16px;
    background: var(--bg-card-glass);
    color: var(--text-primary);
    cursor: pointer;
    font-weight: 700;
}

.queue-remove:hover,
.queue-action:hover {
    border-color: var(--accent-primary);
}

.queue-remove {
    flex-shrink: 0;
}

.queue-clear {
    border-color: #a33;
}

.queue-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 18px 26px;
    border-top: 1px solid var(--border-color);
}

.queue-empty {
    padding: 60px 20px;
    text-align: center;
    color: var(--text-secondary);
}

.queue-empty-title {
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 700;
}

@media (max-width: 700px) {
    .queue-view {
        padding: 10px;
    }

    .queue-panel {
        width: 96vw;
        max-height: 94vh;
    }

    .queue-item-image {
        width: 90px;
        height: 51px;
    }

    .queue-item {
        gap: 10px;
    }

    .queue-remove {
        padding: 8px 10px;
        font-size: 0.75rem;
    }
}


/* Queue action buttons */
.queue-indicator {
    display: none;
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
    gap: 8px;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.queue-indicator.visible {
    display: flex;
}

.queue-indicator button {
    border: 0;
    border-radius: 8px;
    padding: 11px 15px;
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.queue-view-button {
    background: var(--accent-primary);
}

.queue-start-button {
    background: #218838;
}

.queue-indicator button:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
}


/* Queue selection instruction */
.queue-selection-prompt {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 8px 0 14px;
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    color: rgba(255, 255, 255, 0.8);
}

.queue-prompt-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: 2px solid rgba(255, 255, 255, 0.75);
    border-radius: 4px;
    font-size: 16px;
    line-height: 1;
    color: #fff;
    box-sizing: border-box;
}


/* PlayStation-style SQUARE button label */
.square-label {
    color: #ff2d8d;
    font-weight: 900;
}


/* Queue selection hint above the L2/R2 navigation */
.sidebar-footer .queue-selection-prompt {
    display: block;
    margin: 0 0 8px;
    padding: 0;
    font-size: 0.72rem;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: rgba(255, 255, 255, 0.75);
    text-align: center;
}

.sidebar-footer .square-label {
    color: #ff2d8d;
    font-weight: 900;
}


/* PS5-safe back icon: plain ASCII character */
.folder-icon.back-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    min-width: 40px;
    height: 32px;
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
}

/* PS5-safe blue back arrow */
.folder-icon.back-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    min-width: 40px;
    height: 40px;
    margin: 0;
    color: #1f8bff;
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
}

/* FINAL PS5 BACK ICON */
.folder-card.folder-back .folder-icon.back-arrow {
    display: block;
    position: relative;
    width: 34px;
    min-width: 34px;
    height: 28px;
    margin: 0;
    padding: 0;
    font-size: 0;
    line-height: 0;
    color: #1f8bff;
    background: transparent;
    border: 0;
    box-sizing: border-box;
}

.folder-card.folder-back .folder-icon.back-arrow::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 5px;
    width: 14px;
    height: 14px;
    border-left: 4px solid #1f8bff;
    border-bottom: 4px solid #1f8bff;
    transform: rotate(45deg);
    box-sizing: border-box;
}

.folder-card.folder-back .folder-icon.back-arrow::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 12px;
    width: 25px;
    height: 4px;
    background: #1f8bff;
}

/* PS4 App Version */
.ps4-app-version {
    color: var(--accent-primary);
}


/* =========================================
   PS5 Square Button Icon
   ========================================= */

.square-button-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin: 0 4px;
    border: 2px solid #ff2d8d;
    border-radius: 50%;
    vertical-align: middle;
    box-sizing: border-box;
    box-shadow:
        0 0 6px rgba(255, 45, 141, 0.65),
        0 0 12px rgba(255, 45, 141, 0.25);
}

.square-button-icon span {
    display: block;
    width: 8px;
    height: 8px;
    border: 2px solid #ff2d8d;
    box-sizing: border-box;
}


/* =========================================
   Enhanced PS5 Sidebar Background
   ========================================= */

.sidebar {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(
            ellipse at 20% 15%,
            rgba(24, 70, 135, 0.38) 0%,
            transparent 48%
        ),
        radial-gradient(
            ellipse at 85% 78%,
            rgba(20, 45, 105, 0.42) 0%,
            transparent 52%
        ),
        linear-gradient(
            160deg,
            #080f20 0%,
            #0b1428 48%,
            #080d19 100%
        );
}

.sidebar::before {
    content: "";
    position: absolute;
    left: -55%;
    bottom: 18%;
    width: 210%;
    height: 38%;
    border: 1px solid rgba(35, 115, 255, 0.30);
    border-radius: 50%;
    transform: rotate(-12deg);
    box-shadow:
        0 0 14px rgba(25, 100, 255, 0.12),
        inset 0 0 14px rgba(25, 100, 255, 0.08);
    pointer-events: none;
    z-index: -1;
}

.sidebar::after {
    content: "";
    position: absolute;
    left: -70%;
    top: 8%;
    width: 230%;
    height: 30%;
    border: 1px solid rgba(55, 130, 255, 0.18);
    border-radius: 50%;
    transform: rotate(-10deg);
    pointer-events: none;
    z-index: -1;
}

.sidebar > * {
    position: relative;
    z-index: 1;
}
