* { margin:0; padding:0; box-sizing:border-box; font-family:'Segoe UI', Roboto, sans-serif; }

body {
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: rgba(255,255,255,0.07);
    backdrop-filter: blur(15px);
    border-radius: 40px;
    padding: 40px 50px;
    max-width: 850px;
    width: 100%;
    box-shadow: 0 30px 60px rgba(0,0,0,0.8);
    border: 1px solid rgba(255,255,255,0.08);
    color: #fff;
    transition: 0.3s;
}

h1 {
    font-size: 2.8rem;
    font-weight: 300;
    letter-spacing: 2px;
    background: linear-gradient(90deg, #f7971e, #ffd200);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 5px;
}

.sub {
    opacity: 0.7;
    font-size: 1rem;
    margin-bottom: 30px;
}

.upload-area {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

#fileInput { display: none; }
#fileLabel {
    background: rgba(255,255,255,0.1);
    padding: 12px 25px;
    border-radius: 50px;
    cursor: pointer;
    border: 2px dashed rgba(255,255,255,0.2);
    transition: 0.3s;
    font-weight: 500;
}
#fileLabel:hover { background: rgba(255,255,255,0.18); border-color: #f7971e; }

.eye-select {
    background: rgba(255,255,255,0.05);
    padding: 8px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.eye-select select {
    background: transparent;
    border: 1px solid #f7971e;
    color: #fff;
    padding: 6px 12px;
    border-radius: 30px;
    outline: none;
    font-size: 1rem;
}
.eye-select select option { background: #1a1a2e; }

#uploadBtn {
    background: linear-gradient(135deg, #f7971e, #ffd200);
    border: none;
    padding: 12px 35px;
    border-radius: 50px;
    color: #111;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 5px 20px rgba(247, 151, 30, 0.4);
}
#uploadBtn:hover { transform: scale(1.05); box-shadow: 0 8px 30px rgba(247, 151, 30, 0.7); }
#uploadBtn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

#preview { max-width: 100%; max-height: 300px; border-radius: 20px; margin-top: 15px; border: 2px solid rgba(255,255,255,0.15); }

#result {
    margin-top: 25px;
    background: rgba(255,255,255,0.03);
    padding: 25px;
    border-radius: 30px;
    border-left: 4px solid #f7971e;
    animation: fadeIn 0.6s ease;
}
@keyframes fadeIn { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }

#diagnosis-text {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 10px 0;
    color: #ffd200;
}

.stats {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 15px 0;
    font-size: 1.1rem;
}
.stats b { color: #77ff88; }

.sector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px,1fr));
    gap: 10px;
    margin: 15px 0;
}
.sector-item {
    background: rgba(255,255,255,0.05);
    padding: 8px 12px;
    border-radius: 12px;
    text-align: center;
    border-bottom: 3px solid #555;
}
.sector-item .name { font-size: 0.8rem; opacity: 0.7; }
.sector-item .risk { font-weight: bold; font-size: 1.2rem; }
.risk-low { color: #77ff88; }
.risk-mid { color: #ffaa44; }
.risk-high { color: #ff4466; }

.note { margin-top: 20px; font-size: 0.8rem; opacity: 0.5; }

@media (max-width: 600px) {
    .container { padding: 20px; }
    h1 { font-size: 2rem; }
}