.gradient-button {
    background-image: linear-gradient(to right, var(--tw-gradient-from), var(--tw-gradient-to));
}

.gradient-button:hover span {
    background-color: transparent;
}

.gradient-button:active {
    transform: scale(0.98);
}

.card-gradient {
    background: linear-gradient(180deg, rgba(3, 12, 34, 0.95) 0%, rgba(15, 23, 42, 0.95) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* Enhanced result cards styling */
#diagnostic-cards > div,
#risk-cards > div {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9));
    backdrop-filter: blur(15px);
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.15);
    padding: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

#diagnostic-cards > div:hover,
#risk-cards > div:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
    border-color: rgba(148, 163, 184, 0.25);
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.98), rgba(51, 65, 85, 0.95));
}

/* Diagnostic cards custom styling */
#diagnostic-cards .text-green-500 {
    color: rgb(34, 197, 94);
    font-weight: 600;
}

#diagnostic-cards .text-red-500 {
    color: rgb(239, 68, 68);
    font-weight: 600;
}

#diagnostic-cards .text-yellow-500 {
    color: rgb(255, 214, 10);
    font-weight: 600;
}

/* Enhanced typography */
#risk-cards h3,
#diagnostic-cards h3 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', 'Roboto', 'Helvetica Neue', 'Arial', sans-serif;
    font-weight: 600;
    color: rgba(248, 250, 252, 0.92);
    font-size: 16px;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

#risk-cards p,
#diagnostic-cards p {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'San Francisco', 'Segoe UI', 'Roboto', 'Helvetica Neue', 'Arial', sans-serif;
    font-weight: 500;
    color: rgba(203, 213, 225, 0.75);
    font-size: 14px;
    line-height: 1.4;
}

#risk-cards .bg-gray-50\/90 {
    background-color: rgba(51, 65, 85, 0.95);
}

#risk-cards > div,
#diagnostic-cards > div {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 120px;
}

/* Enhanced section headers */
.card-gradient button {
    border-radius: 8px 8px 0 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-gradient button:hover {
    background: linear-gradient(90deg, rgba(8, 14, 28, 0.9), rgba(15, 23, 42, 0.9));
}

/* Redesigned map buttons */
.map-btn {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.7));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    letter-spacing: -0.01em;
    color: rgba(248, 250, 252, 0.85);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    min-height: 70px;
    position: relative;
    overflow: hidden;
}

.map-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(239, 68, 68, 0.08), transparent);
    transition: left 0.5s;
}

.map-btn:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(51, 65, 85, 0.9));
    border-color: rgba(239, 68, 68, 0.3);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.12);
    color: rgba(239, 68, 68, 0.9);
}

.map-btn:hover::before {
    left: 100%;
}

.map-btn:active {
    transform: translateY(-1px);
}

/* Smooth animations */
.transform.transition-transform {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced upload area */
#upload-area:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Loading animation */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}



/* Mobile text wrapping and line height */
@media (max-width: 640px) {
    .risk-card h3 {
        line-height: 1.2;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        max-height: 2.4em;
        overflow: hidden;
    }
    
    .risk-percentage {
        white-space: nowrap;
    }
}
