body {
    font-family: 'Inter', sans-serif;
    background-color: #F2F4F8;
    color: #202124;
    margin: 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1A73E8;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#prediction-results {
    margin-top: 1rem;
    width: 100%;
}

.prediction-bar-container {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.prediction-label {
    width: 80px; /* Adjust as needed */
    margin-right: 1rem;
    text-align: right;
}

.prediction-bar-wrapper {
    flex-grow: 1;
    height: 20px;
    background-color: #e0e0e0;
    border-radius: 3px;
    margin: 0 1rem;
}

.prediction-bar {
    height: 100%;
    background-color: #4CAF50; /* Green */
    border-radius: 3px;
    transition: width 0.2s ease-in-out;
}

.prediction-confidence {
    margin-left: 1rem;
    min-width: 40px; /* Ensure consistent spacing */
}

#app-container {
    display: flex;
    justify-content: space-around;
    padding: 2rem;
    gap: 2rem;
    height: 100vh;
}

.column {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 30%;
}

#training-column, #preview-column {
    margin-top: 80px; /* Align with the first card */
}

.card {
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 16px;
    margin-bottom: 16px;
    width: 250px; /* Fixed width for cards */
    transition: box-shadow 0.3s ease;
}

.drop-zone-active {
    box-shadow: 0 0 15px rgba(26, 115, 232, 0.7);
    border: 2px dashed #1A73E8;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-weight: 500;
    font-size: 16px;
}

.header-icons {
    display: flex;
    gap: 0.5rem;
}

.edit-icon,
.remove-icon {
    cursor: pointer;
}

.remove-icon {
    stroke: red;
}

.class-card-header input {
    font-weight: 500;
    font-size: 16px;
    border: none;
    padding: 2px;
}

.class-card-header input:focus {
    outline: 2px solid #1A73E8;
    background-color: #f1f8ff;
}

.card-header svg {
    cursor: pointer;
    color: #5F6368;
}

.add-image-label {
    font-size: 14px;
    color: #5F6368;
    margin-bottom: 8px;
}

.action-buttons {
    display: flex;
    justify-content: space-between;
}

.action-buttons button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 40px;
    background-color: white;
    border: 1px solid #d2e3fc;
    border-radius: 4px;
    color: #1A73E8;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.action-buttons button:hover {
    background-color: #f1f8ff;
}

.action-buttons svg {
    margin-right: 8px;
}

.add-class-placeholder {
    border: 2px dashed #ccc;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    color: #5F6368;
    height: 150px; /* Match class card height */
}

#train-model-button, #export-model-button {
    width: 100%;
    height: 40px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

#train-model-button {
    background-color: white;
    border: 1px solid #1A73E8;
    color: #1A73E8;
}

#train-model-button:disabled {
    background-color: #f1f1f1;
    border-color: #e0e0e0;
    color: #a1a1a1;
    cursor: not-allowed;
}

#export-model-button {
    background-color: transparent;
    border: none;
    color: #1A73E8;
}

#export-model-button:disabled {
    color: #a1a1a1;
    cursor: not-allowed;
}

#advanced-toggle {
    margin-top: 16px;
    font-size: 14px;
    color: #5F6368;
    cursor: pointer;
    display: flex;
    align-items: center;
}

#advanced-toggle svg {
    margin-left: 4px;
}

#preview-placeholder {
    font-size: 14px;
    color: #5F6368;
    text-align: center;
    padding: 20px;
}

#preview-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

#camera-section,
#predictions-section {
    width: 100%;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
    color: #3C4043;
}

.status-pill {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
    background-color: #E8F0FE;
    color: #1A73E8;
    letter-spacing: 0.02em;
}

.status-pill.off {
    background-color: #F1F3F4;
    color: #5F6368;
}

#camera-frame {
    position: relative;
    width: 224px;
    height: 224px;
    margin: 0 auto;
    border-radius: 6px;
    overflow: hidden;
    background-color: #F1F3F4;
    border: 1px solid #E0E0E0;
}

#camera-flash {
    position: absolute;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.85);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

#camera-flash.flash {
    opacity: 1;
    transition: opacity 0.05s ease;
}

#capture-feedback {
    margin-top: 6px;
    min-height: 16px;
    font-size: 12px;
    color: #1A73E8;
    text-align: center;
}

#webcam {
    width: 224px;
    height: 224px;
    object-fit: cover;
    display: block;
}

.hidden {
    display: none;
}

.image-count {
    font-size: 12px;
    color: #5F6368;
    margin-top: 8px;
}
