/**
 * Premium Motion UI System
 * Production-level animations for dating app
 * Inspired by Tinder, Bumble, Hinge
 * 
 * @package DatingCore
 * @version 5.0
 */

/* ==========================================================================
   ANIMATION TOKENS
   ========================================================================== */
:root {
    /* Timing Functions - Premium Feel */
    --motion-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --motion-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --motion-snap: cubic-bezier(0.16, 1, 0.3, 1);
    --motion-gentle: cubic-bezier(0.25, 0.1, 0.25, 1);
    
    /* Durations */
    --duration-instant: 100ms;
    --duration-fast: 150ms;
    --duration-normal: 250ms;
    --duration-slow: 400ms;
    --duration-slower: 600ms;
    
    /* Icon Colors - Premium Neutral */
    --icon-primary: #1A1A2E;
    --icon-secondary: #4A4A68;
    --icon-muted: #8E8EA9;
    --icon-light: #B8B8CC;
    --icon-action-like: #00D46A;
    --icon-action-nope: #FF4458;
    --icon-action-super: #00D4FF;
    --icon-action-star: #FFD700;
}

/* ==========================================================================
   PREMIUM ICON SYSTEM
   ========================================================================== */

/* Base Icon Styles */
.dc-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: var(--icon-secondary);
    transition: all var(--duration-fast) var(--motion-smooth);
    flex-shrink: 0;
}

.dc-icon svg {
    width: 100%;
    height: 100%;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    stroke: currentColor;
    transition: inherit;
}

.dc-icon--filled svg {
    fill: currentColor;
    stroke: none;
}

/* Icon Sizes */
.dc-icon--sm { width: 16px; height: 16px; }
.dc-icon--md { width: 24px; height: 24px; }
.dc-icon--lg { width: 32px; height: 32px; }
.dc-icon--xl { width: 40px; height: 40px; }

/* Icon Hover States */
.dc-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    color: var(--icon-secondary);
    transition: all var(--duration-fast) var(--motion-smooth);
    position: relative;
    overflow: hidden;
}

.dc-icon-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: currentColor;
    opacity: 0;
    border-radius: inherit;
    transition: opacity var(--duration-fast) var(--motion-smooth);
}

.dc-icon-btn:hover {
    color: var(--icon-primary);
}

.dc-icon-btn:hover::before {
    opacity: 0.08;
}

.dc-icon-btn:active {
    transform: scale(0.92);
}

.dc-icon-btn:active::before {
    opacity: 0.12;
}

/* Navigation Arrows - Premium Style */
.dc-nav-arrow {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--dc-white);
    border: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
    color: var(--icon-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--duration-normal) var(--motion-smooth);
    position: relative;
    z-index: 10;
}

.dc-nav-arrow svg {
    width: 24px;
    height: 24px;
    stroke-width: 2.5;
    transition: transform var(--duration-fast) var(--motion-bounce);
}

.dc-nav-arrow:hover {
    background: var(--dc-white);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);
    transform: scale(1.05);
}

.dc-nav-arrow:hover svg {
    transform: translateX(2px);
}

.dc-nav-arrow--prev:hover svg {
    transform: translateX(-2px);
}

.dc-nav-arrow:active {
    transform: scale(0.95);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}

.dc-nav-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

/* ==========================================================================
   PREMIUM ACTION BUTTONS
   ========================================================================== */

.dc-action-btn-premium {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: all var(--duration-normal) var(--motion-bounce);
}

.dc-action-btn-premium svg {
    width: 28px;
    height: 28px;
    position: relative;
    z-index: 2;
    transition: transform var(--duration-fast) var(--motion-bounce);
}

/* Ripple Effect */
.dc-action-btn-premium::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 70%);
    opacity: 0;
    transform: scale(0);
    transition: all var(--duration-normal) var(--motion-smooth);
}

.dc-action-btn-premium:active::after {
    opacity: 1;
    transform: scale(2);
}

/* Nope Button */
.dc-action-btn-premium--nope {
    background: var(--dc-white);
    box-shadow: 0 4px 20px rgba(255, 68, 88, 0.15);
    color: var(--icon-action-nope);
}

.dc-action-btn-premium--nope:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(255, 68, 88, 0.25);
}

.dc-action-btn-premium--nope:hover svg {
    transform: rotate(-15deg);
}

.dc-action-btn-premium--nope:active {
    transform: scale(0.95);
}

/* Like Button */
.dc-action-btn-premium--like {
    background: linear-gradient(135deg, var(--icon-action-like) 0%, #00B85B 100%);
    box-shadow: 0 4px 20px rgba(0, 212, 106, 0.3);
    color: var(--dc-white);
}

.dc-action-btn-premium--like:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(0, 212, 106, 0.4);
}

.dc-action-btn-premium--like:hover svg {
    transform: scale(1.15);
}

.dc-action-btn-premium--like:active {
    transform: scale(0.95);
}

/* Super Like Button */
.dc-action-btn-premium--super {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--icon-action-super) 0%, #0099FF 100%);
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
    color: var(--dc-white);
}

.dc-action-btn-premium--super svg {
    width: 24px;
    height: 24px;
}

.dc-action-btn-premium--super:hover {
    transform: scale(1.1) translateY(-4px);
    box-shadow: 0 12px 35px rgba(0, 212, 255, 0.4);
}

.dc-action-btn-premium--super:hover svg {
    transform: scale(1.1);
    animation: star-pulse 0.6s ease infinite;
}

@keyframes star-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Small Action Buttons */
.dc-action-btn-premium--sm {
    width: 44px;
    height: 44px;
    background: var(--dc-white);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    color: var(--icon-secondary);
}

.dc-action-btn-premium--sm svg {
    width: 20px;
    height: 20px;
}

.dc-action-btn-premium--sm:hover {
    transform: scale(1.1);
    color: var(--icon-primary);
}

/* Button Loading State */
.dc-action-btn-premium.is-loading {
    pointer-events: none;
}

.dc-action-btn-premium.is-loading svg {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Button Disabled State */
.dc-action-btn-premium:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ==========================================================================
   MODAL ANIMATIONS
   ========================================================================== */

/* Modal Backdrop */
.dc-modal-premium {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--duration-normal) var(--motion-smooth),
                visibility var(--duration-normal) var(--motion-smooth);
}

.dc-modal-premium.is-open {
    opacity: 1;
    visibility: visible;
}

.dc-modal-backdrop-premium {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    transition: all var(--duration-slow) var(--motion-smooth);
}

.dc-modal-premium.is-open .dc-modal-backdrop-premium {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

/* Modal Content */
.dc-modal-content-premium {
    position: relative;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    background: var(--dc-white);
    border-radius: 24px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    transform: translateY(30px) scale(0.95);
    opacity: 0;
    transition: all var(--duration-slow) var(--motion-snap);
}

.dc-modal-premium.is-open .dc-modal-content-premium {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Modal Close Button */
.dc-modal-close-premium {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    color: var(--dc-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    transition: all var(--duration-fast) var(--motion-smooth);
}

.dc-modal-close-premium svg {
    width: 20px;
    height: 20px;
}

.dc-modal-close-premium:hover {
    background: rgba(0, 0, 0, 0.6);
    transform: scale(1.1);
}

.dc-modal-close-premium:active {
    transform: scale(0.95);
}

/* ==========================================================================
   IMAGE SLIDER - PREMIUM
   ========================================================================== */

.dc-slider-premium {
    position: relative;
    width: 100%;
    height: 450px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
}

.dc-slider-track {
    display: flex;
    height: 100%;
    transition: transform var(--duration-slow) var(--motion-snap);
}

.dc-slider-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    position: relative;
}

.dc-slider-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity var(--duration-normal) var(--motion-smooth);
}

.dc-slider-slide img.is-loaded {
    opacity: 1;
}

/* Slider Navigation */
.dc-slider-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 12px;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--duration-fast) var(--motion-smooth);
}

.dc-slider-premium:hover .dc-slider-nav {
    opacity: 1;
}

.dc-slider-nav button {
    pointer-events: auto;
}

/* Slider Dots */
.dc-slider-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 20px;
}

.dc-slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all var(--duration-fast) var(--motion-smooth);
}

.dc-slider-dot:hover {
    background: rgba(255, 255, 255, 0.7);
}

.dc-slider-dot.is-active {
    background: var(--dc-white);
    transform: scale(1.3);
}

/* Progress Bar Style Dots */
.dc-slider-progress {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    gap: 4px;
}

.dc-slider-progress-bar {
    flex: 1;
    height: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.3);
    overflow: hidden;
    cursor: pointer;
}

.dc-slider-progress-fill {
    height: 100%;
    background: var(--dc-white);
    width: 0;
    transition: width var(--duration-fast) var(--motion-smooth);
}

.dc-slider-progress-bar.is-active .dc-slider-progress-fill,
.dc-slider-progress-bar.is-past .dc-slider-progress-fill {
    width: 100%;
}

/* ==========================================================================
   PROFILE CONTENT ANIMATIONS
   ========================================================================== */

.dc-profile-content-premium {
    padding: 24px;
    padding-bottom: 100px;
    overflow-y: auto;
    max-height: calc(90vh - 450px);
}

/* Staggered Animation for Content */
.dc-profile-content-premium > * {
    opacity: 0;
    transform: translateY(20px);
    transition: all var(--duration-normal) var(--motion-snap);
}

.dc-modal-premium.is-open .dc-profile-content-premium > * {
    opacity: 1;
    transform: translateY(0);
}

.dc-modal-premium.is-open .dc-profile-content-premium > *:nth-child(1) { transition-delay: 100ms; }
.dc-modal-premium.is-open .dc-profile-content-premium > *:nth-child(2) { transition-delay: 150ms; }
.dc-modal-premium.is-open .dc-profile-content-premium > *:nth-child(3) { transition-delay: 200ms; }
.dc-modal-premium.is-open .dc-profile-content-premium > *:nth-child(4) { transition-delay: 250ms; }
.dc-modal-premium.is-open .dc-profile-content-premium > *:nth-child(5) { transition-delay: 300ms; }

/* Profile Header */
.dc-profile-header-premium {
    margin-bottom: 20px;
}

.dc-profile-name-premium {
    margin: 0 0 4px 0;
    font-size: 28px;
    font-weight: 700;
    color: var(--dc-gray-900);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dc-profile-age-premium {
    font-weight: 400;
    color: var(--dc-gray-600);
}

.dc-profile-meta-premium {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--dc-gray-500);
    font-size: 14px;
}

.dc-profile-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dc-profile-meta-item svg {
    width: 16px;
    height: 16px;
    color: var(--icon-muted);
}

/* Profile Section */
.dc-profile-section-premium {
    margin-bottom: 24px;
}

.dc-profile-section-title {
    margin: 0 0 12px 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--dc-gray-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dc-profile-bio-premium {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    color: var(--dc-gray-700);
}

/* Interest Pills - Premium */
.dc-interests-premium {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dc-interest-pill {
    padding: 8px 16px;
    background: var(--dc-gray-100);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--dc-gray-700);
    transition: all var(--duration-fast) var(--motion-smooth);
}

.dc-interest-pill:hover {
    background: var(--dc-gray-200);
    transform: translateY(-2px);
}

/* Shared Interest */
.dc-interest-pill--shared {
    background: linear-gradient(135deg, rgba(253, 41, 123, 0.1) 0%, rgba(255, 101, 91, 0.1) 100%);
    color: var(--dc-primary);
}

/* ==========================================================================
   FLOATING ACTIONS - FIXED BOTTOM
   ========================================================================== */

.dc-profile-actions-premium {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(to top, var(--dc-white) 70%, transparent);
}

/* ==========================================================================
   SWIPE TRANSITIONS
   ========================================================================== */

.dc-profile-swipe-container {
    position: relative;
    overflow: hidden;
}

.dc-profile-swipe-item {
    transition: transform var(--duration-slow) var(--motion-snap),
                opacity var(--duration-normal) var(--motion-smooth);
}

.dc-profile-swipe-item.is-exiting-left {
    transform: translateX(-100%);
    opacity: 0;
}

.dc-profile-swipe-item.is-exiting-right {
    transform: translateX(100%);
    opacity: 0;
}

.dc-profile-swipe-item.is-entering-left {
    animation: slideInFromLeft var(--duration-slow) var(--motion-snap) forwards;
}

.dc-profile-swipe-item.is-entering-right {
    animation: slideInFromRight var(--duration-slow) var(--motion-snap) forwards;
}

@keyframes slideInFromLeft {
    from {
        transform: translateX(-30%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromRight {
    from {
        transform: translateX(30%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ==========================================================================
   LOADING STATES
   ========================================================================== */

.dc-skeleton-premium {
    background: linear-gradient(90deg, 
        var(--dc-gray-100) 25%, 
        var(--dc-gray-50) 50%, 
        var(--dc-gray-100) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.dc-skeleton-text {
    height: 16px;
    margin-bottom: 8px;
}

.dc-skeleton-title {
    height: 28px;
    width: 60%;
}

.dc-skeleton-pill {
    height: 36px;
    width: 80px;
    border-radius: 20px;
}

/* ==========================================================================
   MATCH ANIMATION
   ========================================================================== */

.dc-match-explosion {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2000;
}

.dc-match-heart {
    position: absolute;
    font-size: 30px;
    animation: heartFloat 2s ease-out forwards;
}

@keyframes heartFloat {
    0% {
        transform: translateY(0) scale(0);
        opacity: 1;
    }
    50% {
        transform: translateY(-100px) scale(1.2);
        opacity: 1;
    }
    100% {
        transform: translateY(-200px) scale(0.8);
        opacity: 0;
    }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {
    .dc-modal-content-premium {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .dc-slider-premium {
        height: 55vh;
    }
    
    .dc-profile-content-premium {
        max-height: calc(100vh - 55vh);
    }
    
    .dc-slider-nav {
        opacity: 1;
    }
    
    .dc-nav-arrow {
        width: 40px;
        height: 40px;
    }
    
    .dc-action-btn-premium {
        width: 56px;
        height: 56px;
    }
    
    .dc-action-btn-premium--super {
        width: 48px;
        height: 48px;
    }
}

/* ==========================================================================
   TOUCH FEEDBACK
   ========================================================================== */

@media (hover: none) {
    .dc-slider-nav {
        opacity: 1;
    }
    
    .dc-nav-arrow:active {
        background: var(--dc-gray-100);
    }
    
    .dc-action-btn-premium:active {
        transform: scale(0.9) !important;
    }
}



