/* Custom stylesheet for DearGift */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Be+Vietnam+Pro:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
    --primary: #db2777;
    --primary-hover: #be185d;
    --primary-light: #fff1f2;
    --primary-border: #fbcfe8;
    --secondary: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --bg-main: #ffffff;
    --bg-soft: #fff8fa;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --font: 'Be Vietnam Pro', 'Outfit', sans-serif;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(219, 39, 119, 0.04), 0 4px 6px -4px rgba(219, 39, 119, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(219, 39, 119, 0.06), 0 8px 10px -6px rgba(219, 39, 119, 0.06);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font);
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow-x: hidden;
    width: 100%;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Button system */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 50px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 14px rgba(233, 30, 140, 0.25);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(233, 30, 140, 0.35);
}

.btn-secondary {
    background-color: white;
    color: var(--text-main);
    border-color: #e2e8f0;
}

.btn-secondary:hover {
    border-color: var(--primary-border);
    color: var(--primary);
    background-color: var(--primary-light);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
}

.btn-ghost:hover {
    color: var(--primary);
    background-color: var(--primary-light);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 16px;
}

/* Utility Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}
@media (min-width: 768px) {
    .grid-2 { grid-template-columns: repeat(2, 1fr); }
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}
@media (min-width: 640px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
@media (min-width: 768px) {
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Card components */
.card {
    background-color: white;
    border: 1px solid #f1f5f9;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* Form controls */
.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

.form-input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 16px;
    font-size: 14px;
    font-family: inherit;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--radius-md);
    background-color: #f8fafc;
    transition: all 0.2s ease;
    outline: none;
}

.form-input:focus {
    background-color: white;
    border-color: #f472b6;
    box-shadow: 0 0 0 3px rgba(244, 114, 182, 0.15);
}

/* Badge styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 50px;
}

.badge-primary {
    background-color: var(--primary-light);
    color: var(--primary);
}

.badge-success {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

/* Header & Dropdown */
.header-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    min-width: 200px;
    background-color: white;
    border: 1px solid #f1f5f9;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    z-index: 100;
    padding: 8px 0;
    margin-top: 8px;
    animation: fadeIn 0.2s ease-out;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 13px;
    color: #334155;
    transition: all 0.15s ease;
}

.dropdown-item:hover {
    background-color: var(--primary-light);
    color: var(--primary);
}

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

/* Heart falling effect for view-gift */
.heart-particle {
    position: fixed;
    top: -10%;
    pointer-events: none;
    z-index: 1;
    animation: fall linear forwards;
}

@keyframes fall {
    to {
        transform: translateY(110vh) rotate(360deg);
    }
}

/* 3D Envelope styling */
.envelope-wrapper {
    position: relative;
    width: 320px;
    height: 200px;
    background-color: #f43f5e;
    margin: 50px auto;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    cursor: pointer;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    perspective: 1000px;
    transition: transform 0.5s ease;
}

.envelope-wrapper:hover {
    transform: translateY(-5px);
}

.envelope-flap {
    position: absolute;
    top: 0;
    left: 0;
    border-left: 160px solid transparent;
    border-right: 160px solid transparent;
    border-top: 100px solid #e11d48;
    transform-origin: top;
    transition: transform 0.4s ease 0.2s;
    z-index: 3;
}

.envelope-wrapper.open .envelope-flap {
    transform: rotateX(180deg);
    z-index: 1;
    border-top-color: #be123c;
}

.envelope-pocket {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 0;
    border-left: 160px solid #f43f5e;
    border-right: 160px solid #f43f5e;
    border-top: 100px solid transparent;
    border-bottom: 100px solid #be123c;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    z-index: 2;
}

.letter-card {
    position: absolute;
    bottom: 5px;
    left: 15px;
    width: 290px;
    height: 180px;
    background-color: #fff9fa;
    border-radius: 8px;
    z-index: 2;
    padding: 16px;
    transition: transform 0.5s ease-out 0.4s;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.envelope-wrapper.open .letter-card {
    transform: translateY(-110px) scale(1.05);
    height: auto;
    min-height: 280px;
    z-index: 4;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f8fafc;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 100px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
