Files
KrisHD_AI/public/style.css
T

494 lines
11 KiB
CSS

:root {
--bg-dark: #050513;
--bg-panel: #13132a;
--bg-message-user: #2563eb;
--bg-message-bot: #1f2937;
--accent: #6366f1;
--accent-hover: #7c3aed;
--text-primary: #e5e7eb;
--text-secondary: #9ca3af;
--text-muted: #6b7280;
--border: #2f3342;
--error: #ef4444;
--success: #22c55e;
--shadow: rgba(0, 0, 0, 0.35);
--gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}
html, body {
height: 100%;
min-height: 0;
}
* {
box-sizing: border-box;
}
body {
font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
background: radial-gradient(circle at 20% 20%, rgba(99,102,241,0.12), transparent 25%),
radial-gradient(circle at 80% 0%, rgba(139,92,246,0.12), transparent 25%),
linear-gradient(135deg, #0b0b1d 0%, #0f1124 40%, #0b1020 100%);
color: var(--text-primary);
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
overflow: hidden;
margin: 0;
padding: 24px;
min-height: 0;
}
.app-shell {
width: 100%;
display: flex;
gap: 20px;
align-items: stretch;
justify-content: center;
}
.card {
background: rgba(19, 19, 42, 0.92);
backdrop-filter: blur(20px);
border: 1px solid rgba(255, 255, 255, 0.06);
border-radius: 24px;
box-shadow: 0 25px 60px -12px var(--shadow), 0 0 0 1px rgba(255, 255, 255, 0.04);
transition: all 0.3s ease;
position: relative;
overflow: hidden;
min-height: 0;
}
.card::before {
content: '';
position: absolute;
inset: 0;
background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(139,92,246,0.05));
opacity: 0.5;
pointer-events: none;
}
#auth {
padding: 36px;
width: 520px;
max-width: 95vw;
display: grid;
gap: 18px;
}
#auth:hover {
transform: translateY(-4px);
box-shadow: 0 35px 60px -12px var(--shadow), 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.brand {
display: grid;
grid-template-columns: auto 1fr;
gap: 16px;
align-items: center;
}
.logo {
width: 52px;
height: 52px;
border-radius: 16px;
background: var(--gradient);
display: grid;
place-items: center;
color: white;
font-weight: 800;
letter-spacing: 1px;
box-shadow: 0 10px 25px rgba(99, 102, 241, 0.35);
}
.eyebrow {
text-transform: uppercase;
letter-spacing: 0.12em;
font-size: 11px;
color: var(--text-secondary);
margin: 0;
}
.subtitle {
margin: 6px 0 0;
color: var(--text-muted);
line-height: 1.5;
}
h1 {
margin: 4px 0 2px;
color: var(--text-primary);
font-size: 1.9rem;
font-weight: 800;
letter-spacing: -0.02em;
}
.auth-toggle {
background: rgba(255,255,255,0.02);
border: 1px solid rgba(255,255,255,0.07);
border-radius: 14px;
padding: 6px;
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 8px;
}
.toggle {
background: transparent;
border: none;
color: var(--text-secondary);
padding: 12px 14px;
border-radius: 10px;
font-weight: 700;
cursor: pointer;
transition: all 0.25s ease;
}
.toggle.active {
background: var(--gradient);
color: white;
box-shadow: 0 10px 20px rgba(99,102,241,0.25);
}
.auth-screen {
display: none;
animation: fadeIn 0.35s ease;
}
.auth-screen.active {
display: block;
}
.auth-form {
display: grid;
gap: 14px;
}
.field {
display: grid;
gap: 6px;
}
.field span {
font-size: 14px;
color: var(--text-secondary);
letter-spacing: 0.01em;
}
input, textarea {
width: 100%;
margin: 0;
padding: 14px 16px;
border: 2px solid transparent;
background: rgba(10, 10, 20, 0.85);
border-radius: 14px;
color: var(--text-primary);
outline: none;
font-size: 16px;
font-family: inherit;
transition: all 0.25s ease;
backdrop-filter: blur(10px);
resize: none;
}
input::placeholder, textarea::placeholder {
color: var(--text-muted);
}
input:focus, textarea:focus {
border-color: var(--accent);
background: rgba(10, 10, 20, 1);
transform: translateY(-1px);
box-shadow: 0 10px 24px rgba(99, 102, 241, 0.18);
}
button {
background: var(--accent);
color: white;
padding: 14px 24px;
border: none;
border-radius: 12px;
cursor: pointer;
font-weight: 700;
font-size: 15px;
transition: all 0.3s ease;
position: relative;
overflow: hidden;
}
button::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
transition: left 0.5s ease;
}
button:hover:not(:disabled) {
background: var(--accent-hover);
transform: translateY(-2px);
box-shadow: 0 10px 25px rgba(124, 58, 237, 0.3);
}
button:hover::before { left: 100%; }
button:disabled {
opacity: 0.5;
cursor: not-allowed;
transform: none;
}
.primary-action {
margin-top: 6px;
width: 100%;
}
.status {
margin: 4px 0 0;
font-size: 14px;
text-align: center;
min-height: 24px;
padding: 10px;
border-radius: 10px;
transition: all 0.3s ease;
background: rgba(255,255,255,0.02);
border: 1px dashed rgba(255,255,255,0.05);
color: var(--text-secondary);
}
.status.error {
color: var(--error);
background: rgba(239, 68, 68, 0.1);
border: 1px solid rgba(239, 68, 68, 0.2);
}
.status.success {
color: var(--success);
background: rgba(34, 197, 94, 0.12);
border: 1px solid rgba(34, 197, 94, 0.2);
}
#chat {
display: grid;
grid-template-rows: 1fr auto auto;
row-gap: 15px;
height: 90vh;
width: 90%;
max-width: 1100px;
padding: 24px;
background: rgba(19,19,42,0.92);
border-radius: 24px;
box-shadow: 0 25px 50px -12px var(--shadow);
min-height: 0;
}
#messages {
grid-row: 1;
overflow-y: auto;
display: flex;
flex-direction: column;
gap: 16px;
padding: 20px;
margin: 0;
background: rgba(10,10,20,0.6);
border: 1px solid rgba(255,255,255,0.05);
border-radius: 20px;
backdrop-filter: blur(10px);
scroll-behavior: smooth;
min-height: 0;
}
.input-container {
grid-row: 2;
display: flex;
align-items: flex-end;
gap: 12px;
flex-shrink: 0;
min-height: 70px;
}
.logout-container {
grid-row: 3;
text-align: center;
margin-top: 10px;
}
#messages::-webkit-scrollbar { width: 8px; }
#messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
#messages::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
#chat h1 {
flex-shrink: 0;
margin-bottom: 20px;
display: flex;
align-items: center;
justify-content: center;
}
.msg {
padding: 16px 20px;
border-radius: 18px;
line-height: 1.5;
max-width: 80%;
word-wrap: break-word;
overflow-wrap: break-word;
animation: fadeIn 0.3s ease;
position: relative;
white-space: pre-wrap;
margin: 0;
flex-shrink: 0;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}
.msg.user {
background: var(--bg-message-user);
color: white;
align-self: flex-end;
border-bottom-right-radius: 4px;
box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}
.msg.bot {
background: var(--bg-message-bot);
color: var(--text-primary);
align-self: flex-start;
border-bottom-left-radius: 4px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.msg.loading {
background: var(--bg-message-bot);
color: var(--text-primary);
align-self: flex-start;
border-bottom-left-radius: 4px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
padding: 10px 14px;
max-width: fit-content;
display: flex;
align-items: center;
justify-content: center;
}
.typing-indicator { display: flex; align-items: center; gap: 6px; height: 16px; }
.typing-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-secondary); animation: typingAnimation 1.2s infinite ease-in-out; }
.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes typingAnimation {
0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
40% { transform: scale(1); opacity: 1; }
}
#msgInput {
flex: 1;
margin: 0;
border-radius: 20px;
padding: 16px 24px;
min-height: 56px;
max-height: 120px;
overflow-y: auto;
}
#send {
background: var(--accent);
border-radius: 50%;
width: 56px;
height: 56px;
display: flex;
align-items: center;
justify-content: center;
padding: 0;
font-size: 18px;
flex-shrink: 0;
}
#send::after { content: "➤"; font-weight: bold; }
#send.loading::after { content: ''; }
#send.loading { animation: spin 1s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
#logout { background: linear-gradient(135deg, #6b7280, #4b5563); border-radius: 12px; }
.auth-buttons, .logout-container { display: flex; gap: 12px; justify-content: center; margin-top: 20px; }
.chat-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.model-select { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-secondary); }
.model-select select { background: rgba(15, 15, 35, 0.8); color: var(--text-primary); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; font-size: 14px; outline: none; transition: all 0.2s ease; }
.model-select select:hover, .model-select select:focus { border-color: var(--accent); background: rgba(15, 15, 35, 1); }
@media (max-width: 1100px) {
.app-shell { flex-direction: column; align-items: center; }
#chat { width: 95vw; height: 80vh; }
}
@media (max-width: 768px) {
body { padding: 16px; }
#chat { width: 95vw; height: 85vh; padding: 16px; }
#auth { width: 95vw; padding: 28px; }
h1 { font-size: 1.6rem; }
}
@media (max-width: 480px) {
.brand { grid-template-columns: 1fr; }
.logo { width: 48px; height: 48px; }
#chat { padding: 12px; }
#messages { padding: 14px; }
}
.consent-container {
display: flex;
align-items: center;
gap: 8px;
margin: 10px 0;
font-size: 0.8rem;
color: #aaa;
}
.consent-container input[type="checkbox"] {
width: 16px;
height: 16px;
cursor: pointer;
}
.consent-container label {
line-height: 1.3;
}
.consent-container a {
color: #7b87ff;
text-decoration: none;
}
.consent-container a:hover {
text-decoration: underline;
}
/* ===== Legal / Static Pages Fix ===== */
html, body {
width: 100%;
max-width: 100%;
overflow-x: hidden;
}
/* Force text to stay inside viewport */
.content {
width: 100%;
max-width: 100%;
padding: 1.5rem;
box-sizing: border-box;
}
/* Prevent long words / links from breaking layout */
.content * {
overflow-wrap: break-word;
word-break: break-word;
}