:root {
    /* --- Core Palette (Dark "Spy" Theme) --- */
    --bg-color: #0f172a;
    --bg-gradient: radial-gradient(circle at center, #1e293b, #0f172a);

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;

    --purple-primary: #8b5cf6;
    --blue-primary: #3b82f6;
    --cyan-accent: #22d3ee;
    --pink-accent: #ec4899;
    --green-success: #10b981;
    --red-danger: #ef4444;
    --orange-warning: #f59e0b;

    /* --- Glassmorphism --- */
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --glass-blur: blur(12px);

    /* --- Google Brand Colors (Muted for Dark Mode) --- */
    --g-blue: #4285F4;
    --g-red: #EA4335;
    --g-yellow: #FBBC05;
    --g-green: #34A853;

    /* --- Spacing --- */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 50px;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    background-image: var(--bg-gradient);
    color: var(--text-primary);
    line-height: 1.5;
    width: 100vw;
    height: 100vh;
    /* Fallback */
    height: 100dvh;
    /* Dynamic Height */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: background 0.5s ease;
}

/* --- Typography --- */
h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.2;
    margin-bottom: 0.5em;
    font-weight: 700;
}

a {
    color: var(--blue-primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--cyan-accent);
}

button,
input,
select,
textarea {
    font-family: inherit;
    font-size: 1rem;
}

/* --- Utilities --- */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Background Effects (Blobs) --- */
.blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.4;
    animation: blobMove 25s infinite alternate ease-in-out;
    pointer-events: none;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--blue-primary), var(--purple-primary));
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--g-green), var(--cyan-accent));
    animation-delay: -5s;
}

@keyframes blobMove {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, 30px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 50px) scale(0.9);
    }

    100% {
        transform: translate(20px, -20px) scale(1.05);
    }
}

/* --- Common Components --- */

/* Glass Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: var(--radius-lg);
}

/* Standard Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--blue-primary), var(--purple-primary));
    color: white;
    border: none;
    border-radius: var(--radius-pill);
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
    user-select: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
    filter: brightness(1.1);
}

.btn:active {
    transform: translateY(0);
}

.btn.delete-btn {
    background: linear-gradient(135deg, var(--red-danger), #dc2626);
}

.btn.delete-btn:hover {
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.btn-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

/* Panic Button Special */
.btn-panic {
    background: var(--red-danger);
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 0 10px var(--red-danger);
    animation: pulse-red 2s infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.btn-panic:hover {
    transform: scale(1.1) rotate(10deg);
}

@keyframes pulse-red {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* Inputs */
input[type="text"],
input[type="password"],
textarea {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    transition: border-color 0.2s, background 0.2s;
    outline: none;
}

input:focus {
    border-color: var(--blue-primary);
    background: rgba(0, 0, 0, 0.3);
}

/* --- Layout: Lobby (Google Style) --- */
#lobby {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 20px;
}

.google-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 600px;
    z-index: 10;
    text-align: center;
}

.google-logo {
    font-family: 'Product Sans', 'Century Gothic', sans-serif;
    font-size: clamp(3rem, 10vw, 5rem);
    margin-bottom: 2rem;
    letter-spacing: -0.04em;
    user-select: none;
    animation: floatLogo 6s ease-in-out infinite;
}

@keyframes floatLogo {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.search-bar-wrapper {
    display: flex;
    align-items: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-pill);
    padding: 8px 24px;
    width: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 2rem;
}

.search-bar-wrapper:hover,
.search-bar-wrapper:focus-within {
    background: rgba(30, 41, 59, 0.9);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    border-color: rgba(66, 133, 244, 0.3);
    transform: scale(1.02);
}

.google-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.1rem;
    padding: 0 15px;
    height: 44px;
    outline: none;
}

.search-icon,
.mic-icon {
    font-size: 1.2rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
}

.mic-icon:hover {
    color: var(--g-blue);
}

.google-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.g-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    color: var(--text-primary);
    padding: 0 20px;
    height: 38px;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.g-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.google-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--glass-border);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.footer-row {
    padding: 12px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-row.top {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

/* --- Layout: Chat Room --- */
.chat-container {
    width: 100%;
    height: 100%;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    padding: 0;
    position: relative;
    background: rgba(15, 23, 42, 0.6);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

.chat-header {
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 30;
}

.chat-room-info h3 {
    font-size: 1.1rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

#user-count {
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
}

#user-count:hover {
    border-color: var(--glass-border);
    background: rgba(255, 255, 255, 0.1);
}

#connection-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--red-danger);
    transition: background-color 0.3s;
}

.messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    /* Tighter gap for chat feel */
    scroll-behavior: smooth;
    mask-image: linear-gradient(to bottom, transparent, black 20px);
}

/* Custom Scrollbar for Messages */
.messages::-webkit-scrollbar {
    width: 6px;
}

.messages::-webkit-scrollbar-track {
    background: transparent;
}

.messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Message Bubbles */
.message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.5;
    position: relative;
    word-wrap: break-word;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    animation: messageEntry 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes messageEntry {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Sent Messages (Right) */
.message.sent {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--blue-primary), #4338ca);
    color: white;
    border-bottom-right-radius: 2px;
    margin-right: 5px;
}

/* Sent Bubble Tail */
.message.sent::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: -6px;
    width: 12px;
    height: 12px;
    background: inherit;
    /* Matches gradient */
    clip-path: polygon(0 0, 0% 100%, 100% 100%);
    box-shadow: -1px 1px 1px rgba(0, 0, 0, 0.1);
    z-index: -1;
}

/* Received Messages (Left) */
.message.received {
    align-self: flex-start;
    background: rgba(30, 41, 59, 0.95);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom-left-radius: 2px;
    margin-left: 5px;
}

/* Received Bubble Tail */
.message.received::after {
    content: '';
    position: absolute;
    bottom: -1px;
    /* Align with border */
    left: -6px;
    width: 12px;
    height: 12px;
    background: rgba(30, 41, 59, 0.95);
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
    z-index: -1;
}

.message.system {
    align-self: center;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-size: 0.8rem;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.message .sender {
    display: block;
    font-size: 0.75rem;
    margin-bottom: 4px;
    opacity: 0.8;
    font-weight: 600;
}

.message.received .sender {
    color: var(--cyan-accent);
}

.message.sent .sender {
    color: rgba(255, 255, 255, 0.9);
    text-align: right;
}

/* Enhanced Input Area */
.input-area {
    margin: 15px 20px 20px;
    padding: 8px 10px 8px 16px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 28px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 20;
    transition: all 0.3s ease;
}

.input-area:focus-within {
    background: rgba(15, 23, 42, 0.95);
    border-color: var(--blue-primary);
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.2);
    transform: translateY(-2px);
}

.input-area input[type="text"] {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
    padding: 10px;
    border-radius: 0;
    outline: none;
}

.input-area input[type="text"]::placeholder {
    color: rgba(148, 163, 184, 0.6);
}

/* Compact Buttons in Input */
.btn-attach,
.btn-mic {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
}

.btn-attach:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-mic {
    background: rgba(236, 72, 153, 0.2);
    color: var(--pink-accent);
}

.btn-mic:hover {
    background: rgba(236, 72, 153, 0.4);
}

.timer-select {
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 5px;
    height: 40px;
    cursor: pointer;
    outline: none;
}

.timer-select:hover {
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

/* Reply Banner */
#reply-banner {
    position: absolute;
    bottom: 85px;
    left: 20px;
    right: 20px;
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid var(--glass-border);
    border-left: 4px solid var(--blue-primary);
    padding: 12px 15px;
    border-radius: var(--radius-sm);
    display: none;
    justify-content: space-between;
    align-items: center;
    animation: slideUp 0.3s ease;
    z-index: 10;
}

#reply-banner.active {
    display: flex;
}

.reply-content {
    display: flex;
    flex-direction: column;
    font-size: 0.9rem;
    overflow: hidden;
}

.reply-to-user {
    color: var(--blue-primary);
    font-weight: bold;
    font-size: 0.8rem;
}

.reply-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* --- Features: Ghost Mode --- */
.ghost-active .message-content,
.ghost-active .file-preview {
    filter: blur(8px);
    transition: filter 0.3s ease;
    user-select: none;
    cursor: help;
}

.ghost-active .message-content:hover,
.ghost-active .file-preview:hover {
    filter: blur(0);
}

/* --- Features: Stealth Calculator --- */
#stealth-calculator {
    /* Fixed Positioning handled by JS, but adding bg ensures cover */
    background: #202124;
}

.calc-body {
    background: #303134;
    padding: 24px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    width: 320px;
}

.calc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.btn-calc {
    background: #3c4043;
    color: #e8eaed;
    border: none;
    padding: 20px 0;
    font-size: 1.25rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.1s;
}

.btn-calc:hover {
    background: #5f6368;
}

.btn-calc.op {
    background: #dadce0;
    color: #202124;
}

.btn-calc.op:hover {
    background: #e8eaed;
}

.btn-calc[data-input="="] {
    background: #4285f4;
    color: white;
}

/* --- Features: Video Call --- */
#video-call-overlay {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
}

#video-call-overlay[style*="display: flex"] {
    display: flex !important;
}

#remote-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#local-video {
    position: absolute;
    bottom: 120px;
    right: 20px;
    width: 120px;
    height: 160px;
    background: #222;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    object-fit: cover;
    z-index: 2001;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
}

.call-controls {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    z-index: 2002;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 12px 24px;
    border-radius: var(--radius-pill);
}

/* --- Features: Toast Notifications --- */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    min-width: 250px;
    border-left: 4px solid var(--blue-primary);
    animation: slideInRight 0.3s ease forwards;
}

.toast.error {
    border-left-color: var(--red-danger);
}

.toast.success {
    border-left-color: var(--green-success);
}

.toast.fadeOut {
    animation: fadeOutRight 0.3s ease forwards;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOutRight {
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* --- Theme: Hacker Mode (Matrix) --- */
body.hacker-theme {
    --bg-color: #000;
    --text-primary: #0f0;
    --text-secondary: rgba(0, 255, 0, 0.7);
    --glass-bg: #000;
    --glass-border: #0f0;
    --blue-primary: #0f0;
    --cyan-accent: #0f0;

    font-family: 'Courier New', monospace;
}

body.hacker-theme * {
    border-radius: 0 !important;
}

body.hacker-theme .message.sent {
    background: #001100;
    border: 1px solid #0f0;
    color: #0f0;
}

body.hacker-theme .message::after {
    display: none;
}

body.hacker-theme .blob {
    display: none;
}

/* --- Steganography Tool --- */
.steg-tabs {
    display: flex;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.steg-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 10px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.steg-tab.active {
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
}

.steg-panel {
    display: none;
}

.steg-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.drop-zone {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.05);
}

.drop-zone:hover {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.1);
}

body.hacker-theme .glass-card,
body.hacker-theme .input-area,
body.hacker-theme .messages,
body.hacker-theme input {
    background: #000;
    border-color: #0f0;
}

/* --- Modals (Generic) --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 5000;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal-overlay[style*="display: flex"] {
    /* Override inline style from JS */
    display: flex !important;
    opacity: 1;
}

.modal-content {
    background: var(--bg-color);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    max-height: 85vh;
    overflow-y: auto;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    .google-logo {
        font-size: 3.5rem;
    }

    .chat-container {
        height: 100dvh;
        max-width: 100%;
        border: none;
    }

    .chat-header {
        padding: 0.8rem 1rem;
    }

    .messages {
        padding: 1rem;
    }

    .message {
        max-width: 90%;
        padding: 10px 14px;
        font-size: 0.95rem;
    }

    .input-area {
        margin: 10px;
        padding: 5px 8px;
        border-radius: 25px;
        flex-wrap: nowrap;
        /* Keep on one line */
    }

    /* Mobile Compact Input */
    .input-area input[type="text"] {
        font-size: 0.95rem;
        padding: 8px;
        min-width: 0;
    }

    .btn-attach,
    .btn-mic {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .timer-select {
        width: 36px;
        height: 36px;
        padding: 0;
        justify-content: center;
        text-align-last: center;
    }

    /* Send button modification for mobile */
    #send-btn {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        padding: 0;
        font-size: 0;
        /* Hide 'Send' text */
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 36px;
        background: var(--blue-primary);
    }

    #send-btn::after {
        content: '➤';
        font-size: 1.2rem;
        margin-left: 3px;
        color: white;
    }

    .footer-row {
        justify-content: center;
        gap: 10px;
    }

    .footer-links {
        justify-content: center;
        font-size: 0.8rem;
    }
}

/* Fix for modals that use .active class instead of inline style */
.modal-overlay.active {
    display: flex !important;
    opacity: 1;
    pointer-events: all;
}

/* --- Protocol: Matrix (Visual Polish) --- */

/* 1. Self-Destruct Burn Effect */
.message.burn-out {
    animation: burnEffect 0.6s forwards ease-in-out !important;
}

@keyframes burnEffect {
    0% {
        opacity: 1;
        transform: scale(1);
        filter: contrast(1) brightness(1) blur(0);
    }

    30% {
        transform: scale(1.05);
        filter: contrast(1.5) brightness(1.5) blur(2px) hue-rotate(-20deg);
        background: #ef4444;
        /* Turn red/orange */
    }

    100% {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
        filter: contrast(2) brightness(3) blur(10px) grayscale(1);
    }
}

/* 2. Hacker Scramble Text */
.scramble-text {
    display: inline-block;
    font-family: 'Courier New', monospace;
    /* Monospace for alignment */
    color: var(--cyan-accent);
}

/* --- Protocol: Header Redesign (Kebab Menu) --- */
.kebab-menu-container {
    position: relative;
    z-index: 100;
}

.kebab-btn {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 5px;
    /* Adjust vertical alignment of dots */
}

.header-dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    min-width: 200px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 8px;
    display: none;
    flex-direction: column;
    gap: 5px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.2s ease;
}

.header-dropdown.show {
    display: flex;
}

.dropdown-item {
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 10px 15px;
    text-align: left;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
    font-size: 0.95rem;
    width: 100%;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.dropdown-item span {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 4px 0;
}