Files
antigravity-skills-reference/skills/loki-mode/examples/todo-app-generated/frontend/src/App.css

385 lines
6.0 KiB
CSS

* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
html {
scroll-behavior: smooth;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif;
background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
min-height: 100vh;
line-height: 1.6;
}
.app {
max-width: 600px;
margin: 0 auto;
padding: 20px;
}
.app-header {
text-align: center;
margin-bottom: 30px;
}
.app-header h1 {
color: #333;
font-size: 2.5rem;
font-weight: 600;
letter-spacing: -0.5px;
}
.app-main {
background: white;
border-radius: 12px;
padding: 24px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
/* TodoForm */
.todo-form {
display: flex;
gap: 12px;
margin-bottom: 24px;
}
.todo-input {
flex: 1;
padding: 12px 16px;
border: 2px solid #e0e0e0;
border-radius: 8px;
font-size: 16px;
transition: all 0.2s ease;
font-family: inherit;
}
.todo-input:focus {
outline: none;
border-color: #4CAF50;
box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}
.todo-input:disabled {
background-color: #f5f5f5;
color: #999;
cursor: not-allowed;
}
.add-button {
padding: 12px 24px;
background-color: #4CAF50;
color: white;
border: none;
border-radius: 8px;
font-size: 16px;
font-weight: 500;
cursor: pointer;
transition: all 0.2s ease;
white-space: nowrap;
}
.add-button:hover:not(:disabled) {
background-color: #45a049;
transform: translateY(-1px);
box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}
.add-button:active:not(:disabled) {
transform: translateY(0);
}
.add-button:disabled {
background-color: #ccc;
cursor: not-allowed;
opacity: 0.6;
}
/* TodoList */
.todo-list {
display: flex;
flex-direction: column;
gap: 12px;
}
/* TodoItem */
.todo-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 16px;
background: #f9f9f9;
border: 1px solid #e8e8e8;
border-radius: 8px;
transition: all 0.2s ease;
}
.todo-item:hover {
background: #f0f0f0;
border-color: #d0d0d0;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}
.todo-content {
display: flex;
align-items: center;
gap: 12px;
flex: 1;
min-width: 0;
}
.todo-checkbox {
width: 20px;
height: 20px;
cursor: pointer;
accent-color: #4CAF50;
flex-shrink: 0;
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.todo-checkbox:hover {
transform: scale(1.15);
}
.todo-checkbox:focus {
outline: 2px solid #4CAF50;
outline-offset: 2px;
}
.todo-title {
font-size: 16px;
color: #333;
word-break: break-word;
transition: all 0.2s ease;
}
.todo-title.completed {
text-decoration: line-through;
color: #999;
}
.delete-button {
padding: 8px 16px;
background-color: #f44336;
color: white;
border: none;
border-radius: 6px;
font-size: 14px;
cursor: pointer;
transition: all 0.2s ease;
white-space: nowrap;
flex-shrink: 0;
margin-left: 8px;
font-weight: 500;
}
.delete-button:hover {
background-color: #da190b;
transform: translateY(-1px);
box-shadow: 0 4px 8px rgba(244, 67, 54, 0.3);
}
.delete-button:active {
transform: translateY(0);
}
.delete-button:focus {
outline: 2px solid #f44336;
outline-offset: 2px;
}
/* EmptyState */
.empty-state {
text-align: center;
padding: 48px 24px;
color: #999;
}
.empty-message {
font-size: 20px;
font-weight: 500;
color: #666;
margin-bottom: 8px;
}
.empty-hint {
font-size: 14px;
color: #999;
}
/* Loading State */
.loading {
text-align: center;
padding: 40px 20px;
color: #666;
font-size: 16px;
}
/* Error Message */
.error-message {
padding: 12px 16px;
background-color: #ffebee;
color: #c62828;
border: 1px solid #ef5350;
border-radius: 8px;
margin-bottom: 16px;
font-size: 14px;
text-align: center;
}
/* ConfirmDialog */
.dialog-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.dialog-content {
background: white;
padding: 24px;
border-radius: 12px;
max-width: 400px;
width: 90%;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
animation: slideUp 0.2s ease;
}
@keyframes slideUp {
from {
transform: translateY(10px);
opacity: 0;
}
to {
transform: translateY(0);
opacity: 1;
}
}
.dialog-message {
margin-bottom: 20px;
font-size: 16px;
color: #333;
line-height: 1.5;
}
.dialog-buttons {
display: flex;
gap: 12px;
justify-content: flex-end;
}
.cancel-button {
padding: 10px 20px;
background-color: #f0f0f0;
color: #333;
border: none;
border-radius: 6px;
cursor: pointer;
font-size: 14px;
font-weight: 500;
transition: all 0.2s ease;
}
.cancel-button:hover {
background-color: #e0e0e0;
transform: translateY(-1px);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.cancel-button:focus {
outline: 2px solid #333;
outline-offset: 2px;
}
.confirm-button {
padding: 10px 20px;
background-color: #f44336;
color: white;
border: none;
border-radius: 6px;
cursor: pointer;
font-size: 14px;
font-weight: 500;
transition: all 0.2s ease;
}
.confirm-button:hover {
background-color: #da190b;
transform: translateY(-1px);
box-shadow: 0 4px 8px rgba(244, 67, 54, 0.3);
}
.confirm-button:active {
transform: translateY(0);
}
.confirm-button:focus {
outline: 2px solid #f44336;
outline-offset: 2px;
}
/* Responsive Design */
@media (max-width: 640px) {
.app {
padding: 12px;
}
.app-header h1 {
font-size: 2rem;
}
.app-main {
padding: 16px;
}
.todo-form {
flex-direction: column;
gap: 10px;
}
.add-button {
width: 100%;
}
.todo-item {
flex-direction: column;
align-items: flex-start;
gap: 12px;
}
.todo-content {
width: 100%;
}
.delete-button {
width: 100%;
margin-left: 0;
}
.dialog-content {
width: 95%;
}
}