/* Style system for Midec26 // Markho - RickyEdit Games / Pixel-Art Theme */

:root {
    --bg-dark: #120015;
    --bg-card: rgba(26, 0, 35, 0.85);
    
    /* Palette from the RickyEdit Games logo */
    --logo-pink-light: #ff7be5;
    --logo-pink-mid: #ff00aa;
    --logo-pink-dark: #800055;
    --logo-shadow: #3b0028;
    
    --primary-neon: #ff00ff;
    --secondary-neon: #00ffff;
    --success-green: #39ff14;
    --warning-yellow: #fff200;
    --error-red: #ff2255;
    
    --text-main: #ffe6fa;
    --text-muted: #c896be;
    
    --font-display: 'Press Start 2P', cursive;
    --font-mono: 'VT323', monospace;
    --grid-size: 40px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    image-rendering: pixelated; /* Ensure retro feel */
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-mono);
    font-size: 1.3rem;
    overflow-x: hidden;
    min-height: 100vh;
    letter-spacing: 1px;
}

/* --- ANIMATED PIXEL CHECKERBOARD BACKGROUND (Logo Colors) --- */
.gmod-grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 200%;
    height: 200%;
    z-index: -2;
    background-image: 
        linear-gradient(45deg, #180022 25%, transparent 25%), 
        linear-gradient(-45deg, #180022 25%, transparent 25%), 
        linear-gradient(45deg, transparent 75%, #180022 75%), 
        linear-gradient(-45deg, transparent 75%, #180022 75%);
    background-size: var(--grid-size) var(--grid-size);
    background-position: 0 0, 0 calc(var(--grid-size) / 2), calc(var(--grid-size) / 2) calc(var(--grid-size) / -2), calc(var(--grid-size) / -2) 0;
    background-color: #8b005e; /* Logo dark magenta */
    opacity: 0.25;
    animation: panBackground 20s linear infinite;
    image-rendering: pixelated;
}

/* Clean sync state */
body.textures-fixed .gmod-grid-bg {
    background: radial-gradient(circle at 50% 50%, #2f003a 0%, #0d0010 100%);
    opacity: 1;
    animation: none;
}

@keyframes panBackground {
    0% {
        transform: translate(-10%, -10%);
    }
    100% {
        transform: translate(0%, 0%);
    }
}

/* Scanlines overlay */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(
        rgba(18, 16, 16, 0) 50%, 
        rgba(0, 0, 0, 0.3) 50%
    );
    background-size: 100% 6px;
    z-index: 10;
    pointer-events: none;
}

/* --- APP LAYOUT --- */
.app-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 3rem;
    position: relative;
    z-index: 2;
}

/* Header */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: #000;
    border: 4px solid var(--logo-pink-mid);
    box-shadow: 5px 5px 0px var(--logo-shadow);
    image-rendering: pixelated;
}

@media (max-width: 768px) {
    .main-header {
        flex-direction: column;
        gap: 1rem;
    }
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.status-indicator {
    width: 14px;
    height: 14px;
    background-color: var(--success-green);
    box-shadow: 0 0 8px var(--success-green);
    animation: blinkText 1.5s step-end infinite;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 0.8rem;
    color: #fff;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
}

.nav-btn {
    text-decoration: none;
    color: var(--text-muted);
    font-family: var(--font-display);
    font-size: 0.65rem;
    padding: 0.5rem 0.75rem;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.nav-btn:hover {
    color: #fff;
    border-color: var(--logo-pink-light);
    background: rgba(255, 0, 170, 0.2);
}

/* Main Grid Layout */
.grid-content {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 2.5rem;
}

@media (max-width: 900px) {
    .grid-content {
        grid-template-columns: 1fr;
    }
}

/* --- RETRO PIXEL PANEL COMPONENT (Logo style outline) --- */
.glass-panel {
    background: var(--bg-card);
    border: 4px solid #000;
    box-shadow: 
        0 0 0 4px var(--logo-pink-mid),
        8px 8px 0px var(--logo-shadow);
    padding: 2rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.glass-panel:hover {
    transform: translate(-2px, -2px);
    box-shadow: 
        0 0 0 4px var(--logo-pink-light),
        10px 10px 0px var(--logo-shadow);
}

/* --- HERO & ERROR CARD --- */
.hero-card {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1.2fr 1.8fr;
    align-items: center;
    gap: 3rem;
}

@media (max-width: 768px) {
    .hero-card {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
}

/* 3D ERROR Model Styling in Pixel Art Style */
.error-container {
    perspective: 800px;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.error-model-3d {
    position: relative;
    transform-style: preserve-3d;
    animation: rotate3D 6s linear infinite;
    cursor: pointer;
}

/* Letras de ERROR con relieve y outline idénticas al logo */
.error-text {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: bold;
    color: var(--logo-pink-light);
    letter-spacing: -2px;
    text-shadow: 
        -4px -4px 0 #000, 4px -4px 0 #000, -4px 4px 0 #000, 4px 4px 0 #000,
        0px 4px 0 #000, 4px 0px 0 #000, 0px -4px 0 #000, -4px 0px 0 #000,
        -8px -8px 0 var(--logo-pink-mid), 8px -8px 0 var(--logo-pink-mid), -8px 8px 0 var(--logo-pink-mid), 8px 8px 0 var(--logo-pink-mid),
        0px 8px 0 var(--logo-pink-mid), 8px 0px 0 var(--logo-pink-mid), 0px -8px 0 var(--logo-pink-mid), -8px 0px 0 var(--logo-pink-mid),
        -12px -12px 0 var(--logo-shadow), 12px -12px 0 var(--logo-shadow), -12px 12px 0 var(--logo-shadow), 12px 12px 0 var(--logo-shadow);
    user-select: none;
    position: relative;
    z-index: 2;
}

.error-text.shadow {
    display: none; /* Removed for pixel accuracy */
}

/* Glitch color flashing for the ERROR text, aligning with the logo look */
.error-text::before {
    content: 'ERROR';
    position: absolute;
    top: 0;
    left: 0;
    color: #fff;
    opacity: 0;
    z-index: 3;
    animation: errorFlash 2s step-end infinite;
    pointer-events: none;
    text-shadow: 
        -4px -4px 0 #000, 4px -4px 0 #000, -4px 4px 0 #000, 4px 4px 0 #000,
        -8px -8px 0 var(--secondary-neon), 8px -8px 0 var(--secondary-neon);
}

@keyframes rotate3D {
    0% {
        transform: rotateY(0deg);
    }
    100% {
        transform: rotateY(360deg);
    }
}

.hero-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.badge {
    align-self: flex-start;
    padding: 0.5rem 0.75rem;
    font-family: var(--font-display);
    font-size: 0.55rem;
    font-weight: bold;
    border: 3px solid #000;
}

@media (max-width: 768px) {
    .badge {
        align-self: center;
    }
}

.warning-badge {
    background: var(--warning-yellow);
    color: #000;
    box-shadow: 3px 3px 0px #000;
}

/* Glitch Title Effect in pixel font style matching "RICKYEDIT GAMES" */
.glitch-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--logo-pink-light);
    line-height: 1.3;
    position: relative;
    text-transform: uppercase;
    text-shadow: 
        -3px -3px 0 #000, 3px -3px 0 #000, -3px 3px 0 #000, 3px 3px 0 #000,
        0px 3px 0 #000, 3px 0px 0 #000, 0px -3px 0 #000, -3px 0px 0 #000,
        -6px -6px 0 var(--logo-pink-mid), 6px -6px 0 var(--logo-pink-mid), -6px 6px 0 var(--logo-pink-mid), 6px 6px 0 var(--logo-pink-mid),
        -9px -9px 0 var(--logo-shadow), 9px -9px 0 var(--logo-shadow);
}

.subtitle {
    font-size: 1.4rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.action-buttons {
    display: flex;
    gap: 1rem;
}

@media (max-width: 768px) {
    .action-buttons {
        justify-content: center;
    }
}

.btn {
    font-family: var(--font-display);
    font-size: 0.65rem;
    padding: 0.85rem 1.25rem;
    border: 4px solid #000;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    text-decoration: none;
}

.btn:active {
    transform: translate(2px, 2px);
    box-shadow: none !important;
}

.primary-btn {
    background: var(--logo-pink-mid);
    color: #fff;
    box-shadow: 4px 4px 0px #000;
}

.primary-btn:hover {
    background: var(--logo-pink-light);
}

.secondary-btn {
    background: #000;
    color: #fff;
    box-shadow: 4px 4px 0px var(--logo-pink-mid);
}

.secondary-btn:hover {
    background: rgba(255, 0, 170, 0.15);
}

/* --- CONSOLE WINDOW --- */
.console-card {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    height: 420px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #000;
    border-bottom: 4px solid #000;
    font-family: var(--font-display);
    font-size: 0.55rem;
    color: var(--logo-pink-light);
}

.console-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: #09000d;
    padding: 1rem;
    overflow: hidden;
}

.console-output {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
    padding-right: 0.5rem;
}

.console-output::-webkit-scrollbar {
    width: 8px;
}
.console-output::-webkit-scrollbar-thumb {
    background: var(--logo-pink-mid);
    border: 2px solid #000;
}

.console-input-area {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-top: 3px solid #000;
    padding-top: 0.75rem;
}

#console-input {
    flex-grow: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-family: var(--font-mono);
    font-size: 1.2rem;
}

/* --- PROFILE CARD --- */
.profile-card {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.avatar-placeholder {
    width: 72px;
    height: 72px;
    border: 4px solid #000;
    background: var(--logo-pink-mid);
    box-shadow: 4px 4px 0 #000;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.avatar-glitch {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(45deg, #000 25%, transparent 25%), 
        linear-gradient(-45deg, #000 25%, transparent 25%);
    background-size: 10px 10px;
    opacity: 0.2;
    animation: avatarPan 8s linear infinite;
}

.avatar-fallback {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: #fff;
    z-index: 2;
    text-shadow: 3px 3px 0 #000;
}

.profile-title h2 {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--logo-pink-light);
    text-shadow: 2px 2px 0 #000;
}

.title-sub {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--text-muted);
}

.profile-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.5rem;
}

.detail-row .label {
    font-family: var(--font-display);
    font-size: 0.55rem;
    color: var(--text-muted);
}

.detail-row .value {
    font-weight: bold;
}

.bio {
    margin-top: 0.5rem;
    font-size: 1.25rem;
    line-height: 1.5;
    color: var(--text-muted);
}

/* --- MOUNTED CONTENT CARD --- */
.mount-card {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mount-card h3 {
    font-family: var(--font-display);
    font-size: 0.8rem;
    border-bottom: 4px solid #000;
    padding-bottom: 0.5rem;
    color: var(--logo-pink-light);
    text-shadow: 2px 2px 0 #000;
}

.mount-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mount-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1rem;
    background: #000;
    border: 3px solid #330022;
}

.mount-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.status-active {
    border-color: var(--success-green);
}

.status-active .mount-checkbox {
    color: var(--success-green);
}

.status-active .mount-status {
    color: var(--success-green);
}

.status-error {
    border-color: var(--error-red);
    animation: blinkBorder 1.5s step-end infinite;
}

@keyframes blinkBorder {
    50% { border-color: #000; }
}

.status-error .mount-checkbox {
    color: var(--error-red);
}

.status-error .mount-status {
    color: var(--error-red);
    animation: blinkText 1s step-end infinite;
}

/* --- FOOTER --- */
.main-footer {
    text-align: center;
    padding: 2.5rem 0;
    font-size: 1.1rem;
    color: var(--text-muted);
    border-top: 4px solid #000;
}

/* Global utility animations */
@keyframes blinkText {
    50% { opacity: 0; }
}
