:root {
    --premium-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --card-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --high-match: #ef4444;
    --medium-match: #f59e0b;
    --low-match: #10b981;
}

.animal-matcher-container {
    margin: 3em 0;
    padding: 2.5em;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--card-shadow);
}

.matcher-title {
    margin-top: 0;
    color: #111827;
    font-size: 1.8em;
    font-weight: 800;
    margin-bottom: 30px;
    letter-spacing: -0.025em;
}

.animal-matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
}

.animal-match-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.animal-match-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.match-badge-container {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 20;
}

.match-badge {
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.match-percentage {
    background: var(--premium-gradient);
    color: white;
    padding: 6px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 4px 6px rgba(99, 102, 241, 0.3);
}

.match-high {
    background: rgba(239, 68, 68, 0.9);
    color: #fff;
}

.match-medium {
    background: rgba(245, 158, 11, 0.9);
    color: #fff;
}

.match-low {
    background: rgba(16, 185, 129, 0.9);
    color: #fff;
}

.match-thumb {
    aspect-ratio: 4/5;
    background: #f3f4f6;
}

.match-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.animal-match-card:hover .match-thumb img {
    transform: scale(1.15);
}

.match-info {
    padding: 20px;
    background: white;
}

.match-title {
    display: block;
    font-weight: 800;
    font-size: 1.1em;
    color: #1f2937;
    margin-bottom: 8px;
}

.match-locality {
    font-size: 0.9em;
    color: #6b7280;
    font-weight: 500;
}

/* Animations */
.animal-match-card {
    opacity: 0;
    animation: premiumEntrance 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

@keyframes premiumEntrance {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.animal-match-card:nth-child(2) {
    animation-delay: 0.1s;
}

.animal-match-card:nth-child(3) {
    animation-delay: 0.2s;
}

.animal-match-card:nth-child(4) {
    animation-delay: 0.3s;
}

.animal-match-card:nth-child(5) {
    animation-delay: 0.4s;
}

.animal-match-card:nth-child(6) {
    animation-delay: 0.5s;
}

/* Premium Form Styles */
.premium-form {
    max-width: 800px;
    margin: 2em auto;
    padding: 40px;
    background: #fff;
    border-radius: 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
}

.form-header {
    text-align: center;
    margin-bottom: 40px;
}

.form-header h3 {
    font-size: 2em;
    font-weight: 900;
    background: var(--premium-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 700;
    color: #374151;
    font-size: 0.9em;
}

.form-group input,
.form-group select {
    padding: 12px 16px;
    border: 2px solid #f3f4f6;
    border-radius: 12px;
    font-size: 1em;
    transition: all 0.3s ease;
}

.form-group input:focus {
    border-color: #6366f1;
    outline: none;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* Real-time Results */
.realtime-matches-preview {
    margin-top: 30px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 20px;
    border: 1px dashed #e2e8f0;
    animation: premiumEntrance 0.4s ease;
}

.realtime-matches-preview h4 {
    margin: 0 0 15px 0;
    color: #1e293b;
    font-size: 1em;
}

.mini-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.mini-card {
    background: white;
    padding: 10px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.mini-card img {
    border-radius: 8px;
    margin-bottom: 8px;
    width: 100%;
}

.mini-card span {
    font-size: 11px;
    font-weight: 700;
    display: block;
}

.form-footer {
    margin-top: 40px;
    text-align: center;
}

.submit-premium-btn {
    background: var(--premium-gradient);
    color: white;
    border: none;
    padding: 16px 40px;
    border-radius: 50px;
    font-size: 1.1em;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.submit-premium-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(99, 102, 241, 0.4);
}