/**
 * Common Styles - Matrix Portal
 * Shared base styles across all pages
 * NO INLINE STYLES - CSP Compliant
 * MOBILE RESPONSIVE VERSION
 */

/* ============================================
   RESET & BASE
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #000;
    color: #0f0;
    font-family: 'Courier New', monospace;
    overflow-x: hidden;
    min-height: 100vh;
    line-height: 1.6;
    padding-bottom: 320px; /* Space for console (300px) + buffer (20px) */
}

/* Remove padding when console is minimized */
body.console-minimized {
    padding-bottom: 65px; /* Space for minimized console (45px) + buffer (20px) */
}

/* ============================================
   SCROLLBAR - MATRIX GREEN THEME
   ============================================ */

/* WebKit browsers (Chrome, Edge, Safari) */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #000;
    border-left: 1px solid #001a00;
}

::-webkit-scrollbar-thumb {
    background: #00aa00;
    border-radius: 2px;
    border: 1px solid #003300;
    box-shadow: 0 0 6px rgba(0, 255, 0, 0.4);
}

::-webkit-scrollbar-thumb:hover {
    background: #00ff00;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.7);
}

::-webkit-scrollbar-thumb:active {
    background: #00ff44;
    box-shadow: 0 0 14px rgba(0, 255, 68, 0.9);
}

::-webkit-scrollbar-corner {
    background: #000;
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #00aa00 #000;
}

/* ============================================
   CONTAINER & LAYOUT
   ============================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

main {
    position: relative;
    z-index: 1;
    min-height: calc(100vh - 200px);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    color: #0f0;
    text-shadow: 0 0 10px #0f0;
    margin-bottom: 15px;
    font-weight: bold;
}

h1 {
    font-size: 2.5em;
}

h2 {
    font-size: 2em;
}

h3 {
    font-size: 1.75em;
}

h4 {
    font-size: 1.5em;
}

h5 {
    font-size: 1.25em;
}

h6 {
    font-size: 1em;
}

p {
    margin-bottom: 15px;
    line-height: 1.8;
}

/* ============================================
   HEADER
   ============================================ */

header {
    text-align: center;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

header h1 {
    font-size: 3em;
    letter-spacing: 5px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

header .tagline {
    color: #00ff44;
    font-size: 1.2em;
    letter-spacing: 2px;
}

/* ============================================
   NAVIGATION
   ============================================ */

nav {
    background: rgba(0, 255, 0, 0.05);
    padding: 15px;
    border-bottom: 2px solid #0f0;
    position: relative;
    z-index: 2;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

nav a {
    color: #0f0;
    text-decoration: none;
    padding: 10px 20px;
    border: 1px solid #0f0;
    border-radius: 5px;
    transition: all 0.3s;
    display: inline-block;
}

nav a:hover,
nav a.active {
    background: #0f0;
    color: #000;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.7);
    transform: translateY(-2px);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn,
button:not(.console-toggle):not(.console-close):not(.console-reopen-btn) {
    background: transparent;
    color: #0f0;
    border: 2px solid #0f0;
    padding: 12px 30px;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-size: 1em;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn:hover,
button:not(.console-toggle):not(.console-close):not(.console-reopen-btn):hover {
    background: #0f0;
    color: #000;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.6);
    transform: translateY(-2px);
}

.btn:disabled,
button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: #0f0;
    color: #000;
}

.btn-secondary {
    border-color: #00ff44;
    color: #00ff44;
}

.btn-secondary:hover {
    background: #00ff44;
}

.btn-danger {
    border-color: #ff0;
    color: #ff0;
}

.btn-danger:hover {
    background: #ff0;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9em;
}

/* ============================================
   FORMS
   ============================================ */

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    color: #0f0;
    margin-bottom: 8px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9em;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 12px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #0f0;
    color: #0f0;
    font-family: 'Courier New', monospace;
    font-size: 1em;
    border-radius: 5px;
    transition: all 0.3s;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
    border-color: #00ff44;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

input::placeholder,
textarea::placeholder {
    color: #666;
}

/* ============================================
   CARDS
   ============================================ */

.card {
    background: rgba(0, 255, 0, 0.05);
    border: 2px solid #0f0;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.1);
}

.card h2,
.card h3 {
    margin-top: 0;
    margin-bottom: 15px;
}

.card-header {
    border-bottom: 1px solid #0f0;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.card-body {
    padding: 20px 0;
}

.card-footer {
    border-top: 1px solid #0f0;
    padding-top: 15px;
    margin-top: 20px;
}

/* ============================================
   TABLES
   ============================================ */

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: rgba(0, 0, 0, 0.8);
}

table th,
table td {
    padding: 12px;
    border: 1px solid #0f0;
    text-align: left;
}

table th {
    background: rgba(0, 255, 0, 0.1);
    color: #00ff44;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

table tr:hover {
    background: rgba(0, 255, 0, 0.05);
}

table tr:nth-child(even) {
    background: rgba(0, 255, 0, 0.02);
}

/* ============================================
   ALERTS & MESSAGES
   ============================================ */

.alert {
    padding: 15px 20px;
    border-radius: 5px;
    margin: 15px 0;
    border-left: 4px solid;
}

.alert-success {
    background: rgba(0, 255, 0, 0.1);
    border-color: #0f0;
    color: #0f0;
}

.alert-error {
    background: rgba(255, 0, 0, 0.1);
    border-color: #f00;
    color: #f00;
}

.alert-warning {
    background: rgba(255, 255, 0, 0.1);
    border-color: #ff0;
    color: #ff0;
}

.alert-info {
    background: rgba(0, 255, 255, 0.1);
    border-color: #0ff;
    color: #0ff;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }
.pt-1 { padding-top: 10px; }
.pt-2 { padding-top: 20px; }
.pt-3 { padding-top: 30px; }
.pb-1 { padding-bottom: 10px; }
.pb-2 { padding-bottom: 20px; }
.pb-3 { padding-bottom: 30px; }

.d-none {
    display: none;
}

.d-block {
    display: block;
}

.d-flex {
    display: flex;
}

.flex-wrap {
    flex-wrap: wrap;
}

.gap-1 { gap: 10px; }
.gap-2 { gap: 20px; }
.gap-3 { gap: 30px; }

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.align-center {
    align-items: center;
}

/* ============================================
   LINKS
   ============================================ */

a {
    color: #0f0;
    text-decoration: underline;
    transition: color 0.3s;
}

a:hover {
    color: #00ff44;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.5);
}

/* ============================================
   LISTS
   ============================================ */

ul, ol {
    margin-left: 25px;
    margin-bottom: 15px;
}

ul li, ol li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* ============================================
   CODE BLOCKS
   ============================================ */

code {
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid #0f0;
    padding: 2px 8px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #00ff44;
}

pre {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #0f0;
    border-radius: 5px;
    padding: 15px;
    overflow-x: auto;
    margin: 15px 0;
}

pre code {
    background: none;
    border: none;
    padding: 0;
    color: #0f0;
}

/* ============================================
   IMAGES
   ============================================ */

img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

/* ============================================
   MATRIX RAIN CANVAS
   ============================================ */

#matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.3;
}

/* ============================================
   GLITCH EFFECTS
   ============================================ */

.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 #f0f;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 #0ff;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(10px, 9999px, 31px, 0); }
    5% { clip: rect(70px, 9999px, 71px, 0); }
    10% { clip: rect(98px, 9999px, 33px, 0); }
    15% { clip: rect(5px, 9999px, 90px, 0); }
    20% { clip: rect(23px, 9999px, 85px, 0); }
    25% { clip: rect(80px, 9999px, 43px, 0); }
    30% { clip: rect(50px, 9999px, 95px, 0); }
    35% { clip: rect(15px, 9999px, 60px, 0); }
    40% { clip: rect(85px, 9999px, 25px, 0); }
    45% { clip: rect(40px, 9999px, 75px, 0); }
    50% { clip: rect(65px, 9999px, 55px, 0); }
    55% { clip: rect(30px, 9999px, 80px, 0); }
    60% { clip: rect(90px, 9999px, 20px, 0); }
    65% { clip: rect(45px, 9999px, 70px, 0); }
    70% { clip: rect(60px, 9999px, 50px, 0); }
    75% { clip: rect(25px, 9999px, 85px, 0); }
    80% { clip: rect(75px, 9999px, 40px, 0); }
    85% { clip: rect(35px, 9999px, 65px, 0); }
    90% { clip: rect(55px, 9999px, 45px, 0); }
    95% { clip: rect(20px, 9999px, 90px, 0); }
    100% { clip: rect(95px, 9999px, 15px, 0); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(65px, 9999px, 100px, 0); }
    5% { clip: rect(30px, 9999px, 60px, 0); }
    10% { clip: rect(80px, 9999px, 20px, 0); }
    15% { clip: rect(45px, 9999px, 85px, 0); }
    20% { clip: rect(90px, 9999px, 40px, 0); }
    25% { clip: rect(25px, 9999px, 75px, 0); }
    30% { clip: rect(70px, 9999px, 50px, 0); }
    35% { clip: rect(15px, 9999px, 95px, 0); }
    40% { clip: rect(55px, 9999px, 35px, 0); }
    45% { clip: rect(85px, 9999px, 65px, 0); }
    50% { clip: rect(35px, 9999px, 80px, 0); }
    55% { clip: rect(75px, 9999px, 45px, 0); }
    60% { clip: rect(20px, 9999px, 90px, 0); }
    65% { clip: rect(60px, 9999px, 30px, 0); }
    70% { clip: rect(95px, 9999px, 55px, 0); }
    75% { clip: rect(40px, 9999px, 70px, 0); }
    80% { clip: rect(50px, 9999px, 25px, 0); }
    85% { clip: rect(10px, 9999px, 85px, 0); }
    90% { clip: rect(65px, 9999px, 50px, 0); }
    95% { clip: rect(100px, 9999px, 10px, 0); }
    100% { clip: rect(5px, 9999px, 95px, 0); }
}

/* ============================================
   MATRIX CONTROL BUTTONS
   ============================================ */

.matrix-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 10px;
}

.matrix-control-btn {
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #0f0;
    color: #0f0;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2em;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.matrix-control-btn:hover {
    background: rgba(0, 255, 0, 0.2);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
    transform: scale(1.1);
}

.matrix-control-btn:active {
    transform: scale(0.95);
}

/* ============================================
   ON-SCREEN CONSOLE
   ============================================ */

.console-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    border-top: 2px solid #0f0;
    z-index: 9999;
    font-family: 'Courier New', monospace;
    max-height: 300px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -5px 20px rgba(0, 255, 0, 0.3);
}

.console-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: rgba(0, 255, 0, 0.1);
    border-bottom: 1px solid #0f0;
}

.console-title {
    color: #0f0;
    font-weight: bold;
    font-size: 0.9em;
    letter-spacing: 2px;
    text-shadow: 0 0 5px #0f0;
}

.console-controls {
    display: flex;
    gap: 10px;
}

.console-toggle,
.console-close {
    background: transparent;
    border: 1px solid #0f0;
    color: #0f0;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-size: 1.2em;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 3px;
    transition: all 0.3s;
    min-width: 36px;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.console-toggle:hover,
.console-close:hover {
    background: rgba(0, 255, 0, 0.2);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.console-toggle:active,
.console-close:active {
    transform: scale(0.95);
}

.console-output {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    color: #0f0;
    font-size: 0.9em;
    max-height: 200px;
    line-height: 1.5;
}

.console-line {
    margin: 5px 0;
    word-wrap: break-word;
}

.console-line.error {
    color: #f00;
}

.console-line.warning {
    color: #ff0;
}

.console-line.success {
    color: #0ff;
}

.console-input-container {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-top: 1px solid #0f0;
    background: rgba(0, 0, 0, 0.5);
}

.console-input-container::before {
    content: '>';
    color: #0f0;
    margin-right: 10px;
    font-weight: bold;
    font-size: 1.2em;
}

.console-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #0f0;
    font-family: 'Courier New', monospace;
    font-size: 1em;
    outline: none;
    padding: 5px;
    min-height: 36px;
    -webkit-appearance: none;
}

.console-input::placeholder {
    color: #666;
}

.console-minimized {
    max-height: 45px;
}

.console-minimized .console-output,
.console-minimized .console-input-container {
    display: none;
}

/* Console closed state */
body.console-closed {
    padding-bottom: 0 !important;
}

/* Reopen button */
.console-reopen-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #0f0;
    color: #0f0;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-size: 1em;
    font-weight: bold;
    z-index: 9998;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
    transition: all 0.3s;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.console-reopen-btn:hover {
    background: #0f0;
    color: #000;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.6);
    transform: scale(1.05);
}

.console-reopen-btn:active {
    transform: scale(0.95);
}

/* Console Animations */
@keyframes console-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.console-cursor {
    display: inline-block;
    width: 8px;
    height: 16px;
    background: #0f0;
    margin-left: 2px;
    animation: console-blink 1s infinite;
}

/* ============================================
   CONSOLE COMMANDS ANIMATIONS
   ============================================ */

/* Confetti Animation */
@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.console-confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    z-index: 10000;
    pointer-events: none;
    top: -20px;
    animation: confettiFall 3s linear forwards;
}

/* Confetti Color Variants */
.console-confetti-1 { 
    background: #0f0; 
    box-shadow: 0 0 10px #0f0; 
}

.console-confetti-2 { 
    background: #ffd700; 
    box-shadow: 0 0 10px #ffd700; 
}

.console-confetti-3 { 
    background: #ff6b6b; 
    box-shadow: 0 0 10px #ff6b6b; 
}

.console-confetti-4 { 
    background: #4ecdc4; 
    box-shadow: 0 0 10px #4ecdc4; 
}

.console-confetti-5 { 
    background: #f0f; 
    box-shadow: 0 0 10px #f0f; 
}

.console-confetti-6 { 
    background: #00ff00; 
    box-shadow: 0 0 10px #00ff00; 
}

.console-confetti-7 { 
    background: #00ffff; 
    box-shadow: 0 0 10px #00ffff; 
}

/* Spark Animation */
@keyframes spark {
    0% { 
        opacity: 1; 
        transform: scale(1); 
    }
    100% { 
        opacity: 0; 
        transform: scale(4); 
    }
}

.console-spark {
    position: fixed;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    z-index: 10000;
    pointer-events: none;
    animation: spark 2s ease-out forwards;
}

/* Spark Color Variants */
.console-spark-1 { 
    background: #0f0; 
    box-shadow: 0 0 20px #0f0; 
}

.console-spark-2 { 
    background: #00ff00; 
    box-shadow: 0 0 20px #00ff00; 
}

.console-spark-3 { 
    background: #00ffff; 
    box-shadow: 0 0 20px #00ffff; 
}

.console-spark-4 { 
    background: #ffd700; 
    box-shadow: 0 0 20px #ffd700; 
}

/* Matrix Glitch Effect */
@keyframes matrix-glitch {
    0% { filter: none; }
    10% { filter: hue-rotate(90deg); }
    20% { filter: none; }
    30% { filter: hue-rotate(180deg); }
    40% { filter: none; }
    50% { filter: invert(1); }
    60% { filter: none; }
    70% { filter: hue-rotate(270deg); }
    80% { filter: none; }
    90% { filter: saturate(2); }
    100% { filter: none; }
}

.matrix-glitch-active {
    animation: matrix-glitch 0.5s ease-in-out;
}

/* Console Command Effects */
.console-matrix-glitch {
    animation: matrix-glitch 0.1s infinite !important;
}

/* Easter Egg Effect */
.console-easter-egg {
    filter: hue-rotate(180deg) invert(1) !important;
    transition: filter 0.3s ease;
}

/* Boost Mode Effect */
.console-boost-mode {
    filter: brightness(1.3) saturate(1.5) !important;
    transform: scale(1.02) !important;
    transition: all 0.5s ease;
}

/* ============================================
   FOOTER & AD CONTAINER
   ============================================ */

footer {
    background: rgba(0, 255, 0, 0.05);
    border-top: 2px solid #0f0;
    padding: 30px 20px 20px;
    text-align: center;
    position: relative;
    z-index: 1;
    margin-top: 50px;
}

.footer-ad-container {
    width: 512px;
    height: 94px;
    margin: 0 auto 20px;
    border: 2px solid #0f0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.2);
    overflow: hidden;
}

.footer-ad-placeholder {
    color: #0f0;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.7;
}

.footer-info {
    color: #0f0;
    font-size: 0.9em;
    margin-top: 15px;
    opacity: 0.8;
}

.footer-info a {
    color: #00ff44;
    text-decoration: none;
    transition: all 0.3s;
}

.footer-info a:hover {
    color: #0f0;
    text-shadow: 0 0 10px #0f0;
}

/* ============================================
   MOBILE RESPONSIVE CONSOLE
   ============================================ */

@media (max-width: 768px) {
    /* Adjust body padding for mobile */
    body {
        padding-bottom: 280px;
    }
    
    body.console-minimized {
        padding-bottom: 55px;
    }
    
    /* Console adjustments */
    .console-container {
        max-height: 250px;
    }
    
    .console-header {
        padding: 12px 10px;
    }
    
    .console-title {
        font-size: 0.8em;
        letter-spacing: 0.5px;
    }
    
    .console-controls {
        gap: 6px;
    }
    
    .console-toggle,
    .console-close {
        padding: 6px 12px;
        font-size: 1.1em;
        min-width: 40px;
        min-height: 40px;
    }
    
    .console-output {
        font-size: 0.85em;
        padding: 10px;
        max-height: 150px;
    }
    
    .console-input-container {
        padding: 8px 10px;
    }
    
    .console-input {
        font-size: 16px;
        min-height: 40px;
    }
    
    .console-reopen-btn {
        bottom: 15px;
        right: 15px;
        padding: 10px 20px;
        font-size: 0.9em;
    }
    
    /* Mobile Footer Responsiveness */
    footer {
        padding: 20px 15px 15px;
    }
    
    .footer-ad-container {
        width: 100%;
        max-width: 512px;
        height: auto;
        min-height: 94px;
        padding: 10px;
    }
}

@media (max-width: 576px) {
    /* Further mobile optimizations */
    body {
        padding-bottom: 260px;
    }
    
    body.console-minimized {
        padding-bottom: 50px;
    }
    
    .console-container {
        max-height: 220px;
    }
    
    .console-header {
        padding: 10px 8px;
    }
    
    .console-title {
        font-size: 0.75em;
    }
    
    .console-toggle,
    .console-close {
        padding: 5px 10px;
        font-size: 1em;
        min-width: 38px;
        min-height: 38px;
    }
    
    .console-output {
        font-size: 0.8em;
        padding: 8px;
        max-height: 120px;
        line-height: 1.4;
    }
    
    .console-line {
        margin: 3px 0;
    }
    
    .console-input-container {
        padding: 6px 8px;
    }
    
    .console-input-container::before {
        margin-right: 6px;
        font-size: 1em;
    }
    
    .console-input {
        font-size: 16px;
        padding: 4px;
    }
    
    .console-minimized {
        max-height: 40px;
    }
    
    .footer-ad-container {
        width: calc(100% - 20px);
        margin: 0 10px 15px;
    }
    
    .footer-info {
        font-size: 0.8em;
        padding: 0 10px;
    }
}

/* Landscape mode adjustments for mobile */
@media (max-width: 768px) and (orientation: landscape) {
    body {
        padding-bottom: 200px;
    }
    
    body.console-minimized {
        padding-bottom: 45px;
    }
    
    .console-container {
        max-height: 180px;
    }
    
    .console-output {
        max-height: 100px;
    }
}

/* ============================================
   ACCESSIBILITY & REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .console-cursor {
        animation: none;
    }
    
    .console-matrix-glitch,
    .console-easter-egg,
    .console-boost-mode {
        animation: none !important;
        transition: none !important;
        filter: none !important;
        transform: none !important;
    }
}

/* ============================================
   HIGH CONTRAST MODE
   ============================================ */

@media (prefers-contrast: high) {
    body {
        color: #fff;
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: #fff;
    }
    
    .btn,
    button {
        border-width: 3px;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .console-container,
    .console-reopen-btn,
    #matrix-bg,
    nav,
    .btn {
        display: none !important;
    }
    
    body {
        background: #fff;
        color: #000;
        padding-bottom: 0;
    }
    
    a {
        text-decoration: underline;
        color: #000;
    }
}