/* Glucose ML Page Styles */

/* Page Background */
body {
    background: radial-gradient(rgb(74, 138, 74) 30%, rgb(0, 61, 0) 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

/* Home Dot Button */
.home-dot {
    position: fixed;
    top: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.home-dot:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(16, 185, 129, 0.6);
}

.dot-pulse {
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    position: relative;
}

.dot-pulse::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 50%;
    animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.ml-hero {
    font-family: monospace;
    background: radial-gradient(rgb(74, 138, 74) 30%, rgb(0, 61, 0) 100%);
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    color: white;
}

.ml-hero-content {
    
    text-align: center;
    max-width: 800px;
    padding: 2rem;
}

.ml-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.ml-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.ml-subtitle {
    font-size: 1.3rem;
    opacity: 0.95;
    line-height: 1.6;
}

/* Predictor Section */
.ml-predictor-section {
    padding: 4rem 2rem;
    background: radial-gradient(rgb(74, 138, 74) 30%, rgb(0, 61, 0) 100%);
}

.ml-predictor-section .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.ml-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 5rem;
}

/* Input Card */
.ml-input-card {
    font-family: monospace;
    background: radial-gradient(#a9b8ff 0%, #0026ff 100%);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(169, 184, 255, 0.5);
    position: relative;
    overflow: hidden;
}

.ml-input-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 182, 182, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(204, 123, 241, 0.3) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.ml-input-card > * {
    position: relative;
    z-index: 1;
}

.ml-input-card h2 {
    font-size: 1.8rem;
    margin-bottom: 2.5rem;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.input-section {
    margin-bottom: 2rem;
}

.input-section h3 {
    font-size: 1.2rem;
    color: #ffffff;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.input-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.input-group input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.ml-predict-button {
    font-family: monospace;
    font-style:bold;
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.1s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.ml-predict-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

/* Results Card */
.ml-results-card {
    background: radial-gradient(#a9b8ff 0%, #0026ff 100%);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(169, 184, 255, 0.5);
    position: relative;
    overflow: hidden;
}

.ml-results-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 182, 182, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(204, 123, 241, 0.3) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.ml-results-card > * {
    position: relative;
    z-index: 1;
}

.ml-results-card h2 {
    text-align: center;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-decoration-style: wavy;
    text-underline-offset: 4px;
    font-family: monospace;
    font-weight: 800;
    font-size: 1.8rem;
    margin-bottom: 2.5rem;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.ml-placeholder {
    font-family: monospace;
    text-align: center;
    padding: 4rem 2rem;
    color: rgba(255, 255, 255, 0.9);
}

.ml-placeholder-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.7;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.ml-placeholder p {
    font-size: 1.1rem;
    line-height: 1.6;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Results Display */
.ml-results-content {
    min-height: 400px;
}

.ml-prediction-result {
    animation: fadeIn 2s ease;
}

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

.prediction-stat {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid #10b981;
}

.stat-label {
    font-size: 0.9rem;
    color: #718096;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: #10b981;
    margin-bottom: 0.25rem;
}

.stat-description {
    font-size: 0.95rem;
    color: #4a5568;
    line-height: 1.5;
}

.confidence-bar {
    margin-top: 1rem;
}

.confidence-bar-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #4a5568;
}

.confidence-track {
    background: #e2e8f0;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.confidence-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    transition: width 0.5s ease;
    border-radius: 4px;
}

/* Info Section */
.ml-info-section {
    margin-bottom: 5rem;
    padding: 0 2rem;
}

.ml-info-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3.5rem;
    color: #2d3748;
}

.ml-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
}

.ml-info-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.ml-info-card:hover {
    transform: translateY(-5px);
}

.ml-info-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.ml-info-card h3 {
    font-size: 1.3rem;
    color: #10b981;
    margin-bottom: 1rem;
}

.ml-info-card p {
    color: #4a5568;
    line-height: 1.6;
}

/* Dataset Section */
.ml-dataset-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 4rem;
    border: 2px solid rgba(74, 138, 74, 0.3);
}

.ml-dataset-section h2 {
    font-family: monospace;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #00461d;
}

.dataset-intro {
    color: #718096;
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
}

.dataset-table-container {
    overflow-x: auto;
}

.dataset-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.dataset-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.dataset-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.dataset-table tbody tr {
    border-bottom: 1px solid #e2e8f0;
    transition: background 0.2s ease;
}

.dataset-table tbody tr:hover {
    background: #f7fafc;
}

.dataset-table td {
    padding: 1rem;
    color: #4a5568;
}

/* Responsive */
@media (max-width: 968px) {
    .home-dot {
        top: 1.5rem;
        right: 1.5rem;
        width: 45px;
        height: 45px;
    }
    
    .ml-hero {
        padding: 3rem 1.5rem;
    }
    
    .ml-predictor-section {
        padding: 3rem 1rem;
    }
    
    .ml-predictor-section .container {
        padding: 0 1rem;
    }
    
    .ml-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-bottom: 3rem;
    }
    
    .ml-title {
        font-size: 2.5rem;
    }
    
    .ml-input-card,
    .ml-results-card {
        padding: 2rem;
    }
    
    .ml-info-section {
        padding: 0 1rem;
        margin-bottom: 3rem;
    }
    
    .ml-info-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .ml-info-card {
        padding: 2rem;
    }
    
    .ml-dataset-section {
        padding: 2rem;
        margin-bottom: 3rem;
    }
}
