/* Enhanced Display Mode Styles - Smooth & Optimized */

/* Force hardware acceleration */
* {
  -webkit-transform: translateZ(0);
  -moz-transform: translateZ(0);
  -ms-transform: translateZ(0);
  -o-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-perspective: 1000;
  perspective: 1000;
}

/* Smooth animated gradient background */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

body {
  background: linear-gradient(
    -45deg,
    #0b1021,
    #1a1f3a,
    #0c1633,
    #1b2a6b
  );
  background-size: 400% 400%;
  animation: gradientShift 20s ease-in-out infinite;
  will-change: background-position;
}

/* Optimized particles - reduced complexity */
.particle {
  will-change: transform, opacity;
  filter: blur(0.5px);
  box-shadow: 0 0 10px currentColor;
}

.particle:nth-child(odd) {
  background: radial-gradient(circle, rgba(47, 107, 255, 0.6), transparent);
}

.particle:nth-child(even) {
  background: radial-gradient(circle, rgba(32, 201, 151, 0.6), transparent);
}

/* Simplified floating animation */
@keyframes float-smooth {
  0% {
    transform: translateY(100vh) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
    transform: translateY(90vh) scale(1);
  }
  90% {
    opacity: 0.8;
    transform: translateY(10vh) scale(1);
  }
  100% {
    transform: translateY(-10vh) scale(0);
    opacity: 0;
  }
}

.particle {
  animation: float-smooth 25s infinite linear;
}

/* Stagger particle animations - reduced count */
.particle:nth-child(1) { animation-delay: 0s; animation-duration: 20s; }
.particle:nth-child(2) { animation-delay: 2s; animation-duration: 22s; }
.particle:nth-child(3) { animation-delay: 4s; animation-duration: 24s; }
.particle:nth-child(4) { animation-delay: 6s; animation-duration: 26s; }
.particle:nth-child(5) { animation-delay: 8s; animation-duration: 28s; }
.particle:nth-child(6) { animation-delay: 10s; animation-duration: 23s; }
.particle:nth-child(7) { animation-delay: 12s; animation-duration: 25s; }
.particle:nth-child(8) { animation-delay: 14s; animation-duration: 27s; }
.particle:nth-child(9) { animation-delay: 16s; animation-duration: 21s; }
.particle:nth-child(10) { animation-delay: 18s; animation-duration: 29s; }

/* Simplified clock with smooth glow */
.clock {
  position: relative;
  filter: drop-shadow(0 0 20px rgba(47, 107, 255, 0.4));
  will-change: filter;
}

.clock-face {
  background: radial-gradient(circle at 50% 40%, #1e2a5e, #0e1431 65%);
  box-shadow: 
    inset 0 0 0 2px rgba(255,255,255,0.1),
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(47, 107, 255, 0.2);
  position: relative;
  overflow: hidden;
  will-change: transform;
}

/* Simplified rotating glow - slower */
.clock-face::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(47, 107, 255, 0.2) 90deg,
    transparent 180deg
  );
  animation: rotateGlow 12s linear infinite;
  pointer-events: none;
  will-change: transform;
}

@keyframes rotateGlow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Simplified title with smooth gradient */
.page-title {
  background: linear-gradient(
    135deg,
    #ffffff,
    #5b8cff,
    #2f6bff,
    #ffffff
  );
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientText 8s ease-in-out infinite;
  will-change: background-position;
}

@keyframes gradientText {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Smooth card entrance animation */
@keyframes cardSlideIn {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  animation: cardSlideIn 0.6s ease-out forwards;
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.05),
    rgba(255,255,255,0.02)
  );
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(47, 107, 255, 0.1);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  will-change: transform, box-shadow;
}

.card-left {
  animation-delay: 0.1s;
}

.card-right {
  animation-delay: 0.2s;
}

/* Simplified card hover */
.card:hover {
  transform: translateY(-3px);
  box-shadow: 
    0 25px 70px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(47, 107, 255, 0.2);
}

/* Enhanced card header */
.card-header {
  background: linear-gradient(
    135deg,
    rgba(25, 50, 168, 0.8),
    rgba(18, 42, 153, 0.9)
  );
  position: relative;
  overflow: hidden;
}

.card-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Simplified row animation */
@keyframes rowSlideIn {
  0% {
    opacity: 0;
    transform: translateX(-20px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.row {
  animation: rowSlideIn 0.4s ease-out forwards;
  transition: background-color 0.2s ease;
  will-change: transform, background-color;
}

/* Stagger row animations */
.row:nth-child(1) { animation-delay: 0.05s; }
.row:nth-child(2) { animation-delay: 0.1s; }
.row:nth-child(3) { animation-delay: 0.15s; }
.row:nth-child(4) { animation-delay: 0.2s; }
.row:nth-child(5) { animation-delay: 0.25s; }

.row:hover {
  background: rgba(47, 107, 255, 0.05) !important;
}

/* Simplified badges - smooth only */
.badge {
  position: relative;
  width: 160px;
  min-width: 160px;
  max-width: 160px;
  text-align: center;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  will-change: transform;
}

/* Success badge */
.badge.success {
  box-shadow: 
    inset 0 0 0 2px rgba(32,201,151,.35),
    0 0 15px rgba(32, 201, 151, 0.2);
}

/* Warning badge */
.badge.warning {
  box-shadow: 
    inset 0 0 0 2px rgba(255,193,7,.35),
    0 0 15px rgba(255, 193, 7, 0.2);
}

/* Danger badge */
.badge.danger {
  box-shadow: 
    inset 0 0 0 2px rgba(255,92,92,.35),
    0 0 15px rgba(255, 92, 92, 0.2);
}

/* Simplified loading animation */
@keyframes gear-spin-smooth {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.badge.loading::after {
  animation: gear-spin-smooth 2s linear infinite;
}

/* Smooth status change animations */
@keyframes status-bump-smooth {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

@keyframes status-glow-success {
  0% { box-shadow: 0 0 0 0 rgba(32,201,151,.6); }
  100% { box-shadow: 0 0 0 15px rgba(32,201,151,0); }
}

@keyframes status-glow-warning {
  0% { box-shadow: 0 0 0 0 rgba(255,193,7,.6); }
  100% { box-shadow: 0 0 0 15px rgba(255,193,7,0); }
}

@keyframes status-glow-danger {
  0% { box-shadow: 0 0 0 0 rgba(255,92,92,.6); }
  100% { box-shadow: 0 0 0 15px rgba(255,92,92,0); }
}

.badge.anim-success {
  animation: status-bump-smooth .4s ease, status-glow-success .8s ease;
}

.badge.anim-warning {
  animation: status-bump-smooth .4s ease, status-glow-warning .8s ease;
}

.badge.anim-danger {
  animation: status-bump-smooth .4s ease, status-glow-danger .8s ease;
}

/* Simplified login button */
.login-btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  will-change: transform, box-shadow;
}

.login-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 
    0 6px 20px rgba(47, 107, 255, 0.5),
    0 0 30px rgba(47, 107, 255, 0.3);
}

/* Remove complex animations */
.date-text {
  opacity: 0.85;
}

/* Simplified card header */
.card-header {
  background: linear-gradient(
    135deg,
    rgba(25, 50, 168, 0.8),
    rgba(18, 42, 153, 0.9)
  );
  position: relative;
  overflow: hidden;
}

/* Simplified card footer */
.card-footer {
  position: relative;
  overflow: hidden;
}

/* Responsive - disable heavy animations on mobile */
@media (max-width: 768px) {
  .card:hover {
    transform: none;
  }
  
  .row:hover {
    transform: none;
  }
  
  /* Disable particle animations on mobile */
  .particle {
    animation: none;
    opacity: 0.3;
  }
}

/* Fullscreen mode - keep simple */
body.fullscreen .card {
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 30px rgba(47, 107, 255, 0.15);
}

/* Portrait mode - simplified */
@media (orientation: portrait) {
  .card {
    animation-duration: 0.5s;
  }
  
  .row {
    animation-duration: 0.3s;
  }
}

/* Low performance mode - disable heavy animations */
body.low-performance * {
  animation: none !important;
  transition: none !important;
}

body.low-performance .particle {
  display: none;
}

body.low-performance .clock-face::after {
  display: none;
}

body.low-performance body {
  background: #0b1021;
}
