@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@300;400;500;600;700&family=Anek+Bangla:wght@300;400;500;600;700;800&display=swap');

/* Font definition for local fonts */
@font-face {
    font-family: 'Anupm Mahdi';
    src: url('../assets/AnupmMahdiSA.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'Li Ullash';
    src: url('../assets/LiUllashRRR.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'Li Ullash Italic';
    src: url('../assets/LiUllashRRRItalic.ttf') format('truetype');
    font-weight: normal;
    font-style: italic;
}
@font-face {
    font-family: 'Showpnopuri';
    src: url('../assets/Showpnopuri.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'Showpnopuri Italic';
    src: url('../assets/ShowpnopuriItalic.ttf') format('truetype');
    font-weight: normal;
    font-style: italic;
}

:root {
    --radius: 0.625rem;

    /* Theme colors */
    --background: oklch(0.86 0.06 15);
    --foreground: oklch(0.35 0.08 15);
    --card: oklch(0.92 0.04 15);
    --card-foreground: oklch(0.35 0.08 15);
    --popover: oklch(0.9 0.05 15);
    --popover-foreground: oklch(0.35 0.08 15);
    --primary: oklch(0.55 0.2 22);
    --primary-foreground: oklch(0.98 0.02 20);
    --secondary: oklch(0.88 0.06 15);
    --secondary-foreground: oklch(0.35 0.08 15);
    --muted: oklch(0.82 0.05 15);
    --muted-foreground: oklch(0.5 0.06 15);
    --accent: oklch(0.9 0.05 15);
    --accent-foreground: oklch(0.35 0.08 15);
    --destructive: oklch(0.55 0.2 22);
    --destructive-foreground: oklch(0.98 0.02 20);
    --border: oklch(0.75 0.06 15 / 30%);
    --input: oklch(0.9 0.04 15);
    --ring: oklch(0.55 0.2 22);

    --rose: oklch(0.55 0.22 22);
    --rose-deep: oklch(0.42 0.2 22);
    --cream: oklch(0.35 0.08 15);
    --gold: oklch(0.78 0.12 75);

    --font-heading: "Hind Siliguri", "Anek Bangla", sans-serif;
    --font-body: "Hind Siliguri", sans-serif;
    --font-hand: "Hind Siliguri", sans-serif;
}

* {
    border-color: var(--border);
    box-sizing: border-box;
}

body {
    background-color: var(--background);
    color: var(--foreground);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, button, input, textarea, select, label {
    font-family: var(--font-body);
}

::selection {
    background: oklch(0.55 0.2 22 / 0.25);
    color: oklch(0.25 0.08 15);
}

/* Animations */
@keyframes float-up {
    0% { transform: translate3d(0, 100vh, 0) scale(0.5); opacity: 0; }
    10% { opacity: 0.6; }
    90% { opacity: 0.4; }
    100% { transform: translate3d(0, -10vh, 0) scale(1); opacity: 0; }
}

@keyframes bubble-rise {
    0% { transform: translate3d(0, 100vh, 0) scale(0.4); opacity: 0; }
    10% { opacity: 1; }
    50% { transform: translate3d(var(--sway, 0px), 50vh, 0) scale(1); }
    90% { opacity: 0.7; }
    100% { transform: translate3d(0, -15vh, 0) scale(1.1); opacity: 0; }
}

@keyframes bubble-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.12); }
}

.heart-particle {
    position: absolute;
    top: 0;
    animation: float-up linear infinite;
    pointer-events: none;
    will-change: transform, opacity;
    transform: translate3d(0, 100vh, 0);
    backface-visibility: hidden;
}

.glass-heart {
    position: absolute;
    top: 0;
    display: block;
    animation: glass-heart-rise linear infinite;
    pointer-events: none;
    will-change: transform, opacity;
    transform: translate3d(0, 100vh, 0) rotate(var(--rot, 0deg));
    backface-visibility: hidden;
}

.tiny-bubble {
    position: absolute;
    top: 0;
    display: block;
    animation: tiny-bubble-rise linear infinite;
    pointer-events: none;
    will-change: transform, opacity;
    transform: translate3d(0, 100vh, 0);
    backface-visibility: hidden;
}

@keyframes glass-heart-rise {
    0% {
        transform: translate3d(0, 100vh, 0) rotate(var(--rot, 0deg)) scale(0.3);
        opacity: 0;
    }
    6% { opacity: 0.7; }
    50% {
        transform: translate3d(var(--sway, 0px), 35vh, 0) rotate(calc(var(--rot, 0deg) + 10deg)) scale(1);
        opacity: 0.9;
    }
    80% { opacity: 0.6; }
    100% {
        transform: translate3d(0, -20vh, 0) rotate(calc(var(--rot, 0deg) - 8deg)) scale(0.7);
        opacity: 0;
    }
}

@keyframes tiny-bubble-rise {
    0% {
        transform: translate3d(0, 100vh, 0) scale(0.2);
        opacity: 0;
    }
    8% { opacity: 1; }
    50% { transform: translate3d(var(--sway, 0px), 45vh, 0) scale(1); }
    85% { opacity: 0.8; }
    100% {
        transform: translate3d(0, -10vh, 0) scale(0.4);
        opacity: 0;
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

@media (min-width: 640px) {
    @keyframes shake {
        0%, 100% { transform: translateX(0); }
        20%, 60% { transform: translateX(-8px); }
        40%, 80% { transform: translateX(8px); }
    }
}

.animate-shake { animation: shake 0.4s ease-in-out; }

@media (prefers-reduced-motion: reduce) {
    .heart-particle, .glass-heart, .tiny-bubble {
        animation: none !important;
        opacity: 0.25 !important;
        transform: translate3d(0, 50vh, 0) !important;
    }
    .animate-shake { animation: none !important; }
}

.tap-clean { -webkit-tap-highlight-color: transparent; }

/* Rich text classes */
.prose-section h1 { font-size: 2rem; margin: 1rem 0 0.75rem; font-weight: 600; }
.prose-section h2 { font-size: 1.6rem; margin: 1rem 0 0.6rem; font-weight: 600; }
.prose-section h3 { font-size: 1.3rem; margin: 0.85rem 0 0.5rem; font-weight: 600; }
.prose-section p { margin: 0.5rem 0; }
.prose-section ul { list-style: disc; padding-left: 1.5rem; margin: 0.6rem 0; }
.prose-section ol { list-style: decimal; padding-left: 1.5rem; margin: 0.6rem 0; }
.prose-section li { margin: 0.2rem 0; }
.prose-section blockquote {
    border-left: 3px solid var(--rose);
    padding-left: 1rem;
    margin: 0.8rem 0;
    font-style: italic;
    opacity: 0.9;
}
.prose-section a { color: var(--rose); text-decoration: underline; }
.prose-section code {
    background: rgba(0,0,0,0.06);
    padding: 0.1rem 0.35rem;
    border-radius: 0.25rem;
    font-size: 0.9em;
}
.prose-section pre {
    background: rgba(0,0,0,0.06);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 0.75rem 0;
}
.prose-section hr {
    border: none;
    height: 1px;
    max-width: 120px;
    margin: 1.5rem auto;
    background: rgba(139, 105, 20, 0.3);
}
.prose-section strong { font-weight: 700; }
.prose-section em { font-style: italic; }

/* Admin styles */
.admin-ui {
    background-color: #0f172a;
    color: #f1f5f9;
}
.admin-ui input:not([type="checkbox"]):not([type="radio"]),
.admin-ui textarea, .admin-ui select {
    background-color: #273345;
    border: 1px solid #334155;
    color: #f1f5f9;
    transition: border-color 150ms, box-shadow 150ms;
}
.admin-ui input:not([type="checkbox"]):not([type="radio"]):focus,
.admin-ui textarea:focus, .admin-ui select:focus {
    border-color: #f43f5e;
    box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.25);
    outline: none;
}
.admin-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.125rem;
    border-radius: 0.5rem;
    background-color: #f43f5e;
    color: #ffffff;
    font-weight: 500;
    font-size: 0.875rem;
    border: 1px solid #f43f5e;
    cursor: pointer;
    transition: background-color 150ms, transform 100ms;
}
.admin-btn-primary:hover:not(:disabled) { background-color: #e11d48; border-color: #e11d48; }
.admin-btn-primary:active:not(:disabled) { transform: translateY(1px); }
.admin-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.admin-btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.125rem;
    border-radius: 0.5rem;
    background-color: transparent;
    color: #f1f5f9;
    font-weight: 500;
    font-size: 0.875rem;
    border: 1px solid #334155;
    cursor: pointer;
    transition: background-color 150ms, border-color 150ms;
}
.admin-btn-ghost:hover:not(:disabled) { background-color: #273345; border-color: #475569; }
.admin-btn-ghost:disabled { opacity: 0.4; cursor: not-allowed; }

.admin-btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    border-radius: 0.5rem;
    background-color: transparent;
    color: #94a3b8;
    font-size: 0.75rem;
    border: 1px solid #334155;
    cursor: pointer;
    transition: all 150ms;
}
.admin-btn-danger:hover:not(:disabled) { background-color: rgba(244, 63, 94, 0.1); color: #fb7185; border-color: #f43f5e; }
.admin-btn-danger:disabled { opacity: 0.4; cursor: not-allowed; }

.admin-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.375rem;
    background-color: transparent;
    color: #cbd5e1;
    font-size: 0.75rem;
    border: 1px solid #334155;
    cursor: pointer;
    transition: all 150ms;
}
.admin-btn-icon:hover:not(:disabled) { background-color: #273345; color: #f1f5f9; }
.admin-btn-icon:disabled { opacity: 0.3; cursor: not-allowed; }

/* Premium Animated Love Card animations */
@keyframes heart-pulse-ping {
    0% { transform: scale(0.9); opacity: 0.8; }
    50% { transform: scale(1.4); opacity: 0; }
    100% { transform: scale(0.9); opacity: 0; }
}

@keyframes heart-beat-scale {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.12); }
    40% { transform: scale(1.05); }
    60% { transform: scale(1.2); }
}

@keyframes premium-glow {
    0%, 100% { box-shadow: 0 12px 35px rgba(225, 112, 137, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.8); }
    50% { box-shadow: 0 12px 45px rgba(225, 112, 137, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.9); }
}

.animate-heart-ping {
    animation: heart-pulse-ping 2s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}

.animate-heart-beat {
    animation: heart-beat-scale 1.2s infinite ease-in-out;
}

.animate-premium-glow {
    animation: premium-glow 4s infinite ease-in-out;
}

/* Animated Gradient Background */
body.proposal-page {
  background: linear-gradient(-45deg, #fff1f2, #ffedd5, #fce7f3, #fdf4ff) !important;
  background-size: 400% 400% !important;
  animation: gradientBG 15s ease infinite !important;
  scroll-behavior: smooth;
}

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

/* Selection Color for rose theme */
body.proposal-page ::selection {
  background-color: #fecdd3;
  color: #881337;
}

/* Falling Rose Petals Animation */
.petal {
  position: fixed;
  top: -10%;
  z-index: 1; /* Keep petals behind main text but above bg */
  pointer-events: none;
  filter: drop-shadow(0 4px 6px rgba(225, 29, 72, 0.2));
  animation-name: fall, sway;
  animation-iteration-count: infinite;
  animation-timing-function: linear, ease-in-out;
  animation-direction: normal, alternate;
}

@keyframes fall {
  0% { top: -10%; opacity: 0; transform: rotate(0deg); }
  10% { opacity: 0.8; }
  90% { opacity: 0.8; }
  100% { top: 110%; opacity: 0; transform: rotate(360deg); }
}

@keyframes sway {
  0% { margin-left: 0px; }
  100% { margin-left: 100px; }
}

/* Individual Petal Timings & Positions */
.petal:nth-child(1) { left: 5%; animation-duration: 15s, 4s; animation-delay: 0s, 0s; transform: scale(0.6); }
.petal:nth-child(2) { left: 15%; animation-duration: 18s, 5s; animation-delay: 2s, 1s; transform: scale(0.8); }
.petal:nth-child(3) { left: 25%; animation-duration: 12s, 3s; animation-delay: 4s, 2s; transform: scale(0.5); }
.petal:nth-child(4) { left: 40%; animation-duration: 20s, 6s; animation-delay: 0s, 3s; transform: scale(0.9); }
.petal:nth-child(5) { left: 55%; animation-duration: 16s, 4s; animation-delay: 5s, 0s; transform: scale(0.7); }
.petal:nth-child(6) { left: 70%; animation-duration: 14s, 5s; animation-delay: 1s, 1s; transform: scale(0.8); }
.petal:nth-child(7) { left: 85%; animation-duration: 19s, 4s; animation-delay: 3s, 2s; transform: scale(0.6); }
.petal:nth-child(8) { left: 95%; animation-duration: 13s, 3s; animation-delay: 6s, 1s; transform: scale(0.7); }
.petal:nth-child(9) { left: 30%; animation-duration: 17s, 5s; animation-delay: 7s, 2s; transform: scale(1); filter: blur(1px); }
.petal:nth-child(10) { left: 80%; animation-duration: 15s, 4s; animation-delay: 8s, 0s; transform: scale(0.5); filter: blur(2px); }

/* SVG Petal Style */
.petal svg {
  width: 30px;
  height: 30px;
  fill: #fda4af; /* Rose 300 */
  opacity: 0.7;
}
