/* ============================================
   Component Styles
   ============================================ */

/* --- Buttons --- */
.btn-cute {
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
}
.btn-cute:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(255, 183, 178, 0.5);
}
.btn-cute:active { transform: translateY(-1px) scale(0.98); }

.btn-cute::after {
    content: ''; position: absolute; top: 50%; left: 50%; width: 0; height: 0;
    border-radius: 50%; background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%); transition: width 0.6s, height 0.6s;
}
.btn-cute:active::after { width: 300px; height: 300px; }

.btn-game {
    background: linear-gradient(135deg, var(--candy-blue), var(--candy-pink));
    color: white; font-weight: bold;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
.btn-game:hover { transform: scale(1.1); }

/* --- Cards --- */
.product-card {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}
.product-card:hover {
    transform: translateY(-8px) rotate(-1deg);
    box-shadow: 0 25px 35px -5px rgba(199, 206, 234, 0.4);
}

.gallery-card {
    background: white; padding: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.gallery-card:hover { transform: scale(1.03) rotate(1deg); z-index: 10; }

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    animation: glassShimmer 3s ease-in-out infinite;
}

/* --- Like & Emoji Buttons --- */
.like-btn { transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.like-btn:active { transform: scale(1.3); animation: heartbeat 0.3s ease-in-out; }

.emoji-btn { transition: all 0.2s ease; }
.emoji-btn:hover { transform: scale(1.2) rotate(10deg); background-color: #FFF9F9; }
.emoji-btn:active { transform: scale(1.3) rotate(-10deg); }

.hot-label { animation: pulse-gold 2s infinite; }

/* --- Status Badges --- */
.status-badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.status-pending { background: #FEF3C7; color: #B45309; }
.status-printing { background: #DBEAFE; color: #1D4ED8; }
.status-ready { background: #D1FAE5; color: #065F46; }
.status-completed { background: #F3F4F6; color: #6B7280; }

/* --- Avatar --- */
.avatar-option {
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border: 3px solid transparent;
}
.avatar-option:hover { transform: scale(1.15) rotate(5deg); border-color: var(--candy-blue); }
.avatar-option.selected {
    border-color: var(--candy-pink);
    box-shadow: 0 0 0 3px rgba(255, 183, 178, 0.4);
    transform: scale(1.1);
}

/* --- Modals --- */
.modal-container {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0,0,0,0.4); backdrop-filter: blur(5px);
    z-index: 50;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    align-items: flex-start;
    padding: 1rem;
}
.modal-container::before {
    content: ''; display: inline-block; height: 100%;
    vertical-align: middle; margin-right: -0.25em;
}
.modal-content {
    background: white; width: 100%; position: relative;
    margin: auto; flex-shrink: 0;
}

/* --- Admin Card --- */
.admin-card {
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}
.admin-card:hover {
    border-left-color: var(--candy-pink);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* --- Range Slider --- */
input[type=range] {
    -webkit-appearance: none; width: 100%; background: transparent;
}
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none; height: 24px; width: 24px; border-radius: 50%;
    background: var(--candy-pink); cursor: pointer; margin-top: -10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
input[type=range]::-webkit-slider-runnable-track {
    width: 100%; height: 6px; cursor: pointer; background: #e5e7eb; border-radius: 999px;
}

/* --- Achievement --- */
.achievement-unlock { animation: achievementPulse 1s ease-out; }
.unbox-animation { animation: unboxing 1s cubic-bezier(0.68, -0.55, 0.265, 1.55); }
.mascot-breathing { animation: breathe 3s ease-in-out infinite; }

/* --- Level Progress Bar --- */
.level-progress-bar {
    height: 8px; border-radius: 999px; overflow: hidden;
    background: #e5e7eb;
}
.level-progress-fill {
    height: 100%; border-radius: 999px;
    background: linear-gradient(90deg, var(--candy-pink), var(--candy-blue));
    transition: width 0.5s ease;
}

/* --- Toast Notification --- */
.toast {
    position: fixed; bottom: 20px; right: 20px;
    padding: 12px 24px; border-radius: 12px;
    color: white; font-weight: bold; font-size: 14px;
    z-index: 9999; animation: fadeInUp 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.toast-success { background: var(--status-ready); }
.toast-info { background: var(--status-printing); }
.toast-warning { background: var(--status-pending); }

/* ============================================
   Phase 2: Enhanced Component Styles
   ============================================ */

/* --- Upgraded Product Card --- */
.product-card {
    position: relative;
    overflow: visible;
}
.product-card::before {
    content: '';
    position: absolute;
    top: -2px; left: -2px; right: -2px; bottom: -2px;
    background: linear-gradient(135deg, var(--candy-pink), var(--candy-blue), var(--candy-mint), var(--candy-pink));
    background-size: 300% 300%;
    border-radius: 1.5rem;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
    animation: gradientShift 4s ease infinite;
}
.product-card:hover::before {
    opacity: 1;
}

/* Product image overlay */
.product-card .product-img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.3), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.product-card:hover .product-img-overlay { opacity: 1; }

/* Product quick-view button */
.product-card .quick-view-btn {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.product-card:hover .quick-view-btn {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Product stat pills */
.stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(255, 183, 178, 0.1);
    color: var(--candy-pink);
    transition: all 0.2s ease;
}
.stat-pill:hover {
    background: rgba(255, 183, 178, 0.2);
    transform: scale(1.05);
}

/* --- Enhanced Gallery Card --- */
.gallery-card {
    position: relative;
    border: 2px solid transparent;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.gallery-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--candy-pink), var(--candy-blue), var(--candy-mint));
    border-radius: 12px 12px 0 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.gallery-card:hover::after { opacity: 1; }
.gallery-card:hover {
    border-color: rgba(199, 206, 234, 0.3);
    box-shadow: 0 15px 40px rgba(199, 206, 234, 0.3);
}

/* --- Section Header --- */
.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* --- FAQ Accordion --- */
.faq-item {
    transition: all 0.3s ease;
    cursor: pointer;
    border-left: 3px solid transparent;
}
.faq-item:hover {
    border-left-color: var(--candy-pink);
    transform: translateX(4px);
    box-shadow: 0 4px 20px rgba(255, 183, 178, 0.15);
}

/* --- Idea Box --- */
.idea-box {
    position: relative;
    overflow: hidden;
}
.idea-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(255, 183, 178, 0.05), transparent, rgba(181, 234, 215, 0.05), transparent);
    animation: spin 20s linear infinite;
}

/* --- Footer glow --- */
.footer-glow {
    position: relative;
}
.footer-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--candy-pink), transparent);
}

/* --- Pulse dot for "live" indicators --- */
.pulse-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #10B981;
    position: relative;
}
.pulse-dot::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid #10B981;
    animation: pulse-gold 2s infinite;
    border-color: #10B981;
}

/* --- Kawaii face decorations --- */
.kawaii-face {
    font-size: 2rem;
    display: inline-block;
    transition: transform 0.3s ease;
}
.kawaii-face:hover {
    transform: scale(1.3) rotate(15deg);
}

/* --- Ribbon badge --- */
.ribbon {
    position: absolute;
    top: 12px;
    right: -8px;
    padding: 4px 12px 4px 8px;
    font-size: 10px;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #ff6b6b, #FFB7B2);
    border-radius: 4px 0 0 4px;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
    z-index: 5;
}
.ribbon::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: -6px;
    border-left: 8px solid #cc4444;
    border-bottom: 6px solid transparent;
}

/* --- Reserve modal enhancements --- */
#reserveModal select {
    cursor: pointer;
    transition: all 0.2s ease;
}
#reserveModal select:hover {
    border-color: var(--candy-pink);
}
#reserveModal select:focus {
    border-color: var(--candy-pink);
    box-shadow: 0 0 0 3px rgba(255, 183, 178, 0.15);
}

/* --- Dashboard order card hover --- */
#dashOrdersList > div {
    transition: all 0.2s ease;
}
#dashOrdersList > div:hover {
    transform: translateX(4px);
}

/* --- Modal entrance animation --- */
.modal-container .modal-content {
    animation: fadeInUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Input focus glow --- */
input:focus, textarea:focus, select:focus {
    outline: none;
}

/* --- Gradient text utility --- */
.text-gradient-pink {
    background: linear-gradient(135deg, #FFB7B2, #ff8a80);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.text-gradient-rainbow {
    background: linear-gradient(135deg, #FFB7B2, #C7CEEA, #B5EAD7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
