WildCardss / src /style.css
Trinay16's picture
Upload 6 files
c3abc9e verified
/* Main styles for SpeciScan */
:root {
--primary-color: #2e7d32;
--secondary-color: #388e3c;
--accent-color: #81c784;
--text-color: #333;
--light-text: #f5f5f5;
--background-color: #f9f9f9;
--card-bg: #ffffff;
--card-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
--border-radius: 8px;
--transition-speed: 0.3s;
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background-color: var(--background-color);
color: var(--text-color);
line-height: 1.6;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
}
header {
text-align: center;
margin-bottom: 40px;
padding: 20px;
background-color: var(--primary-color);
color: var(--light-text);
border-radius: var(--border-radius);
}
header h1 {
font-size: 2.5rem;
margin-bottom: 10px;
}
header p {
font-size: 1.2rem;
opacity: 0.9;
}
.main-content {
margin-bottom: 40px;
}
.search-methods {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 20px;
margin-bottom: 40px;
}
.method-card {
background-color: var(--card-bg);
border-radius: var(--border-radius);
padding: 25px;
box-shadow: var(--card-shadow);
transition: transform var(--transition-speed);
}
.method-card:hover {
transform: translateY(-5px);
}
.method-card h2 {
color: var(--primary-color);
margin-bottom: 15px;
display: flex;
align-items: center;
gap: 10px;
}
.method-card p {
margin-bottom: 20px;
color: #666;
}
form {
display: flex;
flex-direction: column;
gap: 15px;
}
input[type="text"],
input[type="file"] {
padding: 12px;
border: 1px solid #ddd;
border-radius: var(--border-radius);
font-size: 1rem;
}
input[type="file"] {
display: none;
}
.file-upload {
margin-bottom: 10px;
}
.upload-zone {
border: 2px dashed #ccc;
border-radius: var(--border-radius);
padding: 40px 20px;
text-align: center;
cursor: pointer;
transition: background-color var(--transition-speed);
}
.upload-zone:hover {
background-color: #f0f0f0;
}
.upload-zone i {
font-size: 2rem;
color: var(--primary-color);
margin-bottom: 10px;
}
.file-name {
margin-top: 10px;
font-weight: bold;
}
.btn {
padding: 12px 20px;
border: none;
border-radius: var(--border-radius);
cursor: pointer;
font-size: 1rem;
font-weight: 600;
display: flex;
justify-content: center;
align-items: center;
gap: 8px;
transition: background-color var(--transition-speed);
}
.primary-btn {
background-color: var(--primary-color);
color: white;
}
.primary-btn:hover {
background-color: var(--secondary-color);
}
.results {
background-color: var(--card-bg);
border-radius: var(--border-radius);
padding: 30px;
box-shadow: var(--card-shadow);
display: none;
}
.results.active {
display: block;
}
.species-header {
display: flex;
align-items: flex-start;
gap: 20px;
margin-bottom: 30px;
flex-wrap: wrap;
}
.species-img {
width: 300px;
height: 250px;
object-fit: cover;
border-radius: var(--border-radius);
box-shadow: var(--card-shadow);
}
.species-details {
flex: 1;
min-width: 300px;
}
.species-details h2 {
color: var(--primary-color);
margin-bottom: 15px;
font-size: 2rem;
}
.species-details .scientific-name {
font-style: italic;
color: #666;
margin-bottom: 20px;
}
.species-info {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 20px;
margin-bottom: 30px;
}
.info-card {
background-color: #f5f5f5;
border-radius: var(--border-radius);
padding: 20px;
}
.info-card h3 {
color: var(--primary-color);
margin-bottom: 10px;
display: flex;
align-items: center;
gap: 8px;
}
.info-list {
list-style-type: none;
}
.info-list li {
padding: 8px 0;
border-bottom: 1px solid #ddd;
}
.info-list li:last-child {
border-bottom: none;
}
.classification-table {
width: 100%;
border-collapse: collapse;
}
.classification-table tr {
border-bottom: 1px solid #eee;
}
.classification-table tr:last-child {
border-bottom: none;
}
.classification-table th {
text-align: left;
padding: 10px 5px;
color: var(--primary-color);
width: 40%;
}
.classification-table td {
padding: 10px 5px;
}
.gallery {
margin-top: 30px;
}
.gallery h3 {
color: var(--primary-color);
margin-bottom: 20px;
}
.gallery-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
gap: 15px;
}
.data-sources {
margin-top: 20px;
text-align: right;
color: #777;
font-style: italic;
}
.data-sources p {
font-size: 0.85rem;
}
.gallery-item {
position: relative;
border-radius: var(--border-radius);
overflow: hidden;
box-shadow: var(--card-shadow);
aspect-ratio: 3/2;
}
.gallery-img {
width: 100%;
height: 100%;
object-fit: cover;
transition: transform var(--transition-speed);
}
.gallery-item:hover .gallery-img {
transform: scale(1.05);
}
.gallery-caption {
position: absolute;
bottom: 0;
left: 0;
right: 0;
background-color: rgba(0, 0, 0, 0.7);
color: white;
padding: 10px;
font-size: 0.9rem;
transform: translateY(100%);
transition: transform var(--transition-speed);
}
.gallery-item:hover .gallery-caption {
transform: translateY(0);
}
.loading-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(255, 255, 255, 0.9);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
z-index: 1000;
display: none;
}
.loading-overlay.active {
display: flex;
}
.spinner {
width: 50px;
height: 50px;
border: 5px solid var(--accent-color);
border-top: 5px solid var(--primary-color);
border-radius: 50%;
animation: spin 1s linear infinite;
margin-bottom: 20px;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
footer {
text-align: center;
margin-top: 40px;
padding: 20px;
background-color: var(--primary-color);
color: var(--light-text);
border-radius: var(--border-radius);
}
footer a {
color: var(--accent-color);
text-decoration: none;
}
footer a:hover {
text-decoration: underline;
}
/* Messages styles */
.notice-message {
background-color: #fff3cd;
color: #856404;
padding: 12px 15px;
border-radius: var(--border-radius);
margin-bottom: 15px;
display: flex;
align-items: center;
gap: 8px;
}
.notice-message i {
font-size: 1.2rem;
}
.error-message {
background-color: #f8d7da;
color: #721c24;
padding: 20px;
border-radius: var(--border-radius);
margin-bottom: 20px;
}
.error-message h2 {
margin-bottom: 10px;
color: #721c24;
}
/* Drag and drop styles */
.upload-zone.dragover {
background-color: var(--accent-color);
border-color: var(--primary-color);
color: var(--primary-color);
}
.upload-zone.has-file {
border-color: var(--primary-color);
background-color: rgba(129, 199, 132, 0.1);
}
/* Suggestions styles */
.suggestions {
margin-top: 15px;
}
.suggestions p {
font-size: 0.9rem;
color: #666;
margin-bottom: 8px;
}
.suggestion-chips {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.chip {
background-color: var(--accent-color);
color: var(--primary-color);
padding: 5px 12px;
border-radius: 20px;
font-size: 0.9rem;
cursor: pointer;
transition: background-color var(--transition-speed);
}
.chip:hover {
background-color: var(--primary-color);
color: white;
}
/* Responsive adjustments */
@media (max-width: 768px) {
.species-header {
flex-direction: column;
}
.species-img {
width: 100%;
height: auto;
}
.method-card {
padding: 20px;
}
}
@media (max-width: 480px) {
header h1 {
font-size: 2rem;
}
.gallery-grid {
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
}