*{
  margin:0;
  padding:0;
  box-sizing:border-box;
  font-family:Poppins,sans-serif;
}

/* ========= Splash Screen ========= */
.splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, #07111f 0%, #0f172a 50%, #07111f 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.splash-screen.fade-out {
  opacity: 0;
  transform: scale(1.05);
  pointer-events: none;
}

.splash-logo {
  width: 220px;
  height: auto;
  animation: splashPulse 1.2s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 30px rgba(59, 130, 246, 0.4));
}

@keyframes splashPulse {
  0% {
    transform: scale(0.95);
    filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.3));
  }
  100% {
    transform: scale(1.05);
    filter: drop-shadow(0 0 40px rgba(124, 58, 237, 0.5));
  }
}

/* ========= Sidebar Logo ========= */
.logo {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 40px;
}

.logo img {
  height: 38px;
  width: auto;
  filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.3));
}

.logo span {
  font-size: 24px;
  font-weight: bold;
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body{
  background:#07111f;
  color:white;
}

.container{
  display:flex;
}

.sidebar{
  width:260px;
  min-height:100vh;
  background:#0f172a;
  padding:30px 20px;
  position:fixed;
}


.menu{
  display:flex;
  flex-direction:column;
  gap:15px;
}

.menu a{
  padding:15px;
  border-radius:14px;
  color:#cbd5e1;
  cursor:pointer;
  transition:0.3s;
}

.menu a:hover{
  background:#1e293b;
  transform:translateX(5px);
}

.active{
  background:linear-gradient(to right,#2563eb,#7c3aed);
  color:white !important;
}

.main{
  margin-left:260px;
  width:100%;
  padding:30px;
}

.topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:30px;
}

.topbar h1{
  font-size:36px;
}

.topbar p{
  color:#94a3b8;
  margin-top:5px;
}

.btn{
  padding:14px 22px;
  border:none;
  border-radius:14px;
  background:linear-gradient(to right,#2563eb,#7c3aed);
  color:white;
  cursor:pointer;
  transition:0.3s;
}

.btn:hover{
  transform:scale(1.05);
}

.cards{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:20px;
}

.card{
  background:#111c2d;
  padding:30px;
  border-radius:24px;
  transition:0.3s;
}

.card:hover{
  transform:translateY(-6px);
}

.card h2{
  color:#94a3b8;
  margin-bottom:12px;
  font-size:16px;
}

.card p{
  font-size:34px;
  font-weight:bold;
}

.box{
  background:#111c2d;
  padding:30px;
  border-radius:24px;
}

.upload-area{
  border:2px dashed #334155;
  border-radius:20px;
  padding:50px;
  text-align:center;
}

.upload-area p{
  margin:15px 0;
  color:#94a3b8;
}

.preview{
  display:none;
  margin-top:20px;
}

.preview img{
  width:100%;
  max-width:350px;
  border-radius:20px;
}

.gallery-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:20px;
}

.gallery-grid img{
  width:100%;
  border-radius:20px;
  transition:0.3s;
}

.gallery-grid img:hover{
  transform:scale(1.05);
}

.gallery-card:hover{
  transform:translateY(-4px);
  box-shadow:0 8px 25px rgba(59,130,246,0.3);
  border-color:#3b82f6 !important;
}

.activity{
  display:flex;
  flex-direction:column;
  gap:20px;
}

.activity-item{
  background:#111c2d;
  padding:20px;
  border-radius:18px;
}

.activity-item p{
  color:#94a3b8;
  margin-top:6px;
}

.screen{
  display:none;
  animation:fade 0.5s ease;
}

.active-screen{
  display:block;
}

@keyframes fade{

  from{
    opacity:0;
    transform:translateY(20px);
  }

  to{
    opacity:1;
    transform:translateY(0);
  }

}

@media(max-width:900px){

  .container{
    flex-direction:column;
  }

  .sidebar{
    position:relative;
    width:100%;
    min-height:auto;
  }

  .main{
    margin-left:0;
  }

}

/* Loading Spinner */
.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #1e293b;
  border-top: 4px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Analysis Result Card */
.result-card {
  background: #111c2d;
  border-radius: 20px;
  padding: 24px;
  border: 1px solid #1e293b;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.result-label {
  font-size: 13px;
  color: #94a3b8;
  font-weight: 600;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: bold;
  text-transform: uppercase;
}

.status-badge.diseased {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-badge.healthy {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Form Controls */
.form-group {
  text-align: left;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 12px;
  color: white;
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s;
}

.form-control:focus {
  border-color: #3b82f6;
}

select.form-control option {
  background: #0f172a;
}

/* ========= Light Theme Overrides ========= */
body.light-theme {
  background: #f8fafc;
  color: #0f172a;
}

body.light-theme .sidebar {
  background: #ffffff;
  border-right: 1px solid #e2e8f0;
}

body.light-theme .logo span {
  background: linear-gradient(135deg, #1e3a8a, #7c3aed);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.light-theme .menu a {
  color: #475569;
}

body.light-theme .menu a:hover {
  background: #f1f5f9;
  color: #0f172a;
}

body.light-theme .card,
body.light-theme .box,
body.light-theme .activity-item,
body.light-theme .result-card,
body.light-theme #galleryDetailModal > div,
body.light-theme .modal-content {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}

body.light-theme .card h2 {
  color: #64748b;
}

body.light-theme .topbar p,
body.light-theme .upload-area p,
body.light-theme .activity-item p,
body.light-theme .result-label {
  color: #475569;
}

body.light-theme .upload-area {
  border-color: #cbd5e1;
  background: #f8fafc;
}

body.light-theme .form-control {
  background: #ffffff;
  color: #0f172a;
  border-color: #cbd5e1;
}

body.light-theme .form-control::placeholder {
  color: #94a3b8;
}

body.light-theme select.form-control option {
  background: #ffffff;
  color: #0f172a;
}

body.light-theme #vetHospitalContainer {
  border-top-color: #e2e8f0;
}

body.light-theme #vetHospitalList div {
  background: #f8fafc;
  border-color: #e2e8f0;
}

body.light-theme table,
body.light-theme th,
body.light-theme td {
  border-color: #e2e8f0;
}

body.light-theme th {
  background: #f1f5f9;
  color: #334155;
}

body.light-theme #galleryDetailModal {
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
}