studyrag / frontend /src /styles /global.css
beerohan
Rebuild frontend in React, add doc/session management, fix broken deps
dd4a03a
Raw History Blame Contribute Delete
4.83 kB
@import './variables.css';
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html,
body,
#root {
height: 100%;
}
body {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
background: var(--bg-main);
color: var(--text-primary);
line-height: 1.6;
overflow-x: hidden;
transition: background 0.2s ease, color 0.2s ease;
}
button,
input,
textarea {
font-family: inherit;
}
.app-layout {
display: flex;
min-height: 100vh;
}
@keyframes pulse {
0%,
100% {
opacity: 1;
transform: scale(1);
}
50% {
opacity: 0.5;
transform: scale(1.1);
}
}
@keyframes slideIn {
from {
opacity: 0;
transform: translateY(10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
/* ===== BUTTONS ===== */
.btn-primary {
background: var(--gradient-primary);
color: white;
border: none;
border-radius: 12px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}
.btn-primary:hover:not(:disabled) {
transform: translateY(-2px);
box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}
.btn-primary:active:not(:disabled) {
transform: translateY(0);
}
.btn-primary:disabled {
opacity: 0.7;
cursor: not-allowed;
}
.btn-large {
padding: 1.25rem 2rem;
font-size: 1.05rem;
display: flex;
align-items: center;
justify-content: center;
gap: 0.75rem;
width: 100%;
}
.btn-arrow {
font-size: 1.5rem;
transition: transform 0.3s ease;
}
.btn-primary:hover:not(:disabled) .btn-arrow {
transform: translateX(4px);
}
/* ===== VIEW CONTAINERS ===== */
.view-container {
padding: 2.5rem;
flex: 1;
}
.view-header {
margin-bottom: 2rem;
}
.view-title {
font-size: 2rem;
font-weight: 700;
color: var(--text-primary);
margin-bottom: 0.5rem;
}
.view-description {
font-size: 1.05rem;
color: var(--text-secondary);
}
.content-card {
background: var(--bg-card);
border-radius: 16px;
padding: 2.5rem;
box-shadow: var(--shadow-md);
}
/* ===== RESULT MESSAGES ===== */
.result-message {
margin-top: 1.5rem;
padding: 1.25rem 1.5rem;
border-radius: 12px;
display: none;
animation: slideIn 0.3s ease;
}
.result-message.show {
display: block;
}
.result-message.success {
background: #f0fff4;
border: 1px solid #9ae6b4;
color: #22543d;
}
.result-message.error {
background: #fff5f5;
border: 1px solid #feb2b2;
color: #742a2a;
}
.result-message.info {
background: #ebf8ff;
border: 1px solid #90cdf4;
color: #2c5282;
}
:root[data-theme='dark'] .result-message.success {
background: rgba(72, 187, 120, 0.12);
border-color: rgba(72, 187, 120, 0.4);
color: #9ae6b4;
}
:root[data-theme='dark'] .result-message.error {
background: rgba(245, 101, 101, 0.12);
border-color: rgba(245, 101, 101, 0.4);
color: #feb2b2;
}
:root[data-theme='dark'] .result-message.info {
background: rgba(102, 126, 234, 0.12);
border-color: rgba(102, 126, 234, 0.4);
color: #90cdf4;
}
/* ===== LOADING STATE ===== */
.loading-spinner {
display: inline-block;
width: 18px;
height: 18px;
border: 3px solid rgba(255, 255, 255, 0.3);
border-top-color: white;
border-radius: 50%;
animation: spin 0.8s linear infinite;
}
.loading-spinner.dark {
border: 3px solid rgba(102, 126, 234, 0.2);
border-top-color: var(--primary);
}
/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
width: 10px;
}
::-webkit-scrollbar-track {
background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
background: var(--gradient-primary);
border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
}
/* ===== Markdown ===== */
.markdown-body {
line-height: 1.6;
}
.markdown-body p {
margin: 0 0 0.6em 0;
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
margin: 0.8em 0 0.4em;
font-weight: 600;
}
.markdown-body ul,
.markdown-body ol {
margin: 0 0 0.6em 1.4em;
}
.markdown-body code {
background: rgba(0, 0, 0, 0.06);
padding: 0.1em 0.35em;
border-radius: 4px;
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
font-size: 0.9em;
}
.markdown-body pre {
background: #1e293b;
color: #e2e8f0;
padding: 0.9em 1em;
border-radius: 8px;
overflow-x: auto;
margin: 0 0 0.8em;
}
.markdown-body pre code {
background: transparent;
color: inherit;
padding: 0;
}
.markdown-body blockquote {
border-left: 3px solid var(--primary);
padding-left: 0.8em;
color: var(--text-secondary);
margin: 0 0 0.6em;
}
:root[data-theme='dark'] .markdown-body code {
background: rgba(255, 255, 255, 0.08);
}
/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
.view-container {
padding: 1.5rem;
}
.content-card {
padding: 1.5rem;
}
}