unreal-chat/apps/web/src/App.css
Juan Sebastian Montoya 16731409df refactor: migrate from Next.js to SolidJS and GraphQL
- Converted web application from Next.js to SolidJS with Vite
- Replaced React components with SolidJS components
- Implemented GraphQL client using URQL
- Added authentication, room, and chat components
- Updated project structure and configuration files
- Removed unnecessary Next.js and docs-related files
- Added Docker support for web and API applications
2025-03-04 01:08:52 -05:00

367 lines
5.7 KiB
CSS

#root {
max-width: 1280px;
margin: 0 auto;
padding: 2rem;
text-align: center;
}
.logo {
height: 6em;
padding: 1.5em;
will-change: filter;
transition: filter 300ms;
}
.logo:hover {
filter: drop-shadow(0 0 2em #646cffaa);
}
.logo.solid:hover {
filter: drop-shadow(0 0 2em #61dafbaa);
}
.card {
padding: 2em;
}
.read-the-docs {
color: #888;
}
:root {
--primary-color: #4f46e5;
--primary-hover: #4338ca;
--secondary-color: #6b7280;
--background-color: #f9fafb;
--card-background: #ffffff;
--text-color: #1f2937;
--border-color: #e5e7eb;
--error-color: #ef4444;
--success-color: #10b981;
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family:
'Inter',
-apple-system,
BlinkMacSystemFont,
'Segoe UI',
Roboto,
Oxygen,
Ubuntu,
Cantarell,
'Open Sans',
'Helvetica Neue',
sans-serif;
color: var(--text-color);
background-color: var(--background-color);
line-height: 1.5;
}
.app {
display: flex;
flex-direction: column;
min-height: 100vh;
}
.app-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1rem 2rem;
background-color: var(--primary-color);
color: white;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.app-main {
flex: 1;
padding: 1rem;
}
/* Auth styles */
.auth-container {
max-width: 400px;
margin: 2rem auto;
padding: 2rem;
background-color: var(--card-background);
border-radius: 0.5rem;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.auth-tabs {
display: flex;
margin-bottom: 1.5rem;
border-bottom: 1px solid var(--border-color);
}
.auth-tabs button {
flex: 1;
padding: 0.75rem;
background: none;
border: none;
cursor: pointer;
font-size: 1rem;
color: var(--secondary-color);
}
.auth-tabs button.active {
color: var(--primary-color);
border-bottom: 2px solid var(--primary-color);
}
.form-group {
margin-bottom: 1rem;
}
.form-group label {
display: block;
margin-bottom: 0.5rem;
font-weight: 500;
}
.form-group input,
.form-group textarea {
width: 100%;
padding: 0.75rem;
border: 1px solid var(--border-color);
border-radius: 0.25rem;
font-size: 1rem;
}
.form-group.checkbox {
display: flex;
align-items: center;
}
.form-group.checkbox label {
display: flex;
align-items: center;
margin-bottom: 0;
}
.form-group.checkbox input {
width: auto;
margin-right: 0.5rem;
}
button {
padding: 0.75rem 1.5rem;
background-color: var(--primary-color);
color: white;
border: none;
border-radius: 0.25rem;
font-size: 1rem;
cursor: pointer;
transition: background-color 0.2s;
}
button:hover {
background-color: var(--primary-hover);
}
button:disabled {
opacity: 0.7;
cursor: not-allowed;
}
.error {
color: var(--error-color);
margin-bottom: 1rem;
padding: 0.5rem;
background-color: rgba(239, 68, 68, 0.1);
border-radius: 0.25rem;
}
.logout-button {
padding: 0.5rem 1rem;
font-size: 0.875rem;
}
/* Chat styles */
.chat-container {
display: flex;
height: calc(100vh - 120px);
background-color: var(--card-background);
border-radius: 0.5rem;
overflow: hidden;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.sidebar {
width: 300px;
border-right: 1px solid var(--border-color);
display: flex;
flex-direction: column;
}
.room-list {
flex: 1;
overflow-y: auto;
padding: 1rem;
}
.room-list h2 {
margin-bottom: 1rem;
font-size: 1.25rem;
}
.room-item {
padding: 0.75rem;
border-radius: 0.25rem;
cursor: pointer;
margin-bottom: 0.5rem;
transition: background-color 0.2s;
}
.room-item:hover {
background-color: rgba(79, 70, 229, 0.1);
}
.room-item.selected {
background-color: rgba(79, 70, 229, 0.2);
}
.room-name {
font-weight: 500;
}
.room-description {
font-size: 0.875rem;
color: var(--secondary-color);
}
.chat-content {
flex: 1;
display: flex;
flex-direction: column;
}
.select-room-message {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
color: var(--secondary-color);
font-size: 1.125rem;
}
.chat-room {
display: flex;
flex-direction: column;
height: 100%;
}
.chat-header {
padding: 1rem;
border-bottom: 1px solid var(--border-color);
}
.chat-header h2 {
margin-bottom: 0.25rem;
}
.chat-header p {
color: var(--secondary-color);
font-size: 0.875rem;
}
.chat-messages {
flex: 1;
overflow-y: auto;
padding: 1rem;
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.message {
max-width: 70%;
padding: 0.75rem;
border-radius: 0.5rem;
background-color: #f3f4f6;
align-self: flex-start;
}
.message.own-message {
background-color: rgba(79, 70, 229, 0.1);
align-self: flex-end;
}
.message-header {
display: flex;
justify-content: space-between;
margin-bottom: 0.25rem;
font-size: 0.75rem;
}
.username {
font-weight: 500;
}
.time {
color: var(--secondary-color);
}
.message-content {
word-break: break-word;
}
.message-form {
display: flex;
padding: 1rem;
border-top: 1px solid var(--border-color);
}
.message-form input {
flex: 1;
padding: 0.75rem;
border: 1px solid var(--border-color);
border-radius: 0.25rem 0 0 0.25rem;
font-size: 1rem;
}
.message-form button {
border-radius: 0 0.25rem 0.25rem 0;
}
/* Create Room styles */
.create-room {
padding: 1rem;
border-bottom: 1px solid var(--border-color);
}
.create-room-button {
width: 100%;
}
.create-room-form {
margin-top: 1rem;
padding-top: 1rem;
border-top: 1px solid var(--border-color);
}
.create-room-form h3 {
margin-bottom: 1rem;
}
@media (max-width: 768px) {
.chat-container {
flex-direction: column;
height: auto;
}
.sidebar {
width: 100%;
border-right: none;
border-bottom: 1px solid var(--border-color);
}
.chat-messages {
height: 50vh;
}
}