/* Animal Test Specific Styles */

.hero {
    text-align: center;
    padding: 40px 20px;
}

.hero h2 {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 10px;
}

.upload-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* Portrait-style Upload Area */
.upload-area {
    width: 100%;
    max-width: 300px;
    aspect-ratio: 3 / 4;
    border: 3px dashed var(--border-color);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(var(--accent-rgb), 0.02);
    position: relative;
    overflow: hidden;
}

.upload-area:hover, .upload-area.drag-active {
    border-color: var(--accent-color);
    background: rgba(var(--accent-rgb), 0.05);
}

.upload-area.drag-active {
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.2);
}

.upload-placeholder {
    text-align: center;
    color: var(--footer-text-color);
    padding: 20px;
}

.upload-placeholder i {
    font-size: 4rem;
    color: var(--border-color);
    margin-bottom: 15px;
}

#imagePreview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 17px;
}

.upload-button {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

#predict-button {
    background: #333;
    color: white;
    border: none;
    padding: 15px 35px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 10px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Ranking Section (Top 3) */
.ranking-section {
    margin: 25px 0;
    padding: 20px;
    background: rgba(var(--accent-rgb), 0.03);
    border-radius: 15px;
}

.ranking-section h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1rem;
    color: var(--text-color);
    border-left: 4px solid var(--accent-color);
    padding-left: 10px;
}

.rank-item {
    margin-bottom: 12px;
}

.rank-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-color);
}

.rank-bar-bg {
    width: 100%;
    height: 10px;
    background: var(--border-color);
    border-radius: 5px;
    overflow: hidden;
}

.rank-bar-fill {
    height: 100%;
    background: var(--accent-color);
    border-radius: 5px;
    transition: width 1s ease-out;
}

/* Result Card Styles */
.result-card {
    background: white;
    border-radius: 25px;
    padding: 30px;
    margin-top: 30px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    border: 1px solid #eee;
    text-align: left;
}

[data-theme="dark"] .result-card {
    background: #2d2d2d;
    border-color: #444;
}

.result-header {
    text-align: center;
    margin-bottom: 25px;
}

.prob-badge {
    background: var(--accent-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}

.main-desc {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--footer-text-color);
    margin-bottom: 20px;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

@media (min-width: 600px) {
    .info-grid { grid-template-columns: 1fr 1fr; }
}

.info-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-color);
}

.retry-button {
    width: 100%;
    margin-top: 25px;
    padding: 15px;
    border-radius: 12px;
    border: 2px solid var(--accent-color);
    background: transparent;
    color: var(--accent-color);
    font-weight: 700;
    cursor: pointer;
}

.animate-pop {
    animation: pop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes pop {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Scanning Animation */
.scanning-animation {
    position: relative;
    margin: 40px auto;
    width: 100%;
    max-width: 300px;
    height: 100px;
    background: rgba(var(--accent-rgb), 0.05);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent-color);
    box-shadow: 0 0 15px var(--accent-color);
    animation: scan 2s infinite ease-in-out;
}

@keyframes scan {
    0% { top: 0; }
    50% { top: 100%; }
    100% { top: 0; }
}
