:root {
    --matrix-green: #00ff00;
    --background: #000000;
    --highlight-green: #00cc00;
    --red-pill: #ff0000;
    --blue-pill: #0000ff;
    --text-shadow: 0 0 10px var(--matrix-green);
}

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Orbitron', 'Courier New', monospace;
    background-color: var(--background);
    color: var(--matrix-green);
    overflow: hidden;
}

.landing-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    position: relative;
}

.content {
    text-align: center;
    z-index: 10;
    position: relative;
    max-width: 900px;
    padding: 40px;
    backdrop-filter: blur(2px);
    background: rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(0, 255, 0, 0.1);
    box-shadow: 
        0 0 50px rgba(0, 255, 0, 0.1),
        inset 0 0 50px rgba(0, 255, 0, 0.05);
}

.content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    padding: 2px;
    background: linear-gradient(45deg, 
        rgba(0, 255, 0, 0.2), 
        rgba(0, 255, 0, 0.05), 
        rgba(0, 255, 0, 0.2));
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: subtract;
    pointer-events: none;
    animation: border-flow 6s linear infinite;
}

@keyframes border-flow {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

#main-question {
    font-size: clamp(2.5rem, 8vw, 5rem);
    margin-bottom: 60px;
    text-shadow: 
        0 0 20px var(--matrix-green),
        0 0 40px var(--matrix-green),
        0 0 60px var(--matrix-green);
    animation: questionPulse 4s ease-in-out infinite;
    letter-spacing: 3px;
    font-weight: 300;
    position: relative;
    z-index: 10;
}

#main-question::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: rgba(0, 255, 0, 0.3);
    animation: glitch 2s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
}

#main-question::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: rgba(0, 255, 0, 0.3);
    animation: glitch 2s infinite reverse;
    clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
}

@keyframes questionPulse {
    0%, 100% { 
        text-shadow: 
            0 0 20px var(--matrix-green),
            0 0 40px var(--matrix-green),
            0 0 60px var(--matrix-green);
        transform: scale(1);
    }
    50% { 
        text-shadow: 
            0 0 30px var(--matrix-green),
            0 0 60px var(--matrix-green),
            0 0 90px var(--matrix-green);
        transform: scale(1.02);
    }
}

@keyframes glitch {
    0%, 90%, 100% {
        transform: translate(0);
    }
    20% {
        transform: translate(-2px, 2px);
    }
    40% {
        transform: translate(-2px, -2px);
    }
    60% {
        transform: translate(2px, 2px);
    }
    80% {
        transform: translate(2px, -2px);
    }
}

.chat-body {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background-color: #000000;
    color: #00ff00;
    font-family: 'Orbitron', monospace;
}

#matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.4;
    filter: blur(0.5px) brightness(1.2);
}

/* Floating particles */
.particle-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--matrix-green);
    border-radius: 50%;
    animation: float 20s linear infinite;
    opacity: 0.6;
}

.particle:nth-child(odd) {
    animation-duration: 25s;
    background: rgba(0, 255, 0, 0.4);
}

.particle:nth-child(3n) {
    animation-duration: 30s;
    background: rgba(0, 255, 0, 0.2);
    width: 1px;
    height: 1px;
}

@keyframes float {
    0% {
        transform: translateY(100vh) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100px) translateX(100px) rotate(360deg);
        opacity: 0;
    }
}

/* Atmospheric glow effect */
.content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 255, 0, 0.03) 0%, transparent 70%);
    animation: pulse-glow 8s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes pulse-glow {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.6;
    }
}

.chat-container {
    width: 95%;
    max-width: 900px;
    height: calc(100vh - 140px);
    margin: 20px auto 120px;
    padding: 0;
    background: linear-gradient(145deg, 
        rgba(0, 8, 0, 0.98), 
        rgba(0, 20, 0, 0.95),
        rgba(0, 8, 0, 0.98));
    border: 1px solid rgba(0, 255, 0, 0.4);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(20px);
    box-sizing: border-box;
    position: relative;
    box-shadow: 
        0 0 60px rgba(0, 255, 0, 0.15),
        inset 0 1px 0 rgba(0, 255, 0, 0.1),
        0 20px 80px rgba(0, 0, 0, 0.7);
    overflow: hidden;
}

.chat-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(0, 255, 0, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 255, 0, 0.02) 0%, transparent 50%);
    border-radius: 24px;
    z-index: -1;
    opacity: 0.6;
    animation: ambient-glow 12s ease-in-out infinite alternate;
}

.chat-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(0, 255, 0, 0.6) 20%,
        rgba(0, 255, 0, 0.8) 50%, 
        rgba(0, 255, 0, 0.6) 80%, 
        transparent 100%);
    z-index: 1;
}

@keyframes ambient-glow {
    0% { 
        opacity: 0.4;
        transform: scale(1);
    }
    50% { 
        opacity: 0.8;
        transform: scale(1.002);
    }
    100% { 
        opacity: 0.6;
        transform: scale(1);
    }
}

#chat-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 32px 32px 24px;
    scroll-behavior: smooth;
    max-height: calc(100vh - 240px);
    position: relative;
    margin-bottom: 8px;
    background: linear-gradient(180deg, 
        rgba(0, 0, 0, 0.1) 0%, 
        transparent 3%, 
        transparent 97%, 
        rgba(0, 0, 0, 0.1) 100%);
}

#chat-messages::before {
    content: '';
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent);
    pointer-events: none;
    z-index: 10;
}

#chat-messages::after {
    content: '';
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.8), transparent);
    pointer-events: none;
    z-index: 10;
}

#chat-messages::-webkit-scrollbar {
    width: 8px;
}

#chat-messages::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

#chat-messages::-webkit-scrollbar-thumb {
    background: var(--matrix-green);
    border-radius: 4px;
}

.message {
    display: flex;
    align-items: flex-start;
    margin: 24px 0;
    padding: 24px 28px;
    border-radius: 20px;
    max-width: 88%;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    opacity: 1;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(15px);
    gap: 16px;
    border: 1px solid transparent;
}

.message::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border-radius: 21px;
    background: linear-gradient(135deg, 
        rgba(0, 255, 0, 0.2) 0%, 
        transparent 30%,
        transparent 70%,
        rgba(0, 255, 0, 0.2) 100%);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.message:hover::before {
    opacity: 0.6;
}

.message:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 255, 0, 0.3);
}

.user-message {
    margin-left: auto;
    background: linear-gradient(135deg, 
        rgba(0, 255, 0, 0.12), 
        rgba(0, 180, 0, 0.08),
        rgba(0, 255, 0, 0.1));
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(0, 255, 0, 0.2);
    animation: user-message-appear 0.5s ease-out forwards;
}

.morpheus-message {
    margin-right: auto;
    background: linear-gradient(135deg, 
        rgba(0, 15, 0, 0.9), 
        rgba(5, 25, 5, 0.85),
        rgba(0, 20, 0, 0.9));
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 0 20px rgba(0, 255, 0, 0.05);
    animation: morpheus-message-appear 0.6s ease-out forwards;
}

.message-content {
    flex: 1;
    color: rgba(0, 255, 0, 0.95);
    font-size: 1rem;
    line-height: 1.6;
    font-weight: 400;
    letter-spacing: 0.3px;
}

.user-message .message-content {
    color: rgba(0, 255, 0, 1);
    font-weight: 500;
}

.morpheus-message .message-content {
    color: rgba(0, 255, 0, 0.9);
    text-shadow: 0 0 8px rgba(0, 255, 0, 0.3);
}

@keyframes user-message-appear {
    0% {
        opacity: 0;
        transform: translateX(100px) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes morpheus-message-appear {
    0% {
        opacity: 0;
        transform: translateX(-100px) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.input-container {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 32px 24px;
    background: linear-gradient(145deg, 
        rgba(0, 5, 0, 0.98), 
        rgba(0, 15, 0, 0.96),
        rgba(0, 8, 0, 0.98));
    border-top: 1px solid rgba(0, 255, 0, 0.2);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    backdrop-filter: blur(25px);
    box-shadow: 
        0 -8px 40px rgba(0, 0, 0, 0.8),
        inset 0 1px 0 rgba(0, 255, 0, 0.1),
        0 0 60px rgba(0, 255, 0, 0.08);
    min-height: 80px;
    box-sizing: border-box;
}

.input-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(0, 255, 0, 0.3) 25%,
        rgba(0, 255, 0, 0.5) 50%,
        rgba(0, 255, 0, 0.3) 75%, 
        transparent 100%);
    z-index: -1;
    animation: input-border-flow 4s ease-in-out infinite;
}

@keyframes input-border-flow {
    0% { 
        opacity: 0.3;
        transform: scaleX(0.8);
    }
    50% { 
        opacity: 0.7;
        transform: scaleX(1);
    }
    100% { 
        opacity: 0.3;
        transform: scaleX(0.8);
    }
}

.button-tooltip {
    position: absolute;
    background: rgba(0, 255, 0, 0.9);
    color: black;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-family: 'Orbitron', monospace;
    font-weight: bold;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0, 255, 0, 0.3);
    border: 1px solid rgba(0, 255, 0, 0.5);
}

.input-button:hover .button-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(-10px);
}

.input-button {
    position: relative;
    min-width: 48px;
    height: 48px;
    background: linear-gradient(145deg, 
        rgba(0, 255, 0, 0.15), 
        rgba(0, 200, 0, 0.08),
        rgba(0, 255, 0, 0.12));
    border: 1px solid rgba(0, 255, 0, 0.4);
    border-radius: 12px;
    color: var(--matrix-green);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    backdrop-filter: blur(12px);
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(0, 255, 0, 0.1);
}

.input-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(0, 255, 0, 0.2), 
        transparent 50%,
        rgba(0, 255, 0, 0.1));
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.input-button:hover::before {
    opacity: 1;
}

.input-button:hover {
    background: linear-gradient(145deg, 
        rgba(0, 255, 0, 0.25), 
        rgba(0, 220, 0, 0.18),
        rgba(0, 255, 0, 0.22));
    border-color: rgba(0, 255, 0, 0.6);
    transform: translateY(-2px);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(0, 255, 0, 0.2);
}

.input-button:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.input-button i {
    font-size: 1.2em;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 0 4px rgba(0, 255, 0, 0.3));
}

#user-input {
    flex: 1;
    padding: 14px 20px;
    background: linear-gradient(145deg, 
        rgba(0, 0, 0, 0.95), 
        rgba(0, 10, 0, 0.92),
        rgba(0, 5, 0, 0.94));
    border: 1px solid rgba(0, 255, 0, 0.3);
    border-radius: 16px;
    color: var(--matrix-green);
    font-family: 'Orbitron', monospace;
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.5;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    backdrop-filter: blur(12px);
    box-shadow: 
        inset 0 1px 8px rgba(0, 0, 0, 0.6),
        0 0 0 0 rgba(0, 255, 0, 0);
    min-height: 20px;
    letter-spacing: 0.3px;
}

#user-input::placeholder {
    color: rgba(0, 255, 0, 0.4);
    font-style: italic;
    font-weight: 300;
}

#user-input:focus {
    outline: none;
    border-color: rgba(0, 255, 0, 0.5);
    box-shadow: 
        0 0 0 2px rgba(0, 255, 0, 0.15),
        inset 0 1px 8px rgba(0, 0, 0, 0.6),
        0 0 20px rgba(0, 255, 0, 0.1);
    background: linear-gradient(145deg, 
        rgba(0, 0, 0, 0.98), 
        rgba(0, 12, 0, 0.96),
        rgba(0, 8, 0, 0.97));
    transform: translateY(-1px);
}

#user-input:focus::placeholder {
    color: rgba(0, 255, 0, 0.25);
}

#send-button, #voice-input-button {
    padding: 15px 25px;
    background-color: rgba(0, 255, 0, 0.1);
    border: 1px solid #00ff00;
    border-radius: 5px;
    color: #00ff00;
    cursor: pointer;
    transition: all 0.3s ease;
}

#send-button:hover, #voice-input-button:hover {
    background-color: #00ff00;
    color: #000;
}

.audio-response {
    display: block;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 255, 0, 0.2);
}

.audio-controls {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 255, 0, 0.2);
}

.play-audio-button {
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid var(--matrix-green);
    color: var(--matrix-green);
    cursor: pointer;
    font-size: 0.9em;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
    font-family: 'Orbitron', monospace;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    justify-content: center;
}

.play-audio-button:hover:not(:disabled) {
    background: var(--matrix-green);
    color: black;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 255, 0, 0.3);
}

.play-audio-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.play-audio-button i {
    font-size: 1em;
}

#typing-indicator {
    color: var(--matrix-green);
    font-style: italic;
    margin: 15px 40px 20px;
    padding: 12px 20px;
    background: linear-gradient(145deg, 
        rgba(0, 255, 0, 0.15), 
        rgba(0, 200, 0, 0.1));
    border: 1px solid rgba(0, 255, 0, 0.3);
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
    animation: typing-glow 2s ease-in-out infinite;
    font-family: 'Orbitron', monospace;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    max-width: 200px;
}

#typing-indicator::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--matrix-green);
    border-radius: 50%;
    animation: typing-dot1 1.5s infinite;
    margin-right: 5px;
}

#typing-indicator::after {
    content: '••';
    display: inline-block;
    animation: typing-dots 1.5s infinite;
    color: var(--matrix-green);
}

@keyframes typing-glow {
    0%, 100% { 
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3),
                   0 0 20px rgba(0, 255, 0, 0.2);
    }
    50% { 
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4),
                   0 0 40px rgba(0, 255, 0, 0.4);
    }
}

@keyframes typing-dot1 {
    0%, 60%, 100% { transform: scale(1); opacity: 1; }
    30% { transform: scale(1.5); opacity: 0.7; }
}

@keyframes typing-dots {
    0%, 60%, 100% { opacity: 0.3; }
    30% { opacity: 1; }
}

.wake-up-button {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: var(--red-pill);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 15px var(--red-pill);
    z-index: 200;
}

.wake-up-button:hover {
    background-color: #ff3333;
    transform: scale(1.05);
}

.memory-button {
    position: fixed;
    bottom: 110px;
    right: 20px;
    background-color: var(--matrix-green);
    color: var(--background);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.3em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 12px var(--matrix-green);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 250;
}

.memory-button:hover {
    background-color: var(--highlight-green);
    transform: scale(1.1) rotate(360deg);
}

.settings-button {
    position: fixed;
    top: 70px;
    right: 20px;
    background-color: transparent;
    border: none;
    color: var(--matrix-green);
    font-size: 1.5em;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
}

.settings-button:hover {
    color: var(--highlight-green);
    transform: scale(1.1);
}

.settings-panel {
    position: fixed;
    top: 60px;
    right: 20px;
    background: linear-gradient(145deg, rgba(0, 20, 0, 0.95), rgba(0, 8, 0, 0.98));
    border: 1px solid rgba(0, 255, 0, 0.4);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(20px);
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.2);
    z-index: 1000;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.settings-panel.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.settings-panel h3 {
    margin: 0 0 15px 0;
    color: var(--matrix-green);
    font-size: 1.1rem;
    text-align: center;
    border-bottom: 1px solid rgba(0, 255, 0, 0.3);
    padding-bottom: 10px;
}

.settings-panel label {
    display: block;
    margin-bottom: 10px;
    color: var(--matrix-green);
    font-size: 0.9rem;
    cursor: pointer;
}

.settings-panel input[type="checkbox"] {
    margin-right: 5px;
}

/* Button tooltip styling */
.input-button {
    position: relative;
}

.button-tooltip {
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.9);
    color: var(--matrix-green);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 1000;
    pointer-events: none;
    border: 1px solid rgba(0, 255, 0, 0.3);
    font-family: 'Orbitron', monospace;
}

.input-button:hover .button-tooltip {
    opacity: 1;
    visibility: visible;
}

@keyframes talking {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.talking {
    animation: talking 0.5s infinite;
}

.hidden {
    display: none;
}

/* Memory Modal Styles */
.memory-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

/* Daily Usage Counter Styles */
.daily-usage-counter {
    width: 95%;
    max-width: 900px;
    margin: 10px auto 20px;
    padding: 15px 20px;
    background: linear-gradient(145deg, 
        rgba(0, 5, 0, 0.95), 
        rgba(0, 15, 0, 0.92));
    border: 1px solid rgba(0, 255, 0, 0.3);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    font-family: 'Orbitron', monospace;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.usage-text {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.usage-label {
    color: rgba(0, 255, 0, 0.8);
    font-size: 0.9rem;
    font-weight: 500;
}

.usage-count {
    color: var(--matrix-green);
    font-size: 1rem;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.3);
}

.usage-count.usage-warning {
    color: #ff9900;
    text-shadow: 0 0 5px rgba(255, 153, 0, 0.3);
}

.usage-remaining {
    color: rgba(0, 255, 0, 0.6);
    font-size: 0.8rem;
    font-style: italic;
}

.usage-bar {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid rgba(0, 255, 0, 0.2);
}

.usage-progress {
    height: 100%;
    background: linear-gradient(90deg, 
        var(--matrix-green) 0%, 
        #00cc00 50%,
        #ffaa00 85%,
        #ff6600  100%);
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

/* Daily Limit Message Styles */
.daily-limit-message {
    color: #ffcc00 !important;
    font-weight: bold !important;
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.5) !important;
    border-left: 4px solid #ffcc00;
    padding-left: 15px !important;
    background: linear-gradient(90deg, 
        rgba(255, 204, 0, 0.1), 
        transparent) !important;
}

.daily-limit-avatar {
    border: 2px solid #ffcc00 !important;
    box-shadow: 0 0 20px rgba(255, 204, 0, 0.4) !important;
}

.daily-limit-avatar::before {
    border-color: #ffcc00 !important;
    background: linear-gradient(45deg, 
        transparent, 
        rgba(255, 204, 0, 0.2), 
        transparent) !important;
}

/* Memory Modal Styles */
.memory-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.memory-modal {
    background: #0a0a0a;
    border: 2px solid var(--matrix-green);
    border-radius: 10px;
    max-width: 80%;
    max-height: 80%;
    width: 600px;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.3);
    font-family: 'Orbitron', monospace;
}

.memory-modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--matrix-green);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.memory-modal-header h3 {
    margin: 0;
    color: var(--matrix-green);
    font-size: 1.2rem;
}

.close-modal {
    background: none;
    border: none;
    color: var(--matrix-green);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    color: #fff;
    text-shadow: 0 0 10px var(--matrix-green);
}

.memory-modal-content {
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.memory-item {
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(0, 255, 0, 0.05);
    border-left: 3px solid var(--matrix-green);
    color: #ccc;
    line-height: 1.4;
}

.memory-item strong {
    color: var(--matrix-green);
}

/* Animation for typing effect */
@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

/* Memory Modal Styles */
.memory-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.memory-modal {
    animation: fadeIn 0.3s ease-in-out;
}

.memory-modal > div {
    animation: slideIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-30px) scale(0.9);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Memory modal scrollbar styling */
.memory-modal div::-webkit-scrollbar {
    width: 8px;
}

.memory-modal div::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.memory-modal div::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 0, 0.3);
    border-radius: 4px;
}

.memory-modal div::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 0, 0.5);
}

@media (max-width: 768px) {
    .chat-container {
        width: 95%;
        margin: 10px auto 130px;
        height: calc(100vh - 140px);
    }

    #chat-messages {
        padding: 20px 20px 15px;
    }

    .message {
        max-width: 90%;
        padding: 15px 20px;
        margin: 15px 0;
    }

    .avatar {
        width: 40px;
        height: 40px;
    }

    .input-container {
        padding: 20px 20px;
        gap: 12px;
    }

    #user-input {
        padding: 12px 20px;
        font-size: 0.95rem;
    }

    .input-button {
        min-width: 45px;
        height: 45px;
    }

    .wake-up-button {
        top: 10px;
        right: 10px;
        font-size: 0.9rem;
        padding: 10px 20px;
    }

    .memory-button {
        bottom: 100px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 1.2em;
    }

    .settings-panel {
        right: 10px;
        padding: 15px;
        top: 50px;
    }

    #typing-indicator {
        margin: 10px 20px 15px;
        padding: 10px 15px;
        font-size: 0.85rem;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background-color: var(--matrix-green);
    border-radius: 20px;
    border: 3px solid var(--background);
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus styles for better accessibility */
a:focus, button:focus, input:focus {
    outline: 2px solid var(--highlight-green);
    outline-offset: 2px;
}

/* Usage counter styling */
.usage-counter {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(145deg, rgba(255, 69, 0, 0.9), rgba(255, 0, 0, 0.8));
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-family: 'Orbitron', monospace;
    font-size: 0.9rem;
    font-weight: bold;
    z-index: 1002;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    animation: pulse-warning 2s infinite;
}

.usage-counter.admin-mode {
    background: linear-gradient(145deg, rgba(0, 255, 0, 0.9), rgba(0, 200, 0, 0.8));
    color: black;
    animation: pulse-admin 3s infinite;
    box-shadow: 0 4px 15px rgba(0, 255, 0, 0.4);
}

@keyframes pulse-warning {
    0%, 100% { 
        opacity: 0.8; 
        transform: translateX(-50%) scale(1);
    }
    50% { 
        opacity: 1; 
        transform: translateX(-50%) scale(1.02);
    }
}

@keyframes pulse-admin {
    0%, 100% { 
        opacity: 0.9; 
        transform: translateX(-50%) scale(1);
        box-shadow: 0 4px 15px rgba(0, 255, 0, 0.4);
    }
    50% { 
        opacity: 1; 
        transform: translateX(-50%) scale(1.01);
        box-shadow: 0 4px 20px rgba(0, 255, 0, 0.6);
    }
}

/* Loading animation for audio playback */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

.avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid rgba(0, 255, 0, 0.4);
    background: linear-gradient(135deg, 
        rgba(0, 255, 0, 0.2), 
        rgba(0, 200, 0, 0.1),
        rgba(0, 255, 0, 0.15));
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    box-shadow: 
        0 0 16px rgba(0, 255, 0, 0.2),
        inset 0 0 12px rgba(0, 255, 0, 0.08);
    filter: brightness(1.1) contrast(1.05);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    color: var(--matrix-green);
    text-shadow: 0 0 8px rgba(0, 255, 0, 0.5);
    backdrop-filter: blur(8px);
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.avatar.user-avatar {
    border-color: rgba(0, 255, 0, 0.6);
    box-shadow: 
        0 0 20px rgba(0, 255, 0, 0.3),
        inset 0 0 15px rgba(0, 255, 0, 0.1);
}

.avatar.morpheus-avatar {
    border-color: rgba(0, 255, 0, 0.8);
    box-shadow: 
        0 0 25px rgba(0, 255, 0, 0.4),
        inset 0 0 20px rgba(0, 255, 0, 0.15);
}

.avatar::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border: 1px solid rgba(0, 255, 0, 0.2);
    border-radius: 50%;
    opacity: 0;
    transition: all 0.3s ease;
    animation: avatar-pulse 3s ease-in-out infinite;
}

.avatar:hover::before {
    opacity: 0.8;
}

@keyframes avatar-pulse {
    0%, 100% { 
        transform: scale(1); 
        opacity: 0.3; 
    }
    50% { 
        transform: scale(1.1); 
        opacity: 0.7; 
    }
}

.avatar.talking {
    animation: talking-pulse 0.8s ease-in-out infinite;
    box-shadow: 
        0 0 40px rgba(0, 255, 0, 0.6),
        inset 0 0 20px rgba(0, 255, 0, 0.2);
    filter: brightness(1.3) contrast(1.2) saturate(1.2);
}

.avatar.talking::before {
    opacity: 1;
    animation: talking-ring 1.2s ease-out infinite, avatar-rotation 4s linear infinite;
}

.avatar.talking::after {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 1px solid rgba(0, 255, 0, 0.4);
    border-radius: 50%;
    animation: talking-ring-outer 1.8s ease-out infinite;
}

@keyframes avatar-rotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes talking-pulse {
    0% { 
        transform: scale(1); 
        box-shadow: 
            0 0 40px rgba(0, 255, 0, 0.6),
            inset 0 0 20px rgba(0, 255, 0, 0.2);
    }
    50% { 
        transform: scale(1.05); 
        box-shadow: 
            0 0 60px rgba(0, 255, 0, 0.8),
            inset 0 0 30px rgba(0, 255, 0, 0.3);
    }
    100% { 
        transform: scale(1); 
        box-shadow: 
            0 0 40px rgba(0, 255, 0, 0.6),
            inset 0 0 20px rgba(0, 255, 0, 0.2);
    }
}

@keyframes talking-ring {
    0% { transform: scale(1) rotate(0deg); opacity: 0.8; }
    50% { transform: scale(1.2) rotate(180deg); opacity: 0.4; }
    100% { transform: scale(1.4) rotate(360deg); opacity: 0; }
}

@keyframes talking-ring-outer {
    0% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.3); opacity: 0.3; }
    100% { transform: scale(1.6); opacity: 0; }
}

.pill-container {
    display: flex;
    gap: 60px;
    justify-content: center;
    align-items: center;
    margin-top: 50px;
    perspective: 1000px;
}

.pill-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.pill-option::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100px;
    background: linear-gradient(0deg, transparent, var(--matrix-green), transparent);
    opacity: 0;
    animation: pillGlow 3s ease-in-out infinite;
}

.pill-option:nth-child(1)::before {
    background: linear-gradient(0deg, transparent, var(--red-pill), transparent);
    animation-delay: 0s;
}

.pill-option:nth-child(2)::before {
    background: linear-gradient(0deg, transparent, var(--blue-pill), transparent);
    animation-delay: 1.5s;
}

.pill-button {
    padding: 20px 40px;
    border: 3px solid var(--matrix-green);
    border-radius: 50px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.7));
    color: var(--matrix-green);
    cursor: pointer;
    font-size: 1.4em;
    font-family: 'Orbitron', monospace;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    min-width: 220px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: bold;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    z-index: 1;
}

.pill-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease-in-out;
    z-index: 1;
}

.pill-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2), transparent);
    transform: translate(-50%, -50%);
    transition: all 0.4s ease;
    z-index: 0;
}

.pill-button:hover::before {
    left: 100%;
}

.pill-button:hover::after {
    width: 300px;
    height: 300px;
}

.pill-button.red {
    border-color: var(--red-pill);
    color: var(--red-pill);
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.1), rgba(0, 0, 0, 0.8));
    box-shadow: 
        0 0 20px rgba(255, 0, 0, 0.4),
        0 8px 32px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 0, 0, 0.2);
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.pill-button.red:hover {
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.8), rgba(139, 0, 0, 0.9));
    color: white;
    transform: translateY(-8px) rotateX(10deg);
    box-shadow: 
        0 0 40px rgba(255, 0, 0, 0.8),
        0 15px 40px rgba(255, 0, 0, 0.3),
        0 20px 60px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
}

.pill-button.blue {
    border-color: var(--blue-pill);
    color: var(--blue-pill);
    background: linear-gradient(135deg, rgba(0, 0, 255, 0.1), rgba(0, 0, 0, 0.8));
    box-shadow: 
        0 0 20px rgba(0, 0, 255, 0.4),
        0 8px 32px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(0, 0, 255, 0.2);
    text-shadow: 0 0 10px rgba(0, 0, 255, 0.5);
}

.pill-button.blue:hover {
    background: linear-gradient(135deg, rgba(0, 0, 255, 0.8), rgba(0, 0, 139, 0.9));
    color: white;
    transform: translateY(-8px) rotateX(10deg);
    box-shadow: 
        0 0 40px rgba(0, 0, 255, 0.8),
        0 15px 40px rgba(0, 0, 255, 0.3),
        0 20px 60px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
}

.pill-button:active {
    transform: translateY(-2px) rotateX(5deg) scale(0.98);
    transition: all 0.1s ease;
}

.pill-option p {
    margin-top: 15px;
    font-size: 1em;
    font-style: italic;
    opacity: 0.8;
    transition: all 0.3s ease;
    text-shadow: 0 0 10px currentColor;
}

.pill-option:hover p {
    opacity: 1;
    transform: translateY(-2px);
    text-shadow: 0 0 15px currentColor;
}

@keyframes pillGlow {
    0%, 100% { 
        opacity: 0; 
        transform: translateX(-50%) scaleY(0);
    }
    50% { 
        opacity: 0.7; 
        transform: translateX(-50%) scaleY(1);
    }
}

/* Floating code fragments */
.code-fragment {
    position: absolute;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: rgba(0, 255, 0, 0.3);
    pointer-events: none;
    animation: code-float 15s linear infinite;
    white-space: nowrap;
}

@keyframes code-float {
    0% {
        transform: translateY(100vh) translateX(-50px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(-100px) translateX(50px) rotate(360deg);
        opacity: 0;
    }
}

/* Enhanced page transitions */
.landing-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    position: relative;
    background: radial-gradient(ellipse at center, rgba(0, 20, 0, 0.8) 0%, rgba(0, 0, 0, 1) 70%);
}

/* Scanline effect */
.landing-body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--matrix-green), transparent);
    animation: scanline 3s linear infinite;
    z-index: 5;
}

@keyframes scanline {
    0% {
        transform: translateY(-2px);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* Additional atmospheric elements */
.atmosphere {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    background: 
        radial-gradient(circle at 20% 30%, rgba(0, 255, 0, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 255, 0, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(0, 255, 0, 0.01) 0%, transparent 50%);
    animation: atmosphere-shift 20s ease-in-out infinite;
}

@keyframes atmosphere-shift {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.1) rotate(180deg);
    }
}

/* Holographic overlay effects */
.hologram-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    background: 
        linear-gradient(90deg, transparent 0%, rgba(0, 255, 0, 0.03) 50%, transparent 100%);
    animation: hologram-sweep 8s linear infinite;
    opacity: 0.4;
}

.scan-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
    background-image: repeating-linear-gradient(
        0deg,
        rgba(0, 255, 0, 0.05) 0px,
        rgba(0, 255, 0, 0.05) 1px,
        transparent 1px,
        transparent 2px
    );
    animation: scan-lines-move 0.1s linear infinite;
    opacity: 0.3;
}

@keyframes hologram-sweep {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes scan-lines-move {
    0% { transform: translateY(0); }
    100% { transform: translateY(2px); }
}

/* Enhanced wake up button */
.wake-up-button {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(45deg, var(--red-pill), #ff3333);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
    z-index: 1000;
    font-family: 'Orbitron', monospace;
    box-shadow: 
        0 0 20px rgba(255, 0, 0, 0.5),
        inset 0 0 15px rgba(255, 255, 255, 0.1),
        0 6px 20px rgba(255, 0, 0, 0.3);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.wake-up-button::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(-45deg);
    animation: wake-up-shine 3s linear infinite;
}

.wake-up-button:hover {
    background: linear-gradient(45deg, #ff6666, #ff0000);
    transform: scale(1.1) rotate(-2deg);
    box-shadow: 
        0 0 40px rgba(255, 0, 0, 0.8),
        0 10px 30px rgba(255, 0, 0, 0.3),
        inset 0 0 20px rgba(255, 255, 255, 0.2);
}

@keyframes wake-up-shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(-45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(-45deg); }
}