:root {
    --bg-start: #1e3c72;
    --bg-end: #2a5298;
    --card-bg: #1d2b49;
    --text-main: #e0e0e0;
    --accent: #2ed573;
    --danger: #e53e3e;
    --font: 'Poppins', sans-serif;
    --tab-inactive: #2d3748;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font);
    color: var(--text-main);
    background: linear-gradient(135deg, var(--bg-start), var(--bg-end));
    min-height: 100vh;
    padding: 10px;
    display: grid;
    place-items: center;
    overflow-x: hidden;
}

/* MATRIX MODE */
body.matrix-mode { background: black !important; }
body.matrix-mode .profile h1, body.matrix-mode i { color: #00ff00 !important; text-shadow: 0 0 5px #00ff00; }
body.matrix-mode #main-content { border: 1px solid #00ff00; box-shadow: 0 0 15px #00ff00; }
#matrix-canvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; display: none; }

/* LAYOUT */
.page-layout { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 5%; 
    transition: all 0.5s ease; 
    width: 100%; 
    max-width: 1000px;
}
.page-layout.verified { gap: 0; }
.page-layout.verified #verification-gate { width: 0; opacity: 0; padding: 0; margin: 0; overflow: hidden; flex-basis: 0; }

#verification-gate { flex: 1 1 400px; max-width: 450px; text-align: center; transition: opacity 0.5s ease; }
.hidden { display: none !important; }
.step-container { animation: fadeIn 0.5s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* CAPTCHAS */
.text-captcha-wrap { background: rgba(0,0,0,0.2); border-radius: 8px; padding: 15px; display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 320px; margin: 0 auto; }
.svg-wrapper { background: var(--card-bg); border-radius: 4px; padding: 5px; }
#text-captcha-input { padding: 10px; border-radius: 4px; border: 1px solid #4a5568; background: #2d3748; color: white; text-align: center; font-family: monospace; width: 100%; }
.verify-btn { padding: 0 15px; background: var(--accent); border: none; border-radius: 4px; cursor: pointer; }

/* MAIN CARD */
#main-content { 
    flex: 0 1 450px; /* Flexible width */
    background-color: var(--card-bg); 
    border-radius: 24px; 
    padding: 25px; 
    text-align: center; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.3); 
    transition: all 0.5s ease; 
    position: relative; 
    z-index: 10; 
    min-height: 500px; 
    display: flex; 
    flex-direction: column; 
    width: 95%; /* Mobile safe width */
}
#main-content.locked { filter: blur(10px); opacity: 0.3; pointer-events: none; }

/* TABS */
.tabs-nav { display: flex; gap: 8px; margin-bottom: 25px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 15px; overflow-x: auto; }
.tab-btn { flex: 1; min-width: 50px; background: transparent; border: none; color: #a0aec0; padding: 10px 5px; cursor: pointer; font-weight: 600; transition: 0.3s; border-radius: 6px; font-size: 1.2rem; }
.tab-btn:hover { background: rgba(255,255,255,0.05); color: white; }
.tab-btn.active { background: var(--tab-inactive); color: white; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }

/* TAB CONTENT */
.tab-content { display: none; animation: fadeIn 0.3s ease; flex: 1; width: 100%; }
.tab-content.active { display: flex; flex-direction: column; }

/* PROFILE (HOME) */
.profile-img { width: 90px; height: 90px; border-radius: 50%; border: 3px solid var(--danger); object-fit: cover; margin-bottom: 10px; }
.bio-text { font-size: 0.8rem; color: #a0aec0; margin-bottom: 20px; font-style: italic; }
.links { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.link-button { padding: 12px; background: #2d3748; color: white; text-decoration: none; border-radius: 8px; display: flex; align-items: center; justify-content: center; gap: 10px; transition: 0.2s; font-size: 0.9rem; width: 100%; }
.link-button:hover { background: #4a5568; transform: translateY(-2px); }

/* CONTACT */
.contact-info { margin-bottom: 15px; font-size: 0.9rem; }
.email-link { color: var(--accent); text-decoration: none; font-weight: bold; }
.divider { border: 0; border-top: 1px solid rgba(255,255,255,0.1); margin: 15px 0; }
.input-field { width: 100%; padding: 10px; margin-bottom: 10px; border-radius: 6px; border: 1px solid #4a5568; background: #2d3748; color: white; font-family: var(--font); }
.send-btn { background: var(--accent); color: #1d2b49; font-weight: bold; border: none; cursor: pointer; }

/* MONITOR & PROJECTS */
.intruder-box { background: rgba(0,0,0,0.3); border: 1px solid var(--danger); padding: 10px; border-radius: 8px; font-family: monospace; font-size: 0.8rem; text-align: left; margin-bottom: 20px; }
.project-list { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.project-card { background: rgba(255,255,255,0.05); padding: 12px; border-radius: 8px; border-left: 3px solid var(--accent); }
.project-card h4 { font-size: 0.9rem; margin-bottom: 3px; color: white; }
.project-card p { font-size: 0.8rem; color: #a0aec0; }
.server-stats { background: rgba(255,255,255,0.05); padding: 15px; border-radius: 8px; text-align: left; width: 100%; }
.stat-row { display: flex; align-items: center; gap: 10px; font-size: 0.8rem; margin-bottom: 8px; }
.progress-bar { flex: 1; height: 6px; background: rgba(0,0,0,0.5); border-radius: 3px; overflow: hidden; }
.progress-bar div { height: 100%; background: var(--accent); transition: width 1s ease; }

/* EXTRAS */
.control-panel { margin-top: auto; display: flex; gap: 10px; padding-top: 20px; }
.ctrl-btn { flex: 1; padding: 10px; border: none; border-radius: 4px; cursor: pointer; font-weight: bold; font-size: 0.8rem; }
.ctrl-btn.danger { background: var(--danger); color: white; }

#terminal-window { position: fixed; bottom: 20px; right: 20px; width: 400px; height: 300px; background: rgba(0,0,0,0.95); border: 1px solid #333; border-radius: 6px; color: #0f0; font-family: monospace; display: flex; flex-direction: column; z-index: 100; }
.term-body { flex: 1; padding: 10px; overflow-y: auto; font-size: 0.9rem; }
.term-input-line { display: flex; padding: 5px 10px; background: #111; gap: 5px; }
#term-input { flex: 1; background: transparent; border: none; color: white; outline: none; font-family: monospace; }
#glitch-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: white; z-index: 9999; display: none; mix-blend-mode: exclusion; }
@keyframes glitch-anim { 0% { transform: translate(0); } 20% { transform: translate(-5px, 5px); } 40% { transform: translate(5px, -5px); } 100% { transform: translate(0); } }
body.glitching { animation: glitch-anim 0.1s infinite; filter: invert(1); }
#webamp { left: 20px !important; top: 20px !important; }

footer { margin-top: 15px; font-size: 0.7rem; color: #5a6575; }

/* --- MOBILE RESPONSIVE QUERIES --- */
@media (max-width: 768px) {
    .page-layout { flex-direction: column; gap: 20px; }
    
    #verification-gate { width: 100%; max-width: 95%; }
    
    #main-content {
        width: 100%;
        margin: 0 10px;
        min-height: auto;
    }

    #terminal-window {
        width: 90%;
        left: 5%;
        right: 5%;
        bottom: 70px; /* Above Webamp */
        height: 250px;
    }

    /* Stack controls on mobile */
    .control-panel { flex-direction: column; }
    
    /* Make Captchas fit */
    .captcha-stack { width: 100%; }
    .text-captcha-wrap { width: 100%; }

    /* Hide Webamp on very small screens or make it smaller */
    #webamp { display: none !important; } 
}