/* PSP Authentic Aesthetic Styles - Refined Action Button & Console */

@font-face {
    font-family: 'Phatboyslim';
    src: url('Phatboyslim-M3zx.otf') format('opentype');
}

@font-face {
    font-family: 'EmotionEngine';
    src: url('EmotionEngine-8ynA.ttf') format('truetype');
}

:root {
    --psp-blue-deep: #001242;
    --psp-blue-mid: #003791;
    --psp-glow: rgba(255, 255, 255, 0.9);
    --text-main: #ffffff;
    --text-dim: rgba(255, 255, 255, 0.5);
    --font-header: 'Phatboyslim', sans-serif;
    --font-ui: 'EmotionEngine', "Arial", sans-serif;
    --scanline-opacity: 0.1;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    cursor: default;
    user-select: none;
}

body, html {
    height: 100%;
    overflow: hidden;
    background-color: var(--psp-blue-deep);
    color: var(--text-main);
    font-family: var(--font-ui);
}

/* Scanlines Effect */
.scanlines {
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(0deg, transparent, transparent 1px, rgba(0,0,0,var(--scanline-opacity)) 2px);
    z-index: 9999;
    pointer-events: none;
}

/* Sinusoidal Wave Background */
.wave-bg {
    position: fixed;
    inset: 0;
    background: linear-gradient(to bottom, #0045ad 0%, #001242 100%);
    z-index: -1;
    overflow: hidden;
}

.wave {
    position: absolute;
    width: 200%;
    height: 100%;
    background-repeat: repeat-x;
    transform-origin: center bottom;
}

.wave1 {
    background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 1000 300" xmlns="http://www.w3.org/2000/svg"><path d="M0 150 Q 250 50 500 150 T 1000 150 V 300 H 0 Z" fill="white" opacity="0.08"/></svg>');
    animation: waveAnim 25s linear infinite;
    bottom: -50px;
}

.wave2 {
    background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 1000 300" xmlns="http://www.w3.org/2000/svg"><path d="M0 150 Q 250 250 500 150 T 1000 150 V 300 H 0 Z" fill="white" opacity="0.05"/></svg>');
    animation: waveAnim 40s linear infinite reverse;
    bottom: -30px;
}

@keyframes waveAnim {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

#app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 0 60px;
    overflow: hidden;
    transition: padding 0.3s;
}

/* Status Bar */
.status-bar {
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    flex-wrap: wrap;
    gap: 10px;
}

.psp-logo { font-family: var(--font-header); font-size: 1.6rem; font-weight: 900; font-style: italic; white-space: nowrap; }
.right-status { display: flex; align-items: center; gap: 20px; font-size: 1.1rem; flex-wrap: wrap; }

.battery-icon { display: flex; align-items: center; position: relative; margin-left: 10px; }
.battery-body { width: 28px; height: 14px; border: 1.5px solid white; padding: 1.5px; position: relative; display: flex; }
.battery-level { width: 80%; height: 100%; background: white; }
.battery-tip { width: 3px; height: 6px; background: white; position: absolute; right: -5.5px; top: 2.5px; border-radius: 0 1px 1px 0; }

.help-btn-top {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1.5px solid white;
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    margin-left: 20px;
    transition: all 0.2s;
    font-family: Arial, sans-serif; /* Normal font for the ? */
}

.help-btn-top:hover {
    background: white;
    color: var(--psp-blue-deep);
    box-shadow: 0 0 10px white;
}

.psp-theme {
    background-color: var(--psp-blue-deep);
    background-image: radial-gradient(circle at center, var(--psp-blue-mid) 0%, var(--psp-blue-deep) 100%);
}

/* XMB Navigation */
#xmb-nav { 
    height: 120px; 
    display: flex; 
    align-items: center;
    transition: height 0.3s;
}

.nav-category { 
    display: flex; 
    gap: 60px; 
    padding: 0 20px;
    width: 100%;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0.4;
    transition: all 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    transform: scale(0.85);
    outline: none;
    min-width: 80px;
}

.nav-item.active { opacity: 1; transform: scale(1.1); }

.xmb-icon {
    width: 55px;
    height: 55px;
    filter: drop-shadow(0 0 5px rgba(255,255,255,0));
}

.nav-item.active .xmb-icon { filter: drop-shadow(0 0 10px var(--psp-glow)); }
.nav-item span { font-size: 0.8rem; text-transform: uppercase; font-weight: 600; letter-spacing: 2px; }

/* View Management */
#view-container { 
    flex: 1; 
    position: relative; 
    margin-bottom: 110px; /* Space for console footer */
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.view { display: none; height: 100%; flex-direction: column; }
.view.active { display: flex; animation: fadeIn 0.4s ease; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Home */
.welcome-content { margin-top: 40px; }
.glow-text { font-family: var(--font-header); font-size: 3.5rem; font-weight: 300; text-shadow: 0 0 20px var(--psp-glow); }

/* Swapper View Layout */
.swapper-view { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    grid-template-rows: 1fr;
    gap: 40px; 
    flex: 1;
    min-height: 0; /* Critical for flex child scrolling */
    position: relative;
}

.vader-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-10deg);
    width: 50%;
    opacity: 0.04;
    filter: invert(1);
    pointer-events: none;
    z-index: 0;
}

.home-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    opacity: 0.03;
    filter: invert(1) drop-shadow(0 0 20px rgba(255,255,255,0.2));
    pointer-events: none;
    z-index: 0;
}

.swapper-column { 
    display: flex; 
    flex-direction: column; 
    min-height: 0; 
    overflow: hidden; /* Contain children */
}

#swapper-view.view.active {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.drop-zone {
    flex: 0 0 140px;
    height: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    border: 2px dashed rgba(255,255,255,0.1);
    border-radius: 10px;
    transition: all 0.5s;
    margin-bottom: 15px;
    cursor: pointer;
}

.drop-zone:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.2);
}

    overflow: hidden;
    position: relative; /* For absolute button positioning */
}

.stop-preview-btn {
    position: absolute;
    z-index: 10;
    top: 15px;
    left: 15px;
    background: rgba(255, 0, 0, 0.8);
    border: 2px solid white;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-header);
    font-size: 0.75rem;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
    animation: pulseGlow 2s infinite;
}

.stop-preview-btn:hover {
    background: #ff0000;
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(255, 0, 0, 0.8);
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 15px rgba(255, 0, 0, 0.5); }
    50% { box-shadow: 0 0 30px rgba(255, 0, 0, 0.9); }
    100% { box-shadow: 0 0 15px rgba(255, 0, 0, 0.5); }
}

.stop-symbol { font-size: 1.2rem; }
.stop-text { letter-spacing: 1px; }

.drop-zone.active { background: rgba(255,255,255,0.1); border-color: white; }

/* UMD SVG Styling */
.umd-icon-svg, .zone-icon { width: 110px; height: 110px; transition: all 0.5s; }
.umd-shell-path { transition: fill 0.8s, stroke 0.8s; }
.umd-disc-inner { fill: transparent; transition: fill 0.8s; }

.drop-zone.has-file .umd-shell-path { fill: rgba(255,255,255,0.05); stroke: rgba(255,255,255,0.8); }
.drop-zone.has-file .umd-disc-inner { fill: #c0c0c0; animation: slowSpin 10s linear infinite; transform-origin: 50% 52.5%; }

@keyframes slowSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.zone-label { font-size: 0.9rem; color: var(--text-dim); margin-top: 10px; }
.file-name { font-size: 1.1rem; color: #ffcc00; margin-top: 5px; text-align: center; font-weight: bold; }

.lvl-inner-list-container {
    flex: 1;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 0; /* Changed to 0 to let header span full width */
    min-height: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.anakin-watermark-swapper {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 55%;
    opacity: 0.03;
    filter: invert(1);
    pointer-events: none;
    z-index: 0;
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: var(--psp-blue-mid); /* More authentic blue for header */
}

.list-header .zone-label { margin-top: 0; }

.psp-filter {
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.2);
    color: #ffcc00;
    padding: 4px 10px;
    width: 140px;
    border-radius: 4px;
    outline: none;
    font-size: 0.8rem;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
}

.psp-filter:focus {
    border-color: #ffcc00;
    box-shadow: 0 0 8px rgba(255, 204, 0, 0.4);
}

#lvl-inner-sounds-list {
    flex: 1;
    padding: 0 15px;
}

.small-text { font-size: 0.85rem !important; }

.sound-list-container { 
    flex: 1; 
    overflow-y: auto; 
    background: rgba(0,0,0,0.3); 
    border-radius: 10px; 
    padding: 10px; 
    min-height: 0;
    position: relative;
}
.sound-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    position: relative;
}

.sound-item.warning {
    background: rgba(255, 50, 50, 0.1);
}

.sound-name { font-size: 1.1rem; color: white; display: block; font-weight: bold; }
.sound-size { font-size: 0.85rem; color: var(--text-dim); }

.options-btn {
    background: transparent;
    border: none;
    color: #f6a1a1; /* Reddish white symbol color */
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0 10px;
    transition: transform 0.2s;
    font-family: var(--font-header);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.options-btn:hover {
    transform: scale(1.2);
    text-shadow: 0 0 10px #f6a1a1;
}

.options-btn.warning {
    color: #ff4444;
    text-shadow: 0 0 10px #ff0000;
    animation: pulseRed 1.5s infinite;
}

.options-btn.warning::after {
    content: "!";
    position: absolute;
    font-size: 0.7rem;
    font-family: Arial, sans-serif;
    color: white;
    font-weight: 900;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -10%);
}

@keyframes pulseRed {
    0% { transform: scale(1); text-shadow: 0 0 5px #ff0000; }
    50% { transform: scale(1.3); text-shadow: 0 0 20px #ff0000, 0 0 30px #ff0000; }
    100% { transform: scale(1); text-shadow: 0 0 5px #ff0000; }
}

/* Context Menu */
.psp-context-menu {
    position: absolute;
    min-width: 180px;
    max-width: 250px;
    background: var(--psp-blue-mid);
    border: 1.5px solid white;
    border-radius: 8px;
    z-index: 1000;
    box-shadow: 0 0 20px rgba(0,0,0,0.8);
    overflow: hidden;
    animation: menuPop 0.15s ease-out;
}

@keyframes menuPop {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.menu-item {
    padding: 12px 25px;
    color: white;
    font-size: 1.3rem;
    text-transform: uppercase;
    font-family: 'EmotionEngine', sans-serif;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 1px;
}

.menu-item:hover {
    background: white;
    color: var(--psp-blue-mid);
}

.menu-item.delete { color: #ff6666; }
.menu-item.delete:hover { background: #ff6666; color: white; }

/* Rename Modal Input */
.psp-input-large {
    background: rgba(0,0,0,0.4);
    border: 2px solid rgba(255,255,255,0.3);
    color: #ffcc00;
    padding: 15px 20px;
    width: 100%;
    border-radius: 10px;
    outline: none;
    font-size: 1.8rem;
    font-family: 'Courier New', monospace;
    text-align: center;
    margin: 20px 0;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.psp-input-large:focus {
    border-color: #ffcc00;
    box-shadow: 0 0 15px rgba(255, 204, 0, 0.4);
}

.sample-rate-wrap { display: flex; align-items: center; gap: 10px; }
.sample-rate-label { font-size: 0.9rem; color: var(--text-dim); text-transform: uppercase; }
.sample-rate-input {
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.2);
    color: #ffcc00;
    padding: 6px 8px;
    width: 90px;
    text-align: right;
    border-radius: 4px;
    outline: none;
    font-size: 1.1rem;
    font-family: 'Courier New', monospace;
    transition: border-color 0.3s, box-shadow 0.3s;
    appearance: textfield; /* Hide in Firefox */
}

.sample-rate-input:focus {
    border-color: #ffcc00;
    box-shadow: 0 0 8px rgba(255, 204, 0, 0.4);
}

/* Hide Spinners in Chrome, Safari, Edge, Opera */
.sample-rate-input::-webkit-outer-spin-button,
.sample-rate-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* BIG SHINY BUTTON */
.action-footer {
    flex: 0 0 auto;
    margin: 15px 0 5px;
    width: 100%;
    display: flex;
    justify-content: center;
}

.shiny-large {
    width: 90%;
    max-width: 1000px;
    height: 75px;
    background: linear-gradient(to bottom, #ffffff 0%, #dddddd 50%, #aaaaaa 50%, #cccccc 100%);
    color: #001242 !important;
    font-size: 1.5rem !important;
    font-weight: 900 !important;
    font-family: var(--font-header) !important;
    border: 3px solid #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 0 25px rgba(255,255,255,0.5), inset 0 2px 0 rgba(255,255,255,0.8);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-shadow: none !important;
    letter-spacing: 2px !important;
}

.shiny-large:hover {
    transform: scale(1.02);
    box-shadow: 0 0 40px rgba(255,255,255,0.8), inset 0 2px 0 rgba(255,255,255,0.8);
    background: linear-gradient(to bottom, #ffffff 0%, #eeeeee 50%, #bbbbbb 50%, #dddddd 100%);
}

.shiny-large:active {
    transform: scale(0.98);
}

/* Console - SOLID BLACK */
#terminal-console {
    height: 90px;
    background: #000000; /* SOLID BLACK */
    border-top: 1px solid rgba(255,255,255,0.2);
    position: fixed;
    bottom: 0; left: 0; right: 0;
    padding: 10px 60px;
    z-index: 1000;
}
.console-body { font-family: "Courier New", monospace; font-size: 0.9rem; color: #fff; overflow-y: auto; height: 100%; }

/* Home Page Dashboard */
.home-dashboard {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 40px;
}

.manifest-panel {
    width: 100%;
    max-width: 400px;
    background: rgba(0,0,0,0.3);
    border: 1.5px solid rgba(255,255,255,0.1);
    border-radius: 15px;
    overflow: hidden;
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
    from { transform: translateX(-50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.manifest-header {
    background: var(--psp-blue-mid);
    padding: 12px 20px;
    font-family: var(--font-header);
    font-size: 1rem;
    letter-spacing: 2px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.manifest-readout {
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.readout-item {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
}

.readout-item .label { color: rgba(255,255,255,0.4); }
.readout-item .value { color: #ffcc00; font-weight: bold; }

.hero-anchor {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.large-hero {
    width: 320px;
    height: 320px;
    filter: drop-shadow(0 0 30px rgba(255,255,255,0.1));
}

.hero-silver {
    stroke: rgba(255,255,255,0.4);
    fill: rgba(255,255,255,0.03);
}

.hero-spin {
    animation: slowSpin 15s linear infinite;
    transform-origin: 50% 52.5%;
}

.hero-btn {
    transform: scale(1.3);
    background: rgba(255,255,255,0.05);
}

.hero-btn:hover {
    transform: scale(1.4);
}

/* Links View - Network Browser Aesthetic */
.links-network-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 50px;
    height: 100%;
    min-height: 0;
}

.preview-column {
    display: flex;
    flex-direction: column;
    min-width: 0; /* Prevent grid blowout */
    height: 100%;
}

.bookmark-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 10px;
}

.bookmark-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 20px;
}

.bookmark-card.active {
    background: rgba(255, 255, 255, 0.15);
    border-color: white;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255,255,255,0.2);
}

.card-icon {
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    font-size: 1.5rem;
    color: #ffcc00;
}

.card-info .name {
    display: block;
    font-family: var(--font-header);
    font-size: 1.2rem;
    color: white;
    margin-bottom: 2px;
}

.card-info .tag {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Browser Preview Window */
.browser-window {
    background: rgba(0,0,0,0.4);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.browser-header {
    background: rgba(255,255,255,0.05);
    padding: 15px 25px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 25px;
    cursor: pointer;
}

.browser-dots { display: flex; gap: 8px; }
.browser-dots span { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.2); }

.url-bar {
    flex: 1;
    background: rgba(0,0,0,0.3);
    border-radius: 20px;
    padding: 6px 20px;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    letter-spacing: 1px;
}

.browser-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.xwing-watermark {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: 65%;
    opacity: 0.04;
    filter: invert(1);
    pointer-events: none;
    z-index: 0;
}

.title-large { font-size: 4.5rem !important; margin-bottom: 30px; }

.link-description {
    font-family: 'EmotionEngine', sans-serif;
    font-size: 2.2rem;
    color: white;
    line-height: 1.3;
    letter-spacing: 2px;
    max-width: 800px;
}

.browser-actions {
    margin-top: 50px;
}

/* Reference View Layout */
.reference-xmb {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    height: 100%;
    min-height: 0;
}

.data-view {
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: rgba(0,0,0,0.2);
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.1);
}

.data-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: var(--psp-blue-mid);
    border-radius: 15px 15px 0 0;
}

.ref-header-grid {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) auto 60px 20px 80px 20px 50px 20px 80px;
    align-items: center;
    gap: 15px;
}

.header-label {
    font-size: 0.8rem;
    color: #ffcc00;
    font-weight: bold;
    font-family: var(--font-header);
    letter-spacing: 1px;
    white-space: nowrap;
}

.header-sep {
    width: 20px;
}

.data-list-container {
    flex: 1;
    padding: 0 20px;
    position: relative;
}

.clone-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40%;
    opacity: 0.04;
    filter: invert(1);
    pointer-events: none;
    z-index: 0;
}

/* Links View Layout */
.links-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    height: 100%;
    min-height: 0;
}

.link-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px;
    background: rgba(255,255,255,0.03);
    border-radius: 15px;
}

/* Reference & Links Items */
.lvl-selector { height: 100%; overflow-y: auto; }

#lvl-file-list li, #links-list li {
    padding: 18px 20px; 
    font-size: 1.5rem; 
    color: var(--text-dim); 
    display: flex; 
    align-items: center;
    border-left: 4px solid transparent;
    transition: all 0.2s;
    margin: 4px 0;
}
#lvl-file-list li.selected, #links-list li.selected {
    color: white; 
    font-size: 1.8rem; 
    text-shadow: 0 0 10px var(--psp-glow);
    border-left: 4px solid white;
    background: rgba(255,255,255,0.05);
}
#lvl-file-list li.selected::before, #links-list li.selected::before { content: "◀"; margin-right: 15px; font-size: 1.1rem; }

.psp-list-item { 
    display: grid;
    grid-template-columns: minmax(150px, 1fr) auto 60px 20px 80px 20px 50px 20px 80px;
    align-items: baseline;
    padding: 14px 0; 
    border-bottom: 1px solid rgba(255,255,255,0.06); 
    gap: 15px;
}

.meta-col.format { color: #ffcc00; font-weight: bold; }

.meta-spacer { width: 0; }

.item-name { 
    font-size: 1.1rem; 
    font-weight: 800; 
    color: #ffffff;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 15px;
}

.meta-col { 
    font-size: 0.85rem; 
    color: rgba(255,255,255,0.4); 
    font-family: 'Courier New', monospace;
}

.meta-sep {
    color: rgba(255,255,255,0.15);
    text-align: center;
    font-size: 0.85rem;
}

.meta-col.size { text-align: right; }

/* Buttons Generic */
.psp-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid white;
    color: white;
    padding: 10px 30px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-family: var(--font-ui);
    text-transform: uppercase;
}

.symbol-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 25px;
    border: 1.5px solid rgba(255,255,255,0.5);
    background: rgba(0,0,0,0.3);
}

.psp-symbol {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 1.5px solid white;
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    text-shadow: 0 0 5px white;
}

.cross {
    color: #8da6e2; /* Bluish white */
    border-color: #8da6e2;
}

.circle {
    color: #f6a1a1; /* Reddish white */
    border-color: #f6a1a1;
}

.btn-text {
    font-family: var(--font-header);
    letter-spacing: 1px;
}

.hidden { display: none !important; }
.vertical-scroll { 
    overflow-y: auto; 
    scrollbar-width: auto;
    scrollbar-color: rgba(255,255,255,0.3) transparent;
}
.vertical-scroll::-webkit-scrollbar { width: 10px; }
.vertical-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.3); border-radius: 5px; }
.vertical-scroll::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.5); }

/* Modal & Notifications */
.modal {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 15000;
}

.modal-bg {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
}

.modal-wrap {
    position: relative;
    width: 95%;
    max-width: 1250px;
    background: var(--psp-blue-mid);
    border: 2px solid white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.9), 0 0 30px rgba(255, 255, 255, 0.3);
    text-align: center;
    color: white;
    animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-body p {
    color: white;
    font-size: 1.6rem;
    font-family: var(--font-header);
    letter-spacing: 2px;
}

#notification-modal .modal-body p,
#notification-modal .btn-text {
    font-family: var(--font-ui);
    letter-spacing: 1px;
}

@keyframes modalPop {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-head { margin-bottom: 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.2); padding-bottom: 10px; }
.modal-body { margin-bottom: 30px; }

.modal-head.no-border { border: none; margin-bottom: 0; }

.help-body-scroll {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 15px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.3) transparent;
}

.help-body-scroll::-webkit-scrollbar { width: 6px; }
.help-body-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.3); border-radius: 3px; }

.help-design {
    background: var(--psp-blue-mid) !important;
    border: 2px solid white !important;
    border-radius: 20px !important;
    width: 95% !important;
    max-width: 1000px !important;
    padding: 60px !important;
}

.help-title {
    font-family: 'Phatboyslim', sans-serif;
    font-size: 4rem;
    color: white;
    text-shadow: 0 0 20px rgba(255,255,255,0.6);
    margin-bottom: 40px;
    letter-spacing: 4px;
}

.help-item {
    margin-bottom: 35px;
}

.help-step-label {
    font-family: 'EmotionEngine', sans-serif;
    font-size: 1.2rem;
    color: rgba(255,255,255,0.6);
    margin-bottom: 5px;
    letter-spacing: 2px;
}

.help-text {
    font-family: 'EmotionEngine', sans-serif;
    font-size: 2.2rem;
    color: white;
    line-height: 1.2;
    letter-spacing: 2px;
}

.psp-pill-btn {
    background: rgba(0,0,0,0.3);
    border: 1.5px solid white;
    border-radius: 30px;
    padding: 8px 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    margin: 20px auto 0;
    transition: all 0.2s;
    outline: none;
}

.psp-pill-btn:hover {
    background: white;
}

.psp-pill-btn:hover .pill-text, .psp-pill-btn:hover .pill-icon {
    color: var(--psp-blue-mid);
}

.pill-icon {
    width: 25px;
    height: 25px;
    border: 1.5px solid white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1rem;
    font-weight: bold;
    font-family: Arial, sans-serif;
}

.psp-pill-btn:hover .pill-icon {
    border-color: var(--psp-blue-mid);
}

.pill-text {
    color: white;
    font-family: 'EmotionEngine', sans-serif;
    font-size: 1.4rem;
    letter-spacing: 2px;
}

/* UMD Disc Loader Overlay */
#umd-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.umd-disc-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.umd-spinning-part {
    width: 150px;
    height: 150px;
    border: 5px solid white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: spin 2s linear infinite;
    margin-bottom: 20px;
}

.umd-logo {
    font-family: var(--font-header);
    font-weight: 900;
    font-size: 1.5rem;
}

.umd-status {
    font-size: 1.2rem;
    color: white;
    letter-spacing: 2px;
    font-family: var(--font-ui);
    text-transform: uppercase;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* --- Responsive Design Updates --- */

/* Medium Screens (Laptops, small desktops) */
@media (max-width: 1200px) {
    #app-container {
        padding: 0 20px;
    }

    #xmb-nav {
        height: 100px;
    }

    .glow-text {
        font-size: 2.8rem;
    }

    .title-large {
        font-size: 3.5rem !important;
    }

    .link-description {
        font-size: 1.8rem;
    }

    .help-title {
        font-size: 3rem;
    }

    .help-text {
        font-size: 1.8rem;
    }

    .nav-category {
        gap: 30px;
    }
    
    .swapper-view, .links-network-layout, .reference-xmb {
        gap: 20px;
    }

    .links-network-layout {
        grid-template-columns: 300px 1fr;
    }

    .browser-content {
        padding: 40px;
    }

    /* Reduce list font sizes */
    .item-name, .sound-name {
        font-size: 1rem;
    }
    .meta-col, .sound-size {
        font-size: 0.8rem;
    }
    #lvl-file-list li, #links-list li {
        font-size: 1.3rem;
        padding: 14px 15px;
    }
}

/* Small devices / Stacking Point */
@media (max-width: 600px) {
    body, html {
        overflow: auto;
    }

    #app-container {
        height: auto;
        min-height: 100vh;
        overflow: visible;
        padding: 0 15px;
    }

    .status-bar {
        height: auto;
        padding: 10px 0;
    }

    .psp-logo {
        font-size: 1.2rem;
    }

    .right-status {
        font-size: 0.9rem;
        gap: 10px;
    }

    #xmb-nav {
        height: 80px;
    }

    .xmb-icon {
        width: 35px;
        height: 35px;
    }

    .nav-category {
        gap: 15px;
        overflow-x: auto;
        padding-bottom: 10px;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
    }

    .nav-item {
        flex-shrink: 0;
    }

    #view-container {
        margin-bottom: 100px;
        flex: none;
    }

    .view {
        height: auto;
    }

    .swapper-view, .links-network-layout, .reference-xmb, .home-dashboard {
        grid-template-columns: 1fr;
        height: auto;
        display: flex;
        flex-direction: column;
        gap: 30px;
        padding: 20px 0;
    }

    .swapper-column {
        height: auto;
        min-height: 350px;
    }

    .lvl-inner-list-container {
        flex: none;
        height: 350px;
    }

    #lvl-inner-sounds-list, .sound-list-container {
        flex: none;
        height: 300px;
    }

    .large-hero {
        width: 180px;
        height: 180px;
    }

    .manifest-panel {
        order: 2;
    }

    .hero-anchor {
        order: 1;
    }

    .browser-window {
        height: 400px;
    }

    .browser-content {
        padding: 20px;
    }

    .links-column, .lvl-selector {
        height: 250px;
        overflow-y: auto;
    }

    /* Compact list items for mobile */
    .item-name, .sound-name {
        font-size: 0.85rem;
    }
    .meta-col, .sound-size, .meta-sep {
        font-size: 0.7rem;
    }
    .psp-list-item, .sound-item {
        padding: 10px 0;
        gap: 8px;
    }

    #lvl-file-list li, #links-list li {
        font-size: 1.1rem;
        padding: 10px 12px;
    }

    .glow-text {
        font-size: 2rem;
    }

    .title-large {
        font-size: 2.2rem !important;
    }

    .link-description {
        font-size: 1.3rem;
    }

    .shiny-large {
        height: 60px;
        font-size: 1.1rem !important;
        width: 100%;
    }

    #terminal-console {
        padding: 10px 15px;
        height: 70px;
    }

    .modal-wrap {
        padding: 20px;
    }

    .help-design {
        padding: 25px !important;
    }

    .help-text {
        font-size: 1.2rem;
    }
}
