/* Font Face */
@font-face {
  font-family: 'Sabbir Ashalata';
  src: url('../fonts/Sabbir-Ashalota-3-Unicode.ttf') format('truetype');
  font-display: block;
  font-weight: normal;
  font-style: normal;
}

/* Reset & Base Styles */
* {
  font-family: 'Sabbir Ashalata', 'Noto Sans Bengali', 'Hind Siliguri', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  box-sizing: border-box;
}

html {
  overflow-x: hidden !important;
  overflow-y: auto;
  width: 100%;
  height: 100%;
  max-width: 100vw;
  position: relative;
}

body {
  cursor: url('../images/heart.png'), auto;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #4facfe 75%, #00f2fe 100%);
  background-size: 400% 400%;
  animation: gradientShift 20s ease infinite;
  overflow-x: hidden !important;
  overflow-y: auto;
  width: 100%;
  max-width: 100vw;
  position: relative;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

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

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  background: url('../images/background.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.25;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* Font Loading */
.font-loading {
  visibility: hidden;
}

.font-loaded {
  visibility: visible;
}

p, h1, h2, h3, h4, h5, h6 {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
  pointer-events: none;
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

.loading-heart {
  font-size: 5rem;
  animation: heartbeat 1.2s ease-in-out infinite;
  margin-bottom: 2rem;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.loading-text {
  font-family: 'Sabbir Ashalata', 'Noto Sans Bengali', 'Hind Siliguri', sans-serif;
  color: #ffffff;
  font-size: 2rem;
  font-weight: normal;
  letter-spacing: 2px;
}

/* Main Container */
.main-container {
  position: relative;
  z-index: 10;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 1rem;
  overflow: hidden;
}

/* Love Card */
.love-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border-radius: 32px;
  padding: 3rem 4rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2),
              0 0 0 1px rgba(255, 255, 255, 0.3),
              inset 0 1px 0 rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.3);
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 900px;
  width: 100%;
  cursor: pointer;
  contain: layout style paint;
}

.love-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25),
              0 0 0 1px rgba(255, 255, 255, 0.3),
              inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.love-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, rgba(255, 192, 203, 0.5), rgba(255, 20, 147, 0.5), rgba(255, 192, 203, 0.5));
  border-radius: 32px;
  z-index: -1;
  opacity: 0.3;
  animation: borderGlow 3s ease-in-out infinite;
}

@keyframes borderGlow {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}

/* Typography */
#loveMessage {
  position: relative;
  z-index: 2;
  font-size: 3.8rem;
  font-family: 'Sabbir Ashalata', 'Noto Sans Bengali', 'Hind Siliguri', sans-serif;
  color: #1a1a2e;
  font-weight: normal;
  letter-spacing: 0.5px;
  line-height: 1.3;
  margin-bottom: 1rem;
}

.sub-message {
  position: relative;
  z-index: 2;
  font-size: 1.7rem;
  font-family: 'Sabbir Ashalata', 'Noto Sans Bengali', 'Hind Siliguri', sans-serif;
  color: #2d2d44;
  font-weight: normal;
  letter-spacing: 0.3px;
  line-height: 1.5;
  margin-top: 1rem;
  opacity: 0;
  animation: fadeInUp 1s ease 2s forwards;
}

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

/* Floating Hearts */
.floating-heart {
  position: fixed;
  font-size: 2.5rem;
  pointer-events: none;
  z-index: 5;
  animation: floatUp 10s linear infinite;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
  will-change: transform;
}

@keyframes floatUp {
  0% {
    transform: translateY(100vh) rotate(0deg) scale(0.4);
    opacity: 0;
  }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% {
    transform: translateY(-100px) rotate(360deg) scale(1.2);
    opacity: 0;
  }
}

/* Sparkles */
.sparkle {
  position: fixed;
  width: 6px;
  height: 6px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.9);
  animation: sparkle 4s ease-in-out infinite;
  z-index: 5;
  pointer-events: none;
}

@keyframes sparkle {
  0%, 100% {
    opacity: 0;
    transform: scale(0);
  }
  50% {
    opacity: 1;
    transform: scale(1.5);
  }
}

/* Particles */
.particle {
  position: fixed;
  width: 8px;
  height: 8px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  pointer-events: none;
  z-index: 5;
  animation: particleFloat 8s ease-in-out infinite;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.8);
  will-change: transform;
}

@keyframes particleFloat {
  0%, 100% {
    transform: translateY(0) translateX(0) scale(1);
    opacity: 0;
  }
  50% {
    transform: translateY(-120px) translateX(60px) scale(1.8);
    opacity: 1;
  }
}

/* Cursor Trail Hearts */
.cursor-heart {
  position: fixed;
  font-size: 1.8rem;
  pointer-events: none;
  z-index: 9999;
  animation: cursorHeart 1.2s ease-out forwards;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.2));
}

@keyframes cursorHeart {
  0% {
    transform: scale(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: scale(1.5) rotate(360deg) translateY(-60px);
    opacity: 0;
  }
}

/* Drag Hearts */
.drag-heart {
  position: fixed;
  font-size: 2.5rem;
  pointer-events: none;
  z-index: 9999;
  animation: dragHeart 1.5s ease-out forwards;
  filter: drop-shadow(0 3px 10px rgba(255, 20, 147, 0.7));
}

@keyframes dragHeart {
  0% {
    transform: scale(0) rotate(0deg);
    opacity: 1;
  }
  50% {
    transform: scale(1.4) rotate(180deg);
    opacity: 0.9;
  }
  100% {
    transform: scale(0.6) rotate(360deg) translateY(-100px);
    opacity: 0;
  }
}

/* Drag Sparkles */
.drag-sparkle {
  position: fixed;
  width: 10px;
  height: 10px;
  background: radial-gradient(circle, #fff, #ff69b4);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  animation: dragSparkle 1.2s ease-out forwards;
  box-shadow: 0 0 20px rgba(255, 192, 203, 1), 0 0 10px rgba(255, 20, 147, 0.8);
}

@keyframes dragSparkle {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  50% {
    transform: scale(2);
    opacity: 1;
  }
  100% {
    transform: scale(0) translateY(-80px);
    opacity: 0;
  }
}

/* Burst Effect */
.burst-heart {
  position: fixed;
  font-size: 1.8rem;
  pointer-events: none;
  z-index: 9999;
  animation: burst 1.2s ease-out forwards;
}

@keyframes burst {
  0% {
    transform: scale(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: scale(2.5) rotate(720deg) translateY(-120px);
    opacity: 0;
  }
}

/* Fireworks */
.firework {
  position: fixed;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
}

/* Ripple Effect */
.ripple {
  position: fixed;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.7);
  pointer-events: none;
  z-index: 9997;
  animation: ripple 1.2s ease-out forwards;
}

@keyframes ripple {
  0% {
    width: 0;
    height: 0;
    opacity: 1;
  }
  100% {
    width: 250px;
    height: 250px;
    opacity: 0;
  }
}

/* Cursor styling */
body.dragging {
  cursor: grabbing !important;
}

/* Audio Player Styles */
.audio-player {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  padding: 1rem 1.25rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  max-width: calc(100vw - 2rem);
  max-height: calc(100vh - 2rem);
  contain: layout style paint;
  will-change: transform;
}

.audio-player * {
  max-width: 100%;
  box-sizing: border-box;
}

.audio-player-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.audio-player-btn {
  background: transparent;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.audio-player-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  transform: scale(1.1);
}

.audio-player-btn svg {
  width: 20px;
  height: 20px;
  fill: #1a1a2e;
}

.audio-player-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.audio-player-title {
  font-size: 0.75rem;
  color: #666;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audio-player-time {
  font-size: 0.7rem;
  color: #999;
  font-weight: 400;
}

.audio-player-progress-container {
  width: 100%;
  height: 4px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
  margin-top: 0.5rem;
  overflow: hidden;
}

.audio-player-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #ff6b9d, #ff1493);
  border-radius: 2px;
  width: 0%;
  transition: width 0.1s linear;
  position: relative;
}

.audio-player-progress-bar::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  background: #ff1493;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.audio-player-progress-container:hover .audio-player-progress-bar::after {
  opacity: 1;
}

.audio-player-volume {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.5rem;
}

.audio-player-volume-slider {
  width: 60px;
  height: 4px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.audio-player-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  background: #1a1a2e;
  border-radius: 50%;
  cursor: pointer;
}

.audio-player-volume-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: #1a1a2e;
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.audio-player-minimized {
  width: 50px;
  height: 50px;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.audio-player-minimized .audio-player-controls {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  gap: 0;
  position: relative;
}

.audio-player-minimized .audio-player-info,
.audio-player-minimized .audio-player-volume,
.audio-player-minimized .audio-player-progress-container {
  display: none !important;
}

.audio-player-minimized #playBtn {
  display: none !important;
}

.audio-player-minimized #minimizeBtn {
  width: 100%;
  height: 100%;
  display: flex !important;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  position: absolute;
  top: 0;
  left: 0;
}

.audio-player-minimized #minimizeBtn svg {
  width: 24px;
  height: 24px;
}

/* Responsive */
@media (max-width: 640px) {
  #loveMessage {
    font-size: 1.875rem !important;
    line-height: 1.2;
  }
  .sub-message {
    font-size: 1rem !important;
  }
  .floating-heart {
    font-size: 1.5rem;
  }
  .loading-heart {
    font-size: 3rem;
  }
  .love-card {
    padding: 2rem 2rem;
    border-radius: 24px;
  }
  .audio-player {
    bottom: 1rem;
    right: 1rem;
    padding: 0.75rem;
    max-width: calc(100vw - 1rem);
  }
  .audio-player-volume {
    display: none;
  }
  .audio-player-info {
    display: none;
  }
}

@media (min-width: 640px) and (max-width: 768px) {
  #loveMessage {
    font-size: 2.25rem !important;
  }
  .sub-message {
    font-size: 1.125rem !important;
  }
}

@media (min-width: 1280px) {
  .love-card {
    max-width: 56rem;
  }
}

