Spaces:
Build error
Build error
| /* static/css/style.css */ | |
| :root { | |
| --font-family-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; | |
| --background-color: #f8f9fa; /* Very light grey */ | |
| --card-background-color: #ffffff; | |
| --text-color: #343a40; /* Dark grey */ | |
| --subtle-text-color: #6c757d; /* Lighter grey */ | |
| --border-color: #dee2e6; /* Light border */ | |
| --primary-color: #4a90e2; /* Example accent blue */ | |
| --primary-color-hover: #357abd; | |
| --secondary-color: #e9ecef; /* Light grey for secondary buttons */ | |
| --secondary-color-hover: #ced4da; | |
| --error-color: #dc3545; /* Red for errors */ | |
| --border-radius: 8px; | |
| --box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03); | |
| --container-max-width: 800px; | |
| } | |
| body { | |
| font-family: var(--font-family-sans); | |
| background-color: var(--background-color); | |
| color: var(--text-color); | |
| line-height: 1.6; | |
| margin: 0; | |
| padding: 20px; | |
| } | |
| .container { | |
| max-width: var(--container-max-width); | |
| margin: 20px auto; | |
| padding: 0 15px; | |
| } | |
| header { | |
| text-align: center; | |
| margin-bottom: 40px; | |
| } | |
| h1 { | |
| font-weight: 700; | |
| margin-bottom: 0.5rem; | |
| } | |
| .subtitle { | |
| color: var(--subtle-text-color); | |
| font-size: 1.1rem; | |
| } | |
| main { | |
| display: flex; | |
| flex-direction: column; | |
| gap: 30px; /* Space between sections */ | |
| } | |
| .card { | |
| background-color: var(--card-background-color); | |
| border: 1px solid var(--border-color); | |
| border-radius: var(--border-radius); | |
| box-shadow: var(--box-shadow); | |
| padding: 25px; | |
| } | |
| h2, h3, h4 { | |
| margin-top: 0; | |
| margin-bottom: 1rem; | |
| font-weight: 500; | |
| } | |
| /* --- Upload Section --- */ | |
| #upload-form { | |
| display: flex; | |
| flex-wrap: wrap; /* Allow wrapping on small screens */ | |
| align-items: center; | |
| gap: 15px; | |
| } | |
| .file-label { | |
| display: inline-flex; /* Use flex for icon alignment */ | |
| align-items: center; | |
| padding: 10px 15px; | |
| border: 1px solid var(--border-color); | |
| border-radius: var(--border-radius); | |
| cursor: pointer; | |
| background-color: var(--card-background-color); | |
| transition: background-color 0.2s ease; | |
| } | |
| .file-label:hover { | |
| background-color: #f1f3f5; /* Slightly darker on hover */ | |
| } | |
| #photo-input { | |
| /* Hide the default file input */ | |
| width: 0.1px; | |
| height: 0.1px; | |
| opacity: 0; | |
| overflow: hidden; | |
| position: absolute; | |
| z-index: -1; | |
| } | |
| #file-name-display { | |
| color: var(--subtle-text-color); | |
| font-size: 0.9rem; | |
| flex-grow: 1; /* Take up remaining space */ | |
| white-space: nowrap; | |
| overflow: hidden; | |
| text-overflow: ellipsis; | |
| } | |
| .icon { | |
| width: 1.2em; /* Adjust icon size */ | |
| height: 1.2em; | |
| margin-right: 8px; | |
| vertical-align: middle; /* Align icon better with text */ | |
| } | |
| .button { | |
| display: inline-flex; | |
| align-items: center; | |
| justify-content: center; | |
| padding: 10px 20px; | |
| border: none; | |
| border-radius: var(--border-radius); | |
| font-weight: 500; | |
| cursor: pointer; | |
| transition: background-color 0.2s ease, box-shadow 0.2s ease; | |
| text-decoration: none; /* Remove underline if used as link */ | |
| white-space: nowrap; /* Prevent wrapping */ | |
| } | |
| .button .icon { | |
| margin-right: 6px; | |
| } | |
| .button span { /* Ensure span inside button aligns well */ | |
| line-height: 1; | |
| } | |
| .primary-button { | |
| background-color: var(--primary-color); | |
| color: white; | |
| } | |
| .primary-button:hover { | |
| background-color: var(--primary-color-hover); | |
| box-shadow: 0 2px 5px rgba(0,0,0,0.1); | |
| } | |
| .secondary-button { | |
| background-color: var(--secondary-color); | |
| color: var(--text-color); | |
| border: 1px solid var(--border-color); | |
| } | |
| .secondary-button:hover { | |
| background-color: var(--secondary-color-hover); | |
| } | |
| .error-text { | |
| color: var(--error-color); | |
| font-size: 0.9rem; | |
| margin-top: 10px; | |
| } | |
| /* --- Results Section --- */ | |
| #result-image { | |
| display: block; | |
| max-width: 100%; | |
| height: auto; | |
| margin-top: 15px; | |
| margin-bottom: 20px; | |
| border-radius: var(--border-radius); | |
| border: 1px solid var(--border-color); | |
| } | |
| .button-group { | |
| display: flex; | |
| flex-wrap: wrap; | |
| gap: 10px; | |
| } | |
| .button-group .button { /* Style buttons within the group */ | |
| background-color: var(--secondary-color); | |
| color: var(--text-color); | |
| border: 1px solid var(--border-color); | |
| } | |
| .button-group .button:hover { | |
| background-color: var(--secondary-color-hover); | |
| } | |
| /* --- Bird Info Section --- */ | |
| .bird-info-header { | |
| display: flex; | |
| align-items: center; | |
| gap: 20px; | |
| margin-bottom: 20px; | |
| } | |
| #bird-example-image { | |
| width: 100px; | |
| height: 100px; | |
| object-fit: cover; /* Cover the area, might crop */ | |
| border-radius: var(--border-radius); | |
| border: 1px solid var(--border-color); | |
| flex-shrink: 0; /* Prevent image from shrinking */ | |
| } | |
| #bird-info-area h3 { | |
| margin-bottom: 0; /* Remove bottom margin if next to image */ | |
| } | |
| .bird-info-details p { | |
| margin-bottom: 0.8rem; | |
| } | |
| .bird-info-details strong { | |
| color: var(--text-color); /* Ensure strong text is dark */ | |
| } | |
| .audio-player { | |
| margin-top: 15px; | |
| } | |
| #bird-audio { | |
| width: 100%; /* Make audio player responsive */ | |
| margin-top: 5px; | |
| } | |
| #chat-button { /* Style the chat button specifically */ | |
| margin-top: 20px; | |
| } | |
| /* --- Chat Interface --- */ | |
| #chat-history { | |
| height: 250px; | |
| overflow-y: auto; | |
| border: 1px solid var(--border-color); | |
| border-radius: var(--border-radius); | |
| padding: 15px; | |
| margin-bottom: 15px; | |
| background-color: #f8f9fa; /* Slightly different background */ | |
| } | |
| #chat-history p { | |
| margin-bottom: 10px; | |
| word-wrap: break-word; /* Break long words */ | |
| } | |
| #chat-history p strong { /* Style sender name */ | |
| color: var(--primary-color); /* Use accent color for sender */ | |
| margin-right: 5px; | |
| } | |
| #chat-history p:last-child { | |
| margin-bottom: 0; | |
| } | |
| .chat-input-area { | |
| display: flex; | |
| gap: 10px; | |
| } | |
| #chat-input { | |
| flex-grow: 1; | |
| padding: 10px 15px; | |
| border: 1px solid var(--border-color); | |
| border-radius: var(--border-radius); | |
| font-size: 1rem; | |
| } | |
| #chat-input:focus { | |
| outline: none; | |
| border-color: var(--primary-color); | |
| box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2); /* Subtle focus ring */ | |
| } | |
| #send-chat-button .icon { | |
| margin-right: 0; /* No text, so no margin needed */ | |
| } | |
| #send-chat-button span { /* Hide text on send button if only icon is desired */ | |
| display: none; | |
| } | |
| /* --- Loading Indicators --- */ | |
| .loading { | |
| display: flex; | |
| align-items: center; | |
| gap: 10px; | |
| color: var(--subtle-text-color); | |
| margin-top: 15px; | |
| font-size: 0.9rem; | |
| } | |
| .spinner { | |
| width: 20px; | |
| height: 20px; | |
| border: 2px solid var(--border-color); | |
| border-top-color: var(--primary-color); | |
| border-radius: 50%; | |
| animation: spin 1s linear infinite; | |
| } | |
| .small-spinner { | |
| width: 16px; | |
| height: 16px; | |
| border-width: 2px; | |
| } | |
| @keyframes spin { | |
| to { transform: rotate(360deg); } | |
| } |