/* 
=========================================
  ADVANCED NEUROMIND UI STYLESHEET
=========================================
*/

:root {
    /* Deep Cyberpunk Color Palette - Brightened Edge Blues */
    --bg-core: #0a0f1d;
    --bg-accent: #151e32;
    --neon-blue: #40f8ff;
    --neon-purple: #9d4edd;
    --neon-pink: #ff2aee;
    --glass-bg: rgba(16, 24, 45, 0.6);
    --glass-border: rgba(0, 240, 255, 0.3);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background: radial-gradient(circle at 50% 0%, var(--bg-accent), var(--bg-core) 70%);
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* =========================================
   BACKGROUND ANIMATIONS & MESH GRIDS
========================================= */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200vw;
    height: 200vh;
    background-image:
        linear-gradient(rgba(0, 240, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.1) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: -2;
    transform: perspective(600px) rotateX(60deg) translateY(-100px) translateZ(-200px);
    animation: gridMove 15s linear infinite;
    pointer-events: none;
}

@keyframes gridMove {
    0% {
        transform: perspective(600px) rotateX(60deg) translateY(0) translateZ(-200px);
    }

    100% {
        transform: perspective(600px) rotateX(60deg) translateY(60px) translateZ(-200px);
    }
}

.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

/* Starfield Background */
.stars-layer {
    position: absolute;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: -3;
    pointer-events: none;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #eee, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 40px 70px, #fff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 50px 160px, rgba(255,255,255,0.5), rgba(0,0,0,0)),
        radial-gradient(2px 2px at 90px 40px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 130px 80px, var(--neon-blue), rgba(0,0,0,0)),
        radial-gradient(1px 1px at 160px 120px, rgba(255,255,255,0.8), rgba(0,0,0,0)),
        radial-gradient(2px 2px at 180px 190px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 210px 60px, var(--neon-purple), rgba(0,0,0,0)),
        radial-gradient(1px 1px at 250px 250px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 280px 10px, #fff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 300px 140px, rgba(255,255,255,0.7), rgba(0,0,0,0)),
        radial-gradient(2px 2px at 340px 90px, var(--neon-blue), rgba(0,0,0,0)),
        radial-gradient(1px 1px at 380px 230px, #fff, rgba(0,0,0,0));
    background-size: 400px 400px;
    animation: starTwinkle 4s ease-in-out infinite alternate;
}

@keyframes starTwinkle {
    0% { opacity: 0.3; }
    100% { opacity: 1; }
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.35;
    animation: float 25s ease-in-out infinite alternate;
}

.blob-1 {
    width: 45vw;
    height: 45vw;
    background: radial-gradient(circle, var(--neon-blue), transparent 70%);
    top: -15%;
    left: -10%;
}

.blob-2 {
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--neon-purple), transparent 70%);
    bottom: -20%;
    right: -15%;
    animation-delay: -5s;
}

.blob-3 {
    width: 35vw;
    height: 35vw;
    background: radial-gradient(circle, var(--neon-pink), transparent 70%);
    top: 40%;
    left: 35%;
    animation-duration: 30s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(60px, 30px) scale(1.1);
    }

    100% {
        transform: translate(-40px, 80px) scale(0.9);
    }
}

/* Spaceship Animation */
.spaceship {
    position: absolute;
    color: var(--neon-blue);
    font-size: 2.5rem;
    filter: drop-shadow(0 0 15px rgba(0, 240, 255, 0.8));
    animation: flySpaceship 30s linear infinite;
    z-index: 10;
    pointer-events: none;
    opacity: 0.8;
}

@keyframes flySpaceship {
    0% {
        transform: translate(-10vw, 80vh) rotate(45deg);
    }
    
    100% {
        transform: translate(110vw, -20vh) rotate(45deg);
    }
}

/* =========================================
   CONTAINER & HEADER
========================================= */
.container {
    width: 100%;
    max-width: 950px;
    padding: 3rem 2rem;
    z-index: 10;
    position: relative;
    animation: fadeIn 1s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.header {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
}

.title {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 0.8rem;
    background: linear-gradient(to right, #fff, var(--neon-blue), var(--neon-purple));
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textGradientPulse 5s reverse infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    text-shadow: 0 0 30px rgba(0, 240, 255, 0.4);
}

@keyframes textGradientPulse {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.ai-badge {
    font-size: 1.2rem;
    font-weight: 800;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid var(--neon-blue);
    padding: 0.3rem 0.8rem;
    border-radius: 8px;
    -webkit-text-fill-color: var(--neon-blue);
    vertical-align: middle;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.3), inset 0 0 8px rgba(0, 240, 255, 0.2);
    text-shadow: none;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.25rem;
    letter-spacing: 1px;
}

/* =========================================
   ADVANCED GLASS CARD CHASSIS
========================================= */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    border-radius: 28px;
    padding: 3.5rem;
    box-shadow: 0 30px 60px -10px rgba(0, 0, 0, 0.8),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Conic Gradient Animated Border Effect using Pseudo-element */
.glass-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 28px;
    padding: 2px;
    /* border thickness */
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.8) 0%, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, 0) 60%, rgba(138, 43, 226, 0.7) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* =========================================
   UPLOAD INTERFACE
========================================= */
.upload-container {
    position: relative;
}

.upload-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 3px dashed rgba(0, 240, 255, 0.6);
    border-radius: 20px;
    padding: 5rem 2rem;
    cursor: pointer;
    transition: all 0.4s ease;
    background: rgba(0, 240, 255, 0.05);
    position: relative;
    box-shadow: inset 0 0 15px rgba(0, 240, 255, 0.1);
}

.upload-state:hover,
.upload-state.drag-over {
    border-color: var(--neon-blue);
    background: rgba(0, 240, 255, 0.08);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.15), inset 0 0 20px rgba(0, 240, 255, 0.1);
    transform: scale(1.01);
}

.upload-icon-wrapper {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(138, 43, 226, 0.2));
    border: 1px solid rgba(0, 240, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    color: var(--neon-blue);
    font-size: 3rem;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
}

.upload-state:hover .upload-icon-wrapper {
    transform: scale(1.15) rotate(5deg);
    color: #fff;
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.6);
}

.upload-state h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
    color: white;
}

.upload-state p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.file-info {
    font-size: 0.9rem;
    color: #475569;
    background: #0f172a;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    border: 1px solid #1e293b;
}

/* =========================================
   PREVIEW & BUTTONS
========================================= */
.preview-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
}

.preview-state img {
    max-width: 100%;
    max-height: 380px;
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 240, 255, 0.2);
    border: 2px solid rgba(0, 240, 255, 0.3);
}

.action-buttons {
    display: flex;
    gap: 1.5rem;
}

.btn {
    padding: 1rem 2.2rem;
    border-radius: 12px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: none;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s ease;
    z-index: -1;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
    color: #fff;
    box-shadow: 0 10px 25px rgba(138, 43, 226, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(0, 240, 255, 0.6);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.3);
}

/* =========================================
   LOADING SCANNER ANIMATION
========================================= */
.loading-state {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
}

.loading-state img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 16px;
    filter: brightness(0.4) saturate(1.5) sepia(0.5) hue-rotate(180deg);
}

.scanner-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: #00f0ff;
    box-shadow: 0 0 25px 8px rgba(0, 240, 255, 0.7), 0 0 50px rgba(0, 240, 255, 0.5);
    animation: advancedScan 2.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    z-index: 5;
    border-radius: 6px;
}

@keyframes advancedScan {
    0% {
        top: 5%;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    50% {
        filter: brightness(1.5);
    }

    90% {
        opacity: 1;
    }

    100% {
        top: 95%;
        opacity: 0;
    }
}

.pulse-text {
    font-family: var(--font-heading);
    color: var(--neon-blue);
    font-size: 1.4rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: textPulse 1.5s infinite alternate;
    text-shadow: 0 0 15px rgba(0, 240, 255, 0.5);
}

@keyframes textPulse {
    0% {
        opacity: 0.4;
    }

    100% {
        opacity: 1;
    }
}

/* =========================================
   RESULT CARD
========================================= */
.result-container {
    margin-top: 3rem;
    animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }

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

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.result-header h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.btn-icon {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    color: white;
    background: rgba(244, 63, 94, 0.2);
    border-color: rgba(244, 63, 94, 0.5);
    box-shadow: 0 0 15px rgba(244, 63, 94, 0.4);
    transform: rotate(90deg);
}

.diagnosis-box {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2.5rem;
    border-radius: 20px;
    margin-bottom: 2.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.diagnosis-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
}

.diagnosis-box.danger::before {
    background: var(--neon-pink);
    box-shadow: 0 0 20px var(--neon-pink);
}

.diagnosis-box.success::before {
    background: var(--neon-blue);
    box-shadow: 0 0 20px var(--neon-blue);
}

.status-icon {
    font-size: 3.5rem;
}

.danger .status-icon {
    color: var(--neon-pink);
    text-shadow: 0 0 25px rgba(248, 28, 229, 0.6);
}

.success .status-icon {
    color: var(--neon-blue);
    text-shadow: 0 0 25px rgba(0, 240, 255, 0.6);
}

.diagnosis-box h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
}

.danger h2 {
    color: #fecdd3;
    text-shadow: 0 0 15px rgba(248, 28, 229, 0.4);
}

.success h2 {
    color: #ccfbf1;
    text-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
}

.confidence-section {
    margin-bottom: 3rem;
}

.confidence-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-main);
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
}

.progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 6px;
    transition: width 1.5s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    animation: flowLight 2s infinite;
}

@keyframes flowLight {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.danger .progress-fill {
    background: linear-gradient(90deg, #e11d48, var(--neon-pink));
    box-shadow: 0 0 20px var(--neon-pink);
}

.success .progress-fill {
    background: linear-gradient(90deg, #059669, var(--neon-blue));
    box-shadow: 0 0 20px var(--neon-blue);
}

.info-note {
    display: flex;
    gap: 1.2rem;
    padding: 1.5rem;
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 16px;
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.6;
}

.info-note i {
    color: var(--neon-blue);
    font-size: 1.5rem;
    margin-top: 0.1rem;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

.hidden {
    display: none !important;
}

/* =========================================
   TEAM SECTION (SEMESTER 4 PROJECT)
========================================= */
.team-section {
    margin-top: 5rem;
    text-align: center;
    position: relative;
    z-index: 10;
}

.team-block-gradient {
    /* Rich multidimensional gradient background */
    background: linear-gradient(145deg, rgba(0, 240, 255, 0.15) 0%, rgba(138, 43, 226, 0.1) 40%, rgba(248, 28, 229, 0.15) 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 30px;
    padding: 4rem 2rem;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    transition: all 0.6s cubic-bezier(0.19, 1, 0.22, 1);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(138, 43, 226, 0.2),
        inset 0 0 30px rgba(0, 240, 255, 0.1);
}

.team-block-gradient:hover {
    transform: translateY(-8px);
    box-shadow: 0 40px 70px rgba(0, 0, 0, 0.8),
        0 0 60px rgba(138, 43, 226, 0.5),
        inset 0 0 40px rgba(0, 240, 255, 0.3);
    border-color: rgba(0, 240, 255, 0.5);
}

/* Dynamic rotating background flare */
.team-block-gradient::before {
    content: '';
    position: absolute;
    top: -200%;
    left: -200%;
    width: 500%;
    height: 500%;
    background: conic-gradient(from 0deg, transparent 0deg, rgba(0, 240, 255, 0.1) 90deg, transparent 180deg);
    animation: rotateFlare 10s linear infinite;
    pointer-events: none;
}

@keyframes rotateFlare {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.team-block-header h3 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    margin-bottom: 3.5rem;
    text-align: center;
    background: linear-gradient(to right, #ffffff, #00f0ff, #8a2be2);
    background-size: 200%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 4px;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
    animation: textGradientPulse 4s infinite alternate;
}

.team-members {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.member {
    display: flex;
    align-items: center;
    gap: 1.8rem;
    transition: transform 0.4s ease;
}

.member:hover {
    transform: translateY(-5px);
}

.member i {
    font-size: 4rem;
    background: linear-gradient(135deg, #00f0ff, #f81ce5);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 20px rgba(248, 28, 229, 0.6));
    transition: filter 0.4s ease;
}

.member:hover i {
    filter: drop-shadow(0 0 30px rgba(0, 240, 255, 0.8));
}

.member-info {
    text-align: left;
}

.member-info h4 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: white;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.3);
}

.member-info span {
    font-family: monospace;
    font-size: 1.15rem;
    color: #facc15;
    text-shadow: 0 0 10px rgba(250, 204, 21, 0.6);
    background: rgba(255, 255, 255, 0.08);
    padding: 0.4rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(250, 204, 21, 0.4);
    transition: all 0.4s ease;
    display: inline-block;
}

.member:hover .member-info span {
    background: rgba(250, 204, 21, 0.15);
    box-shadow: 0 0 20px rgba(250, 204, 21, 0.4);
    transform: scale(1.05);
}

.member-divider {
    width: 2px;
    height: 90px;
    background: linear-gradient(to bottom, transparent, rgba(0, 240, 255, 0.5), transparent);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.8);
}

/* =========================================
   RESPONSIVE DESIGN
========================================= */
@media (max-width: 850px) {
    .team-members {
        flex-direction: column;
        gap: 3rem;
    }

    .member-divider {
        width: 80%;
        height: 2px;
        background: linear-gradient(to right, transparent, rgba(0, 240, 255, 0.5), transparent);
    }
}

@media (max-width: 640px) {
    .title {
        font-size: 2.8rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .action-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .glass-card {
        padding: 2rem;
    }
}