HF-Grok / static /style.css
AntDX316
updated
9ab3421
/* Global styles */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
line-height: 1.6;
color: #333;
background-color: #f8f9fa;
}
.container {
width: 95%;
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}
a {
text-decoration: none;
color: #3498db;
}
/* Header styles */
header {
background-color: #1a1a1a;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
padding: 20px 0;
position: sticky;
top: 0;
z-index: 100;
}
header .container {
display: flex;
justify-content: space-between;
align-items: center;
}
.logo {
font-size: 1.5rem;
font-weight: 700;
color: #ffffff;
}
nav ul {
display: flex;
list-style: none;
}
nav ul li {
margin-left: 30px;
}
nav ul li a {
color: #ffffff;
font-weight: 500;
transition: color 0.3s;
opacity: 0.8;
}
nav ul li a:hover,
nav ul li a.active {
color: #3498db;
opacity: 1;
}
/* Main section styles */
main {
padding: 40px 0;
}
.section {
display: none;
padding: 20px 0;
}
.section.active {
display: block;
}
/* API Key Section */
.api-key-container {
background-color: #fff;
border-radius: 10px;
padding: 30px;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
max-width: 800px;
margin: 0 auto;
}
.input-group {
margin: 20px 0;
display: flex;
flex-wrap: wrap;
gap: 10px;
}
input[type="password"] {
flex: 1;
padding: 12px 15px;
border: 1px solid #ddd;
border-radius: 5px;
font-size: 16px;
min-width: 250px;
}
.btn {
display: inline-block;
background-color: #3498db;
color: white;
padding: 12px 20px;
border-radius: 5px;
font-weight: 500;
transition: background-color 0.3s;
border: none;
cursor: pointer;
}
.btn:hover {
background-color: #2980b9;
}
.btn-secondary {
background-color: #e74c3c;
}
.btn-secondary:hover {
background-color: #c0392b;
}
#api-key-status {
margin-top: 15px;
font-weight: 500;
}
/* Model Cards */
.model-card {
background-color: #fff;
border-radius: 10px;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
overflow: hidden;
margin-bottom: 30px;
}
.model-info {
padding: 25px;
background-color: #2c3e50;
color: #fff;
}
.model-info h2 {
margin-bottom: 10px;
font-size: 1.8rem;
}
.model-info p {
color: rgba(255, 255, 255, 0.8);
margin-bottom: 10px;
}
.model-info p:first-of-type {
font-weight: 600;
color: #3498db;
}
/* Input Container */
.input-container {
padding: 25px;
border-bottom: 1px solid #eee;
}
textarea {
width: 100%;
padding: 15px;
border: 1px solid #ddd;
border-radius: 5px;
font-size: 16px;
min-height: 120px;
margin-bottom: 15px;
resize: vertical;
}
/* Result Container */
.result-container {
padding: 25px;
display: flex;
flex-direction: column;
gap: 20px;
}
.result-box {
min-height: 100px;
padding: 15px;
border: 1px solid #ddd;
border-radius: 5px;
background-color: #f9f9f9;
}
.status {
font-style: italic;
color: #7f8c8d;
}
/* Image Upload */
.upload-area {
border: 2px dashed #3498db;
border-radius: 5px;
padding: 40px 20px;
text-align: center;
margin-bottom: 15px;
cursor: pointer;
transition: background-color 0.3s;
}
.upload-area:hover {
background-color: rgba(52, 152, 219, 0.1);
}
.upload-area.dragover {
background-color: rgba(52, 152, 219, 0.2);
border-color: #2980b9;
}
.uploaded-image {
max-width: 100%;
margin-bottom: 20px;
display: flex;
justify-content: center;
}
.uploaded-image img {
max-width: 100%;
max-height: 400px;
border-radius: 5px;
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}
/* Footer */
footer {
background-color: #2c3e50;
color: #ecf0f1;
padding: 30px 0;
text-align: center;
}
footer p {
margin-bottom: 10px;
opacity: 0.8;
}
/* Loading spinner */
.loading {
display: inline-block;
width: 20px;
height: 20px;
border: 3px solid rgba(255,255,255,.3);
border-radius: 50%;
border-top-color: #3498db;
animation: spin 1s ease-in-out infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
/* Responsive design */
@media (max-width: 768px) {
header .container {
flex-direction: column;
}
nav ul {
margin-top: 20px;
justify-content: center;
flex-wrap: wrap;
}
nav ul li {
margin: 5px 15px;
}
.input-group {
flex-direction: column;
}
.input-group input,
.input-group button {
width: 100%;
}
}
/* Markdown styling */
#vision-result {
line-height: 1.2;
padding: 12px;
background-color: #f9f9f9;
border-radius: 8px;
overflow-wrap: break-word;
white-space: pre-line;
}
#vision-result h1,
#vision-result h2,
#vision-result h3,
#vision-result h4 {
margin-top: 0.4em;
margin-bottom: 0.2em;
color: #2a3990;
}
#vision-result p {
margin-bottom: 0.3em;
white-space: pre-line;
}
#vision-result ul,
#vision-result ol {
margin-left: 15px;
margin-bottom: 0.3em;
margin-top: 0.2em;
}
#vision-result li {
margin-bottom: 0em;
line-height: 1.2;
padding-bottom: 0.1em;
}
#vision-result code {
background-color: #eaeaea;
padding: 2px 4px;
border-radius: 3px;
font-family: monospace;
}
#vision-result pre {
background-color: #eaeaea;
padding: 10px;
border-radius: 5px;
overflow-x: auto;
}
#vision-result blockquote {
border-left: 4px solid #2a3990;
padding-left: 15px;
margin-left: 0;
color: #555;
}
#vision-result img {
max-width: 100%;
height: auto;
}
/* Image caption styling */
.image-caption {
margin-top: 10px;
padding: 10px;
background-color: #f5f5f5;
border-radius: 5px;
font-size: 0.9em;
line-height: 1.4;
color: #333;
border-left: 3px solid #2a3990;
}