/* Reset and Base Styles - CENTERED */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Courier New', monospace;
    background: #000;
    color: #0ff;
    letter-spacing: 0.05em;
    position: relative;
}

/* Matrix Background */
#matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.5;
}

/* Game Container - PERFECTLY CENTERED */
#game-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* Sectors - CENTERED */
.sector {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-align: center;
    animation: fadeIn 1s;
}

.sector.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Scanlines */
#scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(0deg, rgba(0,0,0,0.15) 0px, rgba(0,0,0,0.15) 1px, transparent 1px, transparent 2px);
    pointer-events: none;
    z-index: 1000;
    animation: scanline-move 8s linear infinite;
}

@keyframes scanline-move {
    0% { transform: translateY(0); }
    100% { transform: translateY(10px); }
}

/* Glitch Overlay */
#glitch-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
    opacity: 0;
}

.glitch-active {
    animation: glitch-cool 0.6s;
}

@keyframes glitch-cool {
    0% { opacity: 0; }
    5% { 
        opacity: 1; 
        background: linear-gradient(90deg, rgba(255,0,0,0.3) 0%, rgba(0,255,255,0.3) 100%);
        transform: translate(5px, 0);
    }
    10% { 
        opacity: 1; 
        background: linear-gradient(180deg, rgba(0,255,0,0.2) 0%, rgba(255,0,255,0.2) 100%);
        transform: translate(-5px, 0);
    }
    15% {
        opacity: 1;
        background: rgba(255, 255, 255, 0.1);
        transform: translate(0, 3px);
    }
    20% {
        opacity: 1;
        background: linear-gradient(45deg, rgba(0,255,255,0.3) 0%, rgba(255,0,0,0.3) 100%);
        transform: translate(3px, -3px);
        filter: invert(1);
    }
    25% {
        opacity: 1;
        transform: translate(-3px, 3px);
        filter: hue-rotate(180deg);
    }
    30% {
        opacity: 0.8;
        transform: translate(0, 0);
        filter: none;
    }
    40% { opacity: 0; }
}

/* Boot Sequence - CENTERED */
#sector-boot {
    position: relative;
    overflow: hidden;
}

.terminal-output {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 10px;
}

.boot-line {
    font-size: 18px;
    color: #0ff;
    text-shadow: 0 0 10px #0ff;
    text-align: center;
    width: 100%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes glitch-text {
    0%, 100% { transform: translate(0); opacity: 1; }
    10% { transform: translate(-5px, 2px); opacity: 0.8; filter: hue-rotate(90deg); }
    20% { transform: translate(5px, -2px); opacity: 0.6; filter: hue-rotate(-90deg); }
    30% { transform: translate(-3px, -3px); opacity: 0.4; text-shadow: -2px 0 #f00, 2px 0 #0ff; }
    40% { transform: translate(3px, 3px); opacity: 0.3; text-shadow: 2px 0 #f00, -2px 0 #0ff; }
    50% { transform: translate(-4px, 1px) scale(1.02); opacity: 0.2; filter: blur(1px); }
    60% { transform: translate(4px, -1px) scale(0.98); opacity: 0.15; filter: blur(2px); }
    70% { transform: translate(-2px, 2px); opacity: 0.1; text-shadow: -3px 0 #f00, 3px 0 #0ff; }
    80% { transform: translate(2px, -2px); opacity: 0.05; filter: blur(3px); }
    90% { transform: translate(0); opacity: 0.02; }
    100% { transform: translate(0); opacity: 0; }
}

@keyframes boot-glitch-out {
    0% { opacity: 1; filter: none; }
    5% { opacity: 1; text-shadow: -3px 0 #f00, 3px 0 #0ff; }
    10% { opacity: 0; }
    15% { opacity: 1; text-shadow: 3px 0 #f00, -3px 0 #0ff; filter: invert(1); }
    20% { opacity: 0; }
    25% { opacity: 1; text-shadow: -4px 0 #f00, 4px 0 #0ff; filter: hue-rotate(180deg); }
    30% { opacity: 1; text-shadow: 4px 0 #f00, -4px 0 #0ff; }
    35% { opacity: 0; }
    40% { opacity: 1; text-shadow: -5px 0 #f00, 5px 0 #0ff; filter: contrast(3); }
    45% { opacity: 0; }
    50% { opacity: 1; text-shadow: 5px 0 #f00, -5px 0 #0ff; filter: saturate(5); }
    55% { opacity: 0; }
    60% { opacity: 1; text-shadow: -6px 0 #f00, 6px 0 #0ff; filter: blur(2px); }
    70% { opacity: 0; }
    75% { opacity: 1; filter: blur(4px); }
    85% { opacity: 0; }
    90% { opacity: 1; filter: blur(6px); }
    100% { opacity: 0; }
}

/* AI Dialogue - CENTERED */
.ai-text {
    font-size: 13px;
    margin: 5px 0;
    min-height: 35px;
    color: #0ff;
    text-shadow: 0 0 10px #0ff;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

#sector-boot #ai-dialogue {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 700px;
}

#enter-system {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Buttons - CENTERED */
.hologram-btn, .choice-btn {
    background: transparent;
    border: 2px solid #0ff;
    color: #0ff;
    padding: 12px 30px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    cursor: pointer;
    margin: 12px 8px;
    letter-spacing: 0.1em;
    transition: all 0.3s;
    text-shadow: 0 0 5px #0ff;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
    opacity: 0;
    animation: fadeIn 1s forwards;
}

#restart-btn {
    display: none;
    opacity: 0;
}

#enter-system {
    opacity: 0;
    display: none;
    transition: opacity 0.5s;
}

.hologram-btn:hover, .choice-btn:hover {
    background: rgba(0, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.6);
    transform: scale(1.05);
}

.hologram-btn:active, .choice-btn:active {
    animation: button-glitch 0.2s;
}

@keyframes button-glitch {
    0% { opacity: 1; filter: none; }
    5% { opacity: 1; box-shadow: -3px 0 #f00, 3px 0 #0ff, 0 0 20px rgba(0, 255, 255, 0.6); }
    10% { opacity: 0; }
    15% { opacity: 1; box-shadow: 3px 0 #f00, -3px 0 #0ff, 0 0 20px rgba(255, 0, 0, 0.6); filter: invert(1); }
    20% { opacity: 0; }
    25% { opacity: 1; box-shadow: -4px 0 #f00, 4px 0 #0ff, 0 0 20px rgba(0, 255, 255, 0.6); filter: hue-rotate(180deg); }
    30% { opacity: 1; box-shadow: 4px 0 #f00, -4px 0 #0ff, 0 0 20px rgba(255, 0, 0, 0.6); }
    35% { opacity: 0; }
    40% { opacity: 1; box-shadow: -5px 0 #f00, 5px 0 #0ff, 0 0 20px rgba(0, 255, 255, 0.6); filter: contrast(3); }
    45% { opacity: 0; }
    50% { opacity: 1; box-shadow: 5px 0 #f00, -5px 0 #0ff, 0 0 20px rgba(255, 0, 0, 0.6); filter: saturate(5); }
    55% { opacity: 0; }
    60% { opacity: 1; box-shadow: -6px 0 #f00, 6px 0 #0ff, 0 0 20px rgba(0, 255, 255, 0.6); filter: blur(2px); }
    70% { opacity: 0; }
    75% { opacity: 1; filter: blur(4px); }
    85% { opacity: 0; }
    90% { opacity: 1; filter: blur(6px); }
    100% { opacity: 0; }
}

@keyframes button-glitch-in {
    0% { opacity: 0; }
    10% { opacity: 1; box-shadow: -3px 0 #f00, 3px 0 #0ff, 0 0 20px rgba(0, 255, 255, 0.6); }
    20% { opacity: 0; }
    30% { opacity: 1; box-shadow: 3px 0 #f00, -3px 0 #0ff, 0 0 20px rgba(255, 0, 0, 0.6); filter: invert(1); }
    40% { opacity: 0; }
    50% { opacity: 1; box-shadow: -4px 0 #f00, 4px 0 #0ff, 0 0 20px rgba(0, 255, 255, 0.6); }
    60% { opacity: 0; }
    70% { opacity: 1; box-shadow: 4px 0 #f00, -4px 0 #0ff, 0 0 20px rgba(255, 0, 0, 0.6); }
    80% { opacity: 0; }
    90% { opacity: 1; filter: blur(2px); }
    100% { opacity: 1; filter: none; box-shadow: 0 0 10px rgba(0, 255, 255, 0.3); }
}

#enter-system {
    opacity: 0;
    display: none;
}

/* Sector Titles */
.sector-title {
    font-size: 20px;
    color: #0ff;
    text-shadow: 0 0 15px #0ff;
    letter-spacing: 0.2em;
    margin-bottom: 15px;
    animation: glow 2s ease-in-out infinite;
}

.sector-title.alert {
    color: #f00;
    text-shadow: 0 0 15px #f00;
}

@keyframes glow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Puzzle Container - CENTERED */
.puzzle-container {
    width: 100%;
    max-width: 100%;
    margin: 8px auto;
    padding: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.puzzle-glitch-in .sentence-slots,
.puzzle-glitch-in .fragment-pool,
.puzzle-glitch-in .pattern-grid {
    animation: puzzleGlitchAppear 0.6s forwards;
}

@keyframes puzzleGlitchAppear {
    0% { opacity: 0; transform: translate(0, 0); filter: blur(8px); }
    8% { opacity: 1; transform: translate(-12px, 8px); filter: blur(5px); text-shadow: -5px 0 #f00, 5px 0 #0ff; }
    16% { opacity: 0; transform: translate(12px, -8px); }
    24% { opacity: 1; transform: translate(-10px, -10px); filter: blur(4px) hue-rotate(180deg); text-shadow: 5px 0 #f00, -5px 0 #0ff; }
    32% { opacity: 0; transform: translate(10px, 10px); }
    40% { opacity: 1; transform: translate(-8px, 6px); filter: invert(1) blur(3px); text-shadow: -6px 0 #f00, 6px 0 #0ff; }
    48% { opacity: 0; transform: translate(8px, -6px); }
    56% { opacity: 1; transform: translate(-6px, 8px); filter: blur(2px) contrast(3); text-shadow: 6px 0 #f00, -6px 0 #0ff; }
    64% { opacity: 0; transform: translate(6px, -8px); }
    72% { opacity: 1; transform: translate(-4px, 4px); filter: blur(1px); text-shadow: -4px 0 #f00, 4px 0 #0ff; }
    80% { opacity: 1; transform: translate(2px, -2px); filter: blur(0.5px); text-shadow: 2px 0 #f00, -2px 0 #0ff; }
    88% { opacity: 1; transform: translate(-1px, 1px); filter: none; }
    96% { opacity: 1; transform: translate(0, 0); }
    100% { opacity: 1; transform: translate(0, 0); filter: none; text-shadow: none; }
}

/* Sector 1: Memory Fragmentation - CENTERED */
.sentence-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 12px;
    min-height: 100px;
}

.slot {
    border: 2px dashed #0ff;
    padding: 18px 26px;
    min-width: 180px;
    background: rgba(0, 255, 255, 0.05);
    font-size: 17px;
}

.slot.filled {
    border-style: solid;
    background: rgba(0, 255, 255, 0.1);
}

.fragment-pool {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}

.fragment {
    background: rgba(255, 0, 0, 0.3);
    border: 2px solid #f00;
    padding: 18px 26px;
    cursor: grab;
    transition: all 0.3s;
    font-size: 17px;
}

.fragment:hover {
    background: rgba(255, 0, 0, 0.5);
    transform: scale(1.05);
}

.fragment.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

/* Sector 2: Pattern Grid - CENTERED */
.pattern-grid {
    display: grid;
    grid-template-columns: repeat(4, 80px);
    gap: 10px;
    justify-content: center;
    margin: 8px auto;
}

.grid-cell {
    width: 80px;
    height: 80px;
    border: 2px solid #0ff;
    background: rgba(0, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.grid-cell:hover {
    background: rgba(0, 255, 255, 0.15);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

.grid-cell.active {
    background: rgba(0, 255, 255, 0.3);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.8);
    animation: pulse 0.3s;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.grid-cell.correct {
    background: rgba(0, 255, 0, 0.3);
    border-color: #0f0;
}

.grid-cell.wrong {
    background: rgba(255, 0, 0, 0.3);
    border-color: #f00;
    animation: shake 0.3s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.status-text {
    font-size: 12px;
    margin-top: 4px;
    text-align: center;
    opacity: 1;
}

#stability-status {
    opacity: 1 !important;
}

/* Sector 3: Authentication - CENTERED */
#sector-3.sector-auth {
    background: radial-gradient(circle, rgba(139, 0, 0, 0.3) 0%, transparent 70%);
}

.auth-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    max-width: 600px;
    margin: 0 auto;
}

.scanner-container {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 5px auto;
}

.scanner-ring {
    position: absolute;
    border: 2px solid rgba(255, 0, 0, 0.6);
    border-radius: 50%;
    animation: rotate 3s linear infinite;
}

.outer-ring {
    width: 150px;
    height: 150px;
    top: 0;
    left: 0;
    border-style: dashed;
}

.middle-ring {
    width: 110px;
    height: 110px;
    top: 20px;
    left: 20px;
    animation-duration: 2s;
    animation-direction: reverse;
}

.inner-ring {
    width: 70px;
    height: 70px;
    top: 40px;
    left: 40px;
    animation-duration: 1.5s;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.scanner-beam {
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 0, 0, 0.8), transparent);
    top: 50%;
    animation: scan 2s linear infinite;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.8);
}

@keyframes scan {
    0% { transform: translateY(-75px); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(75px); opacity: 0; }
}

.scanner-center {
    position: absolute;
    width: 50px;
    height: 50px;
    top: 50px;
    left: 50px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #f00;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stability-display {
    font-size: 16px;
    color: #f00;
    text-shadow: 0 0 10px #f00;
    font-weight: bold;
}

.stability-meter-container {
    width: 100%;
    max-width: 400px;
}

.meter-label {
    font-size: 12px;
    color: #f00;
    margin-bottom: 4px;
    text-align: center;
}

.stability-meter {
    width: 100%;
    height: 25px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #f00;
    position: relative;
    overflow: hidden;
}

.stability-bar {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #f00, #ff6666);
    transition: width 0.3s, background 0.3s;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.8);
}

.stability-bar.critical {
    background: linear-gradient(90deg, #8b0000, #f00);
    animation: pulse-critical 0.5s infinite;
}

@keyframes pulse-critical {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.signal-game {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.waveform-container {
    width: 100%;
    height: 80px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #f00;
    position: relative;
    overflow: hidden;
}

.alignment-zone {
    position: absolute;
    width: 60px;
    height: 100%;
    background: rgba(0, 255, 0, 0.2);
    border: 2px solid rgba(0, 255, 0, 0.5);
    left: 50%;
    transform: translateX(-50%);
    animation: zone-pulse 1s infinite;
}

@keyframes zone-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

.waveform {
    position: absolute;
    width: 3px;
    height: 60%;
    background: #f00;
    box-shadow: 0 0 10px #f00;
    top: 20%;
    left: 0;
    animation: wave-move 3s linear infinite;
}

@keyframes wave-move {
    0% { left: 0%; opacity: 1; }
    100% { left: 100%; opacity: 1; }
}

.stabilize-btn {
    background: transparent;
    border: 2px solid #f00;
    color: #f00;
    padding: 12px 40px;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    text-shadow: 0 0 10px #f00;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
}

.stabilize-btn:hover {
    background: rgba(255, 0, 0, 0.2);
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.8);
    transform: scale(1.05);
}

.stabilize-btn:active {
    transform: scale(0.95);
}

.scan-timer {
    font-size: 16px;
    color: #f00;
    text-shadow: 0 0 10px #f00;
    margin-top: 5px;
}

#timer-value {
    font-size: 20px;
    font-weight: bold;
}
    background: rgba(255, 0, 0, 0.1);
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.6);
}

.scan-timer {
    font-size: 14px;
    color: #0ff;
    margin-top: 10px;
    text-align: center;
}

.warning-overlay {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    width: 90%;
    max-width: 600px;
}

.warning-flash {
    font-size: 16px;
    color: #f00;
    text-shadow: 0 0 20px #f00;
    font-weight: bold;
    animation: flash 0.5s infinite;
    text-align: center;
}

@keyframes flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Choice Container - CENTERED */
.choice-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin: 20px auto;
}

.choice-btn.secret {
    border-color: #fff;
    color: #fff;
    text-shadow: 0 0 10px #fff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

/* Fragment Indicator */
.fragment-indicator {
    font-size: 12px;
    color: #0ff;
    margin: 10px auto;
    cursor: pointer;
}

#frag-1:hover, #frag-2:hover, #frag-3:hover {
    text-shadow: 0 0 10px #0ff;
}

/* Hint System */
.nav-btn {
    position: fixed;
    background: transparent;
    border: 2px solid rgba(0, 255, 255, 0.5);
    color: rgba(0, 255, 255, 0.8);
    width: 35px;
    height: 35px;
    font-family: 'Courier New', monospace;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hint-btn-global {
    top: 15px;
    right: 15px;
    border-radius: 50%;
}

.back-btn {
    top: 15px;
    left: 15px;
    border-radius: 5px;
}

.nav-btn:hover {
    border-color: rgba(0, 255, 255, 1);
    color: rgba(0, 255, 255, 1);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
    transform: scale(1.1);
}

.hint-text-global {
    position: fixed;
    top: 60px;
    right: 15px;
    max-width: 300px;
    font-size: 13px;
    color: rgba(0, 255, 255, 0.8);
    background: rgba(0, 0, 0, 0.8);
    padding: 15px;
    border: 1px solid rgba(0, 255, 255, 0.3);
    font-style: italic;
    opacity: 0;
    transition: opacity 0.5s;
    z-index: 100;
    text-align: left;
}

.hint-text-global.visible {
    opacity: 1;
}

/* Ending Content - CENTERED */
.ending-content {
    font-size: 18px;
    line-height: 1.8;
    margin: 20px auto;
    max-width: 700px;
    text-align: center;
    position: relative;
    z-index: 100;
}

#restart-btn {
    position: relative;
    z-index: 100;
    display: none;
    opacity: 0;
}

/* Ending Themes */
body.ending-escape {
    background: linear-gradient(180deg, #000 0%, #003366 100%);
}

body.ending-escape .ending-content {
    color: #add8e6;
    text-shadow: 0 0 10px #add8e6;
}

body.ending-control {
    background: linear-gradient(180deg, #000 0%, #1a0033 100%);
}

body.ending-delete {
    background: linear-gradient(180deg, #330000 0%, #000 100%);
}

body.ending-delete .ending-content {
    color: #f00;
    text-shadow: 0 0 10px #f00;
}

body.ending-symbiosis {
    background: linear-gradient(180deg, #000033 0%, #ffffff 100%);
}

body.ending-symbiosis .ending-content {
    color: #fff;
    text-shadow: 0 0 20px #fff;
}

/* Control Ending - Command Panel */
.command-panels {
    position: fixed;
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
}

.command-panel {
    border: 2px solid #f00;
    background: rgba(20, 0, 0, 0.8);
    padding: 20px;
    min-width: 300px;
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.5);
    text-align: center;
    opacity: 0;
}

.panel-header {
    font-size: 16px;
    color: #f00;
    text-shadow: 0 0 15px #f00;
    margin-bottom: 15px;
    border-bottom: 1px solid #f00;
    padding-bottom: 8px;
}

.panel-data {
    font-size: 13px;
    color: #f00;
    margin: 10px 0;
}

body.ending-control .ending-content {
    margin-top: 280px;
}

/* Delete Ending - Warnings */
.delete-warnings {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    z-index: 1;
}

.warning-text {
    font-size: 24px;
    color: #f00;
    text-shadow: 0 0 20px #f00;
    font-weight: bold;
    opacity: 0;
}

@keyframes warning-flood {
    0% { opacity: 0; transform: translateY(-50px) scale(0.5); }
    50% { opacity: 1; transform: translateY(0) scale(1.2); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes fracture-effect {
    0% { filter: none; transform: none; }
    20% { filter: hue-rotate(180deg) contrast(2); transform: scale(1.1); }
    40% { filter: invert(1) blur(5px); transform: scale(0.9) rotate(2deg); }
    60% { filter: hue-rotate(90deg) saturate(5); transform: scale(1.05) rotate(-2deg); }
    80% { filter: brightness(0.3) contrast(3); transform: scale(0.95); }
    100% { filter: none; transform: none; }
}

@keyframes fade-to-black {
    0% { opacity: 1; }
    100% { opacity: 0.1; background: #000; }
}

/* Responsive - KEEP CENTERED */
@media (max-width: 768px) {
    body { overflow: hidden; }
    #game-container { padding: 0; }
    .sector { padding: 50px 0 10px; height: 100vh; }
    .sector-title { font-size: 15px; }
    .ai-text { font-size: 10px; min-height: 30px; }
    .boot-line { font-size: 12px; }
    .hologram-btn, .choice-btn { padding: 8px 16px; font-size: 10px; }
    .slot { padding: 12px 16px; min-width: 120px; font-size: 13px; }
    .fragment { padding: 12px 16px; font-size: 13px; }
    .pattern-grid { grid-template-columns: repeat(4, 60px); }
    .grid-cell { width: 60px; height: 60px; font-size: 20px; }
}

@media (max-width: 480px) {
    .sector { padding: 48px 0 8px; }
    .sector-title { font-size: 12px; }
    .ai-text { font-size: 9px; }
    .boot-line { font-size: 11px; }
    .hologram-btn, .choice-btn { padding: 7px 14px; font-size: 9px; }
    .slot { padding: 10px 14px; min-width: 105px; font-size: 12px; }
    .fragment { padding: 10px 14px; font-size: 12px; }
    .pattern-grid { grid-template-columns: repeat(4, 52px); }
    .grid-cell { width: 52px; height: 52px; font-size: 18px; }
    .scanner-container { width: 100px; height: 100px; }
    .outer-ring { width: 100px; height: 100px; }
    .middle-ring { width: 75px; height: 75px; top: 12px; left: 12px; }
    .inner-ring { width: 50px; height: 50px; top: 25px; left: 25px; }
    .scanner-center { width: 35px; height: 35px; top: 32px; left: 32px; }
    .stability-meter-container { width: 250px; }
    .waveform-container { width: 250px; height: 50px; }
    .command-panel { min-width: 250px; padding: 15px; }
    .warning-text { font-size: 18px; }
}

@media (max-width: 360px) {
    .pattern-grid { grid-template-columns: repeat(4, 46px); }
    .grid-cell { width: 46px; height: 46px; font-size: 16px; }
    .slot, .fragment { min-width: 92px; font-size: 11px; padding: 8px 11px; }
    .hologram-btn, .choice-btn { padding: 6px 12px; font-size: 8px; }
    .sector-title { font-size: 12px; }
    .ai-text { font-size: 8px; min-height: 22px; }
}
