style.css•8.3 kB
/* Modern Dark Theme Variables */
:root {
--bg-primary: #0d1117;
--bg-secondary: #161b22;
--bg-tertiary: #21262d;
--text-primary: #e6edf3;
--text-secondary: #8b949e;
--accent-blue: #58a6ff;
--accent-green: #3fb950;
--accent-red: #f85149;
--accent-yellow: #f0883e;
--border-color: #30363d;
--hover-bg: #1f2937;
--shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
/* Base styles */
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
line-height: 1.6;
color: var(--text-primary);
background: var(--bg-primary);
padding: 20px;
/* Subtle grid background */
background-image:
linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
background-size: 20px 20px;
background-position: -1px -1px;
}
.container {
max-width: 800px;
margin: 0 auto;
padding: 20px;
}
/* Modern scrollbar */
::-webkit-scrollbar {
width: 10px;
height: 10px;
}
::-webkit-scrollbar-track {
background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
background: var(--bg-tertiary);
border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
background: var(--border-color);
}
/* Header styles */
header {
text-align: center;
margin-bottom: 40px;
padding-bottom: 20px;
border-bottom: 1px solid var(--border-color);
}
h1 {
color: var(--accent-blue);
margin-bottom: 10px;
letter-spacing: 0.5px;
}
.subtitle {
color: var(--text-secondary);
font-style: italic;
}
/* Section styles */
.demo-section {
background: var(--bg-secondary);
border-radius: 12px;
padding: 20px;
margin-bottom: 30px;
box-shadow: var(--shadow);
border: 1px solid var(--border-color);
transition: all 0.2s ease;
/* Glass morphism effect */
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
background: rgba(22, 27, 34, 0.8);
}
.demo-section:hover {
background: var(--hover-bg);
transform: translateY(-2px);
}
h2 {
color: var(--accent-blue);
margin-bottom: 20px;
padding-bottom: 10px;
border-bottom: 1px solid var(--border-color);
font-weight: 600;
letter-spacing: 0.5px;
}
/* Counter styles */
.counter-container {
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 15px;
}
#counter-value {
font-size: 24px;
margin: 0 20px;
min-width: 50px;
text-align: center;
color: var(--text-primary);
}
.btn {
padding: 8px 16px;
background-color: var(--accent-blue);
color: var(--text-primary);
border: none;
border-radius: 6px;
cursor: pointer;
transition: all 0.2s ease;
font-weight: 500;
}
.btn:hover {
filter: brightness(1.2);
transform: translateY(-1px);
}
.reset-btn {
display: block;
margin: 0 auto;
background-color: var(--accent-red);
}
.reset-btn:hover {
background-color: #ff6b64;
}
/* Color box styles */
.color-box {
height: 150px;
display: flex;
justify-content: center;
align-items: center;
background-color: var(--bg-tertiary);
border-radius: 8px;
margin-bottom: 15px;
transition: background-color 0.3s;
border: 1px solid var(--border-color);
}
.color-box p {
color: var(--text-primary);
text-align: center;
padding: 10px;
}
.color-buttons {
display: flex;
justify-content: center;
gap: 10px;
flex-wrap: wrap;
}
.color-btn {
padding: 8px 16px;
color: var(--text-primary);
border: none;
border-radius: 6px;
cursor: pointer;
transition: all 0.2s ease;
}
.color-btn:hover {
opacity: 0.9;
transform: translateY(-1px);
}
.color-btn:nth-child(1) {
background-color: #FF5733;
}
.color-btn:nth-child(2) {
background-color: var(--accent-green);
}
.color-btn:nth-child(3) {
background-color: var(--accent-blue);
}
.color-btn:nth-child(4) {
background-color: var(--accent-yellow);
}
/* Todo list styles */
.todo-input {
display: flex;
margin-bottom: 15px;
}
#todo-input {
flex-grow: 1;
padding: 8px 12px;
border: 1px solid var(--border-color);
border-radius: 6px 0 0 6px;
font-size: 16px;
background-color: var(--bg-tertiary);
color: var(--text-primary);
}
#todo-input:focus {
outline: none;
border-color: var(--accent-blue);
}
#add-todo-btn {
border-radius: 0 6px 6px 0;
}
.todo-list {
list-style-type: none;
}
.todo-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px;
background-color: var(--bg-tertiary);
border-radius: 6px;
margin-bottom: 8px;
border: 1px solid var(--border-color);
transition: all 0.2s ease;
}
.todo-item:hover {
background-color: var(--hover-bg);
}
.todo-item.completed {
text-decoration: line-through;
opacity: 0.7;
}
.todo-actions {
display: flex;
gap: 5px;
}
.todo-toggle, .todo-delete {
padding: 5px 10px;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 12px;
transition: all 0.2s ease;
}
.todo-toggle {
background-color: var(--accent-green);
color: var(--text-primary);
}
.todo-delete {
background-color: var(--accent-red);
color: var(--text-primary);
}
.todo-toggle:hover, .todo-delete:hover {
filter: brightness(1.1);
transform: translateY(-1px);
}
/* Footer styles */
footer {
text-align: center;
margin-top: 40px;
padding-top: 20px;
border-top: 1px solid var(--border-color);
color: var(--text-secondary);
}
/* Goose API section styles */
.goose-api-section {
margin-bottom: 40px;
}
.api-demo-section {
margin-bottom: 30px;
padding: 15px;
border: 1px solid var(--border-color);
border-radius: 8px;
background-color: rgba(33, 38, 45, 0.5);
}
.api-demo-section h3 {
color: var(--accent-blue);
margin-bottom: 15px;
padding-bottom: 5px;
border-bottom: 1px solid var(--border-color);
}
.api-demo-section h4 {
color: var(--text-secondary);
margin-bottom: 10px;
}
.goose-container {
display: flex;
flex-direction: column;
gap: 15px;
}
.goose-input {
width: 100%;
}
#text-message,
#list-message,
#table-message {
width: 100%;
min-height: 80px;
padding: 12px;
border: 1px solid var(--border-color);
border-radius: 6px;
font-size: 16px;
background-color: var(--bg-tertiary);
color: var(--text-primary);
margin-bottom: 10px;
resize: vertical;
}
.button-row {
display: flex;
gap: 10px;
}
.goose-response {
background-color: var(--bg-tertiary);
border-radius: 6px;
padding: 15px;
border: 1px solid var(--border-color);
}
.response-content {
min-height: 50px;
max-height: 200px;
overflow-y: auto;
padding: 10px;
border-radius: 4px;
background-color: var(--bg-primary);
}
.loading-message {
color: var(--accent-yellow);
font-style: italic;
text-align: center;
padding: 20px;
}
.error-message {
color: var(--accent-red);
padding: 10px;
border-left: 3px solid var(--accent-red);
background-color: rgba(248, 81, 73, 0.1);
border-radius: 4px;
}
.empty-response {
color: var(--text-secondary);
font-style: italic;
text-align: center;
padding: 20px;
}
/* Response format styling */
.text-response {
white-space: pre-wrap;
line-height: 1.5;
}
.response-list {
list-style-position: inside;
padding-left: 10px;
}
.response-list li {
margin-bottom: 8px;
padding-left: 5px;
}
.response-table {
width: 100%;
border-collapse: collapse;
}
.response-table th,
.response-table td {
padding: 8px;
text-align: left;
border: 1px solid var(--border-color);
}
.response-table th {
background-color: var(--bg-secondary);
color: var(--accent-blue);
font-weight: 600;
}
.response-table tr:nth-child(even) {
background-color: rgba(33, 38, 45, 0.5);
}
/* Responsive adjustments */
@media (max-width: 768px) {
body {
padding: 10px;
}
.container {
padding: 10px;
}
.demo-section {
padding: 15px;
}
}