/* Reset and Base Styles */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #e0edff 0%, #f0f4ff 40%, #dbeafe 70%, #eff6ff 100%);
    color: #1e293b;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background decorations */
.bg-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.12;
}

.bg-circle-1 {
    width: 400px;
    height: 400px;
    background: #3b82f6;
    top: -100px;
    right: -80px;
    animation: floatSlow 20s ease-in-out infinite;
}

.bg-circle-2 {
    width: 250px;
    height: 250px;
    background: #60a5fa;
    bottom: 10%;
    left: -60px;
    animation: floatSlow 16s ease-in-out infinite reverse;
}

.bg-circle-3 {
    width: 180px;
    height: 180px;
    background: #93c5fd;
    top: 50%;
    right: 15%;
    animation: floatSlow 22s ease-in-out infinite 4s;
}

@keyframes floatSlow {
    0%, 100% { transform: translateY(0) scale(1); }
    50%      { transform: translateY(-30px) scale(1.05); }
}

/* Container styling */
.container {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px 30px;
}

/* Header section */
.header {
    text-align: center;
    margin-bottom: 32px;
}

.header-icon {
    font-size: 48px;
    margin-bottom: 8px;
    animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
    0%   { transform: scale(0.5); opacity: 0; }
    70%  { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1e40af;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 1rem;
    color: #64748b;
    margin-top: 4px;
    font-weight: 400;
}

/* Card layout */
.card {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    padding: 28px 28px;
    box-shadow: 0 4px 24px rgba(37, 99, 235, 0.08),
                0 1px 4px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 32px rgba(37, 99, 235, 0.13),
                0 2px 8px rgba(0, 0, 0, 0.06);
}

.form-card {
    margin-bottom: 24px;
}

.card-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #1e3a5f;
    margin-bottom: 20px;
    text-align: center;
}

/* Grid layout for form fields */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
}

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

.form-group label {
    font-size: 0.82rem;
    font-weight: 500;
    color: #475569;
    margin-bottom: 5px;
}

.form-group input {
    padding: 10px 14px;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    color: #1e293b;
    background: rgba(255, 255, 255, 0.85);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    outline: none;
}

.form-group input::placeholder {
    color: #94a3b8;
}

.form-group input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-group input.input-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

/* Buttons styling */
.button-group {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    justify-content: center;
}

.btn {
    padding: 12px 36px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.25s ease;
}

.btn:active {
    transform: scale(0.97);
}

.btn-predict {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #fff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
    min-width: 180px;
}

.btn-predict:hover:not(:disabled) {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
    transform: translateY(-1px);
}

.btn-predict:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-reset {
    background: rgba(255, 255, 255, 0.7);
    color: #475569;
    border: 1.5px solid #cbd5e1;
}

.btn-reset:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2.5px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Prediction results styling */
.result-card {
    margin-bottom: 24px;
    text-align: center;
    animation: fadeSlideUp 0.4s ease-out;
}

@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.result-diabetic {
    border-left: 5px solid #ef4444;
}

.result-nondiabetic {
    border-left: 5px solid #22c55e;
}

.result-icon {
    font-size: 40px;
    margin-bottom: 8px;
}

.result-text {
    font-size: 1.4rem;
    font-weight: 700;
}

.result-diabetic .result-text {
    color: #dc2626;
}

.result-nondiabetic .result-text {
    color: #16a34a;
}

.result-sub {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 4px;
}

/* Info cards section */
.info-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 28px;
}

.info-card {
    text-align: center;
    padding: 20px 14px;
}

.info-icon {
    font-size: 26px;
    margin-bottom: 6px;
}

.info-label {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.info-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e3a5f;
    margin-top: 2px;
}

/* Footer section */
.footer {
    text-align: center;
    padding-top: 8px;
    font-size: 0.82rem;
    color: #64748b;
}

.footer strong {
    color: #1e40af;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .container {
        padding: 24px 12px 20px;
    }

    .header h1 {
        font-size: 1.5rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .info-row {
        grid-template-columns: 1fr;
    }

    .button-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}
