/* style.css - Enhanced version */

/* --- Font Face Declarations --- */
@font-face {
  font-family: 'DynaPuff';
  font-style: normal;
  font-weight: 400;
  src: url('fonts/dynapuff-regular.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'Annie Use Your Telescope';
  font-style: normal;
  font-weight: 400;
  src: url('fonts/AnnieUseYourTelescope-Regular.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'Young Serif';
  font-style: normal;
  font-weight: 400;
  src: url('fonts/young-serif-regular.woff2') format('woff2');
  font-display: swap;
}

/* --- Global Styles & Font Setup --- */
body {
	  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
    font-family: 'Young Serif', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
	  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
    overscroll-behavior-y: contain;
    -webkit-tap-highlight-color: transparent;
    /* Enhanced background with subtle pattern */
    background-color: #FFF0F5; /* LavenderBlush - a very light, soft pink */
    background-image: url('images/bg-pattern.png'); /* Subtle dot or heart pattern */
    background-size: 60px;
    background-repeat: repeat;
    background-position: center;
    background-attachment: fixed;
    color: #374151; /* Default dark text color for elements on light background */
}

/* --- Animations --- */
@keyframes float {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-15px) rotate(5deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}
@keyframes bounce-small {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
@keyframes sparkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.2); }
}
@keyframes pulse-custom {
  0%, 100% { opacity: 1; }
  50% { opacity: .6; }
}
@keyframes shimmer {
  0% { background-position: -100% 0; }
  100% { background-position: 100% 0; }
}

.animate-float { animation: float 6s ease-in-out infinite; }
.animate-float-slow { animation: float 8s ease-in-out infinite; }
.animate-float-medium { animation: float 7s ease-in-out infinite 1s; }
.animate-bounce-small { animation: bounce-small 2s ease-in-out infinite; }
.animate-sparkle { animation: sparkle 1.5s ease-in-out infinite; }
.animate-pulse-slow { animation: pulse-custom 3s ease-in-out infinite; }
.animate-pulse-medium { animation: pulse-custom 3s ease-in-out infinite 0.5s; }
.animate-shimmer {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

/* --- Utility Classes --- */
.hidden { display: none !important; }

/* --- Component Styles --- */
/* Card style with enhanced pattern and borders */
.card-style {
    /* Wallpaper background for the main content cards */
    background-image: url('images/wallpaper.png');
    background-size: 250px; /* Adjust tile size as needed */
    background-repeat: repeat;
    background-position: center center;
    /* Fallback background color if image doesn't load */
    background-color: rgba(255, 240, 245, 0.8); /* Light lavender blush, slightly transparent */
    
    /* Text inside cards needs to be light to contrast with wallpaper */
    color: #ffffff; /* White text for cards with wallpaper */
    text-shadow: 1px 1px 3px rgba(0,0,0,0.4); /* Add shadow to text on cards for readability */

    /* Enhanced border with glow effect */
    border-width: 3px; 
    border-color: rgba(236, 72, 153, 0.6); /* pink-500 with opacity */
    box-shadow: 0 10px 25px rgba(0,0,0,0.2), 0 6px 10px rgba(0,0,0,0.15),
                0 0 15px rgba(236, 72, 153, 0.3); /* Soft pink glow */
    padding: 1.5rem; /* p-6 */
    position: relative;
    overflow: hidden;
    border-radius: 1rem; /* rounded-2xl */
}
@media (min-width: 768px) { /* md: variant */
    .card-style {
        padding: 2rem; /* p-8 */
        border-width: 4px;
    }
}

/* New feature: Rainbow top border */
.rainbow-top-border {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, 
        #ff85a2, #ff99cc, #ffc0cb, #dda0dd, #b19cd9, 
        #9370db, #ba55d3, #da70d6, #ff69b4, #ff85a2
    );
    z-index: 5;
}

.camera-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none; /* Allow interaction with elements below */
    opacity: 0.4; /* Adjust transparency as needed */
    z-index: 10; /* Ensure it's above the camera feed */
}
/* Text colors on cards with wallpaper background */
.card-style h2, 
.card-style h3 { 
    color: #fff; /* Light orchid for titles on cards */
}
.card-style .font-annie { /* For text using Annie font inside cards */
    color: #fce7f3; /* Light pink */
}
/* Specific light colors for text that might have been dark via Tailwind in HTML */
.card-style .text-pink-300 { color: #fbcfe8 !important; } /* Ensure light pink for Nora's name */
.card-style .text-purple-300 { color: #e9d5ff !important; } /* Ensure light purple for Born date */
.card-style .text-purple-200 { color: #f3e8ff !important; } /* For labels */
.card-style .text-gray-200 { color: #e5e7eb !important; } /* For helper text */
.card-style .text-red-300 { color: #fca5a5 !important; } /* Lighter red for errors on card */
.card-style .text-blue-200 { color: #bfdbfe !important; } /* Lighter blue for status on card */
.card-style .text-green-300 { color: #a7f3d0 !important; } /* Lighter green for message on card */
.card-style .text-gray-300 { color: #d1d5db !important; } /* For noPhotosMessage */


/* Buttons on Wallpapered Cards - with enhanced effects */
/* Primary button gradient now has slightly enhanced shimmer effect */
button[id^="capture"], 
button[id^="accept"], 
button[id^="saveSetup"], 
button[id^="playPause"],
#saveSettingsButton {
    position: relative;
    overflow: hidden;
}
button[id^="capture"]:after, 
button[id^="accept"]:after, 
button[id^="saveSetup"]:after, 
button[id^="playPause"]:after,
#saveSettingsButton:after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: all 0.6s;
}
button[id^="capture"]:hover:after, 
button[id^="accept"]:hover:after, 
button[id^="saveSetup"]:hover:after, 
button[id^="playPause"]:hover:after,
#saveSettingsButton:hover:after {
    left: 100%;
}

/* Secondary Button */
.button-secondary-themed { 
    background-color: rgba(255, 255, 255, 0.2); 
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    transition: all 0.3s ease;
}
.button-secondary-themed:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.button-secondary-themed:active {
    transform: translateY(0);
}

/* Settings Button */
.button-settings-style {
    background-color: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}
.button-settings-style:hover {
    background-color: rgba(255, 255, 255, 0.4);
    transform: rotate(15deg);
}

/* Destructive Button */
.button-destructive-themed {
    background-color: rgba(239, 68, 68, 0.8); /* red-500 with opacity */
    color: white;
    transition: all 0.3s ease;
}
.button-destructive-themed:hover {
    background-color: rgba(185, 28, 28, 0.9); /* red-700 with opacity */
}


/* Input Field on Wallpapered Card - enhanced with subtle animation */
.input-field-themed { 
    background-color: rgba(255, 255, 255, 0.9); 
    color: #374151; /* Dark text for input */
    border-color: rgba(236, 72, 153, 0.5); /* pink-500 with opacity */
    transition: all 0.3s ease;
}
.input-field-themed:focus {
    border-color: rgba(236, 72, 153, 0.8);
    box-shadow: 0 0 0 2px rgba(236, 72, 153, 0.3), 0 0 10px rgba(236, 72, 153, 0.2);
    transform: translateY(-1px);
}
.input-field-themed::placeholder {
    color: #9ca3af; /* gray-400 */
}


/* Modal with enhanced styling */
.modal { 
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}
.modal-content-themed { 
    background-color: #2E1E3B; /* Dark deep purple */
    color: #f3e8ff; /* Light lavender text */
    border: 2px solid #a855f7; /* purple-500 */
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.3); /* Purple glow */
    transform: scale(0.98);
    transition: all 0.3s ease;
}
.modal-content-themed:hover {
    transform: scale(1);
}
/* Text and inputs inside the dark modal */
.modal-content-themed label { color: #e9d5ff; } 
.modal-content-themed .input-field-themed {
    background-color: rgba(255,255,255, 0.1);
    border-color: rgba(168, 85, 247, 0.6); /* purple-500 */
    color: white;
}
.modal-content-themed .input-field-themed::placeholder { color: #a78bfa; } 
.modal-content-themed #closeSettingsModalButton { 
    background-color: rgba(107, 114, 128, 0.3); 
    border-color: rgba(107, 114, 128, 0.5);
    color: white;
}
.modal-content-themed #closeSettingsModalButton:hover {
    background-color: rgba(107, 114, 128, 0.4);
}


/* --- Enhanced Specific Element Styling --- */
/* Header text colors with gentle text glow */
header h1 {
    color: #581c87; /* Darker Purple (Tailwind purple-900) */
    text-shadow: 0 0 10px rgba(88, 28, 135, 0.2); /* Subtle purple glow */
}
header p {
    color: #9d174d; /* Darker Pink (Tailwind pink-800) */
    text-shadow: 0 0 8px rgba(157, 23, 77, 0.2); /* Subtle pink glow */
}

/* Decorative Corner Ribbons with subtle animation */
.corner-ribbon-tr {
    position: absolute; top: -1rem; right: -1rem; width: 4rem; height: 4rem; 
    background-color: rgba(236, 72, 153, 0.7); /* pink-500 with opacity */
    transform: rotate(45deg);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}
.corner-ribbon-tr:hover, .corner-ribbon-bl:hover {
    background-color: rgba(236, 72, 153, 0.9);
}
.corner-ribbon-bl {
    position: absolute; bottom: -1rem; left: -1rem; width: 4rem; height: 4rem; 
    background-color: rgba(236, 72, 153, 0.7); /* pink-500 with opacity */
    transform: rotate(45deg);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}