/* Base Gradient & Custom Classes for Tailwind via Direct CSS */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&family=Playfair+Display:wght@500;600;700&display=swap');

:root {
  --ink: #06060c;
  --night: #0b1024;
  --midnight: #111432;
  --blue: #3a6cff;
  --blue-soft: #8cb6ff;
  --pink: #ff4fa3;
  --pink-soft: #ff9acb;
  --text: #e3dfe4;
  --stroke: rgba(255,255,255,0.12);
  --shadow-blue: rgba(58,108,255,0.28);
  --shadow-pink: rgba(255,79,163,0.24);
  
  --bg-gradient: 
    radial-gradient(780px 560px at 10% 8%, rgba(160,198,255,0.15), transparent 60%),
    radial-gradient(660px 520px at 90% 14%, rgba(255,176,214,0.15), transparent 62%),
    linear-gradient(135deg, #0b1024 0%, #111432 45%, #1a1025 75%, #06060c 100%);
}

body {
  background: var(--bg-gradient);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Typography Overrides */
.font-display { font-family: 'Playfair Display', serif; }
.font-sans { font-family: 'Manrope', sans-serif; }

.text-gradient {
  background: linear-gradient(120deg, var(--blue-soft), var(--pink-soft));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.text-glow {
  text-shadow: 0 0 10px rgba(255,255,255,0.3), 0 0 20px rgba(255,255,255,0.2);
}

/* Floating Hearts Animation */
.heart {
  position: fixed;
  bottom: -40px;
  font-size: 1.5rem;
  animation: floatUp linear infinite;
  opacity: .5;
  pointer-events: none;
  z-index: 0;
}

@keyframes floatUp {
  to {
    transform: translateY(-110vh) rotate(360deg);
    opacity: 0;
  }
}

/* Glassmorphism Card Core */
.glass-card {
  background: rgba(17, 20, 50, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--stroke);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Card Active / Interaction states */
.occasion-card {
  aspect-ratio: 1/1;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.occasion-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(145deg, rgba(255,255,255,0.05), rgba(255,255,255,0));
  z-index: 1;
  pointer-events: none;
}

.occasion-card > * { position: relative; z-index: 2; }

/* Dynamic Glows based on Tailwind group-hover */
.glow-birthday { box-shadow: 0 0 20px rgba(58,108,255,0), 0 0 20px rgba(255,79,163,0); }
.occasion-card:hover.glow-birthday { box-shadow: 0 0 30px var(--shadow-blue), 0 0 30px var(--shadow-pink); border-color: rgba(255,79,163,0.5); }

/* Form inputs */
.glass-input {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--stroke);
  color: #fff;
}
.glass-input:focus {
  outline: none;
  border-color: var(--pink-soft);
  box-shadow: 0 0 0 2px rgba(255,79,163,0.2);
}

/* Split-screen Mobile adjustments */
@media (max-width: 1024px) {
    .editor-grid { grid-template-columns: 1fr; }
    .preview-container { min-height: 600px; order: -1; } /* show preview on top on mobile */
}

/* Live Preview Mock Device Outer */
.mock-device {
    width: 340px;
    height: 650px;
    border: 8px solid #222;
    border-radius: 40px;
    background: #000;
    overflow: hidden;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Smooth hide/show */
.fade-enter { animation: fadeIn 0.4s ease forwards; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.hidden { display: none !important; }

/* Loader */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255,255,255,0.1);
    border-top-color: var(--pink-soft);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Admin Dashboard Styles */
.admin-body {
    background: #0f172a;
    color: #f8fafc;
}

.admin-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 32px;
    background: #1e293b;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.admin-table th, .admin-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.admin-table th {
    background: rgba(255,255,255,0.05);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
}

.primary-btn {
    background: #3b82f6;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    width: 100%;
}

.secondary-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #f8fafc;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
}

.secondary-btn:hover {
    background: rgba(255,255,255,0.1);
}

.error-text {
    color: #f87171;
    font-size: 0.9rem;
    margin-top: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #94a3b8;
}

.form-group input {
    width: 100%;
    padding: 12px;
    background: #0f172a;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: white;
}

.table-responsive {
    overflow-x: auto;
}

/* Status Utilities */
.bg-green-500 { background-color: #22c55e !important; }
.bg-yellow-500 { background-color: #eab308 !important; }
.bg-red-500 { background-color: #ef4444 !important; }
.text-blue-400 { color: #60a5fa !important; }
.text-green-400 { color: #4ade80 !important; }
.text-yellow-400 { color: #fbbf24 !important; }

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .5; }
}

/* Dashboard Polish */
.admin-table tr:hover {
    background: rgba(255,255,255,0.02);
}

.admin-header h1 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 4px;
}

#db-status {
    font-size: 0.75rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Admin Dashboard Specifics */
.admin-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
    transition: transform 0.2s;
}
.admin-thumbnail:hover {
    transform: scale(1.1);
    border-color: #3b82f6;
}
