/* Furniture Liquidators St. Louis - Main Stylesheet */

/* Custom Properties */
:root {
    --primary-color: #dc2626;
    --primary-dark: #b91c1c;
    --secondary-color: #ea580c;
    --accent-color: #fbbf24;
    --success-color: #059669;
    --info-color: #0ea5e9;
    --warning-color: #d97706;
    --dark-color: #1f2937;
    --light-color: #f9fafb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

/* Enhanced Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

/* Custom Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

/* Header Enhancements */
header {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Enhanced Mobile Menu */
#mobile-menu {
    animation: slideIn 0.3s ease;
}

#mobile-menu.hidden {
    display: none !important;
}

/* Hero Section Enhancements */
.hero-slider {
    position: relative;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-slide.active {
    position: relative;
    opacity: 1;
}

.hero-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 100%);
}

.hero-slide > div {
    position: relative;
    z-index: 2;
}

.hero-dot {
    transition: all 0.3s ease;
    cursor: pointer;
}

.hero-dot.active {
    background: white !important;
    transform: scale(1.2);
}

.hero-prev, .hero-next {
    transition: all 0.3s ease;
    cursor: pointer;
}

.hero-prev:hover, .hero-next:hover {
    transform: scale(1.1);
}

/* Enhanced Buttons */
.cta-external, .share-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cta-external::before, .share-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.cta-external:hover::before, .share-btn:hover::before {
    left: 100%;
}

.cta-external:hover, .share-btn:hover {
    box-shadow: var(--shadow-xl);
}

/* Feature Items */
.feature-item {
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-item:hover .bg-red-100 {
    background-color: var(--primary-color) !important;
}

.feature-item:hover .bg-red-100 i {
    color: white !important;
}

.feature-item:hover .bg-orange-100 {
    background-color: var(--secondary-color) !important;
}

.feature-item:hover .bg-orange-100 i {
    color: white !important;
}

.feature-item:hover .bg-blue-100 {
    background-color: var(--info-color) !important;
}

.feature-item:hover .bg-blue-100 i {
    color: white !important;
}

.feature-item:hover .bg-green-100 {
    background-color: var(--success-color) !important;
}

.feature-item:hover .bg-green-100 i {
    color: white !important;
}

/* Category Cards */
.category-card {
    position: relative;
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.1);
}

.category-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.category-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.category-card:hover img {
    transform: scale(1.1);
}

.category-card .card-content {
    padding: 1.5rem;
    position: relative;
}

.category-card .card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.8) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}

.category-card:hover .card-overlay {
    opacity: 1;
}

.category-share-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(220, 38, 38, 0.9);
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(-10px);
}

.category-card:hover .category-share-btn {
    opacity: 1;
    transform: translateY(0);
}

.category-share-btn:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

.price-badge {
    background: linear-gradient(135deg, var(--accent-color), #f59e0b);
    color: var(--dark-color);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-weight: 700;
    font-size: 0.875rem;
    position: absolute;
    top: 1rem;
    left: 1rem;
    box-shadow: var(--shadow-md);
    animation: pulse 2s infinite;
}

/* Flash Deals Enhancements */
#flash .bg-white {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

/* Floating Share Button */
#floating-share {
    animation: fadeInScale 1s ease 2s both;
}

#floating-share .share-btn {
    box-shadow: var(--shadow-xl);
    animation: pulse 2s infinite;
}

/* Share Modal Enhancements */
#share-modal {
    backdrop-filter: blur(5px);
    animation: fadeInScale 0.3s ease;
}

#share-modal .bg-white {
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(0,0,0,0.1);
}

.share-platform {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.share-platform::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.share-platform:hover::before {
    left: 100%;
}

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

/* Enhanced Forms */
input[type="text"], input[type="email"], textarea {
    transition: all 0.3s ease;
    border: 2px solid #e5e7eb;
}

input[type="text"]:focus, input[type="email"]:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Enhanced Footer */
footer {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

/* Gamification Elements */
.scratch-card {
    background: linear-gradient(45deg, #silver, #gold);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.scratch-overlay {
    background: #ccc;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="50" font-size="14" fill="white" text-anchor="middle" x="50">SCRATCH HERE</text></svg>');
    background-repeat: no-repeat;
    background-position: center;
}

.streak-counter {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 1rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.deal-hunt-progress {
    background: linear-gradient(90deg, #4ecdc4, #26de81);
    height: 10px;
    border-radius: 5px;
    transition: width 0.3s ease;
}

/* Quiz Styles */
.style-quiz {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-xl);
}

.quiz-option {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    padding: 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quiz-option:hover {
    border-color: var(--primary-color);
    background: #fff5f5;
}

.quiz-option.selected {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

/* Referral Unlock System */
.referral-progress {
    background: #f1f3f4;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.referral-progress-bar {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    height: 100%;
    transition: width 0.5s ease;
}

.unlock-reward {
    background: linear-gradient(135deg, #ffd700, #ffed4a);
    color: #744210;
    padding: 1rem;
    border-radius: 15px;
    text-align: center;
    border: 2px solid #f59e0b;
    animation: pulse 2s infinite;
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .hero-slide {
        background-attachment: scroll !important;
    }
    
    .category-card {
        margin-bottom: 1.5rem;
    }
    
    .hero-prev, .hero-next {
        display: none;
    }
    
    #floating-share {
        bottom: 2rem;
        top: auto;
        right: 1rem;
        transform: none;
    }
    
    .scratch-card, .style-quiz {
        margin: 1rem 0;
    }
}

@media (max-width: 640px) {
    .hero-slide h1 {
        font-size: 2.5rem !important;
        line-height: 1.1;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .quiz-option {
        padding: 0.75rem;
        margin-bottom: 0.5rem;
    }
}

/* Performance Optimizations */
.category-card img {
    will-change: transform;
}

.hero-slide {
    will-change: opacity;
}

.cta-external, .share-btn {
    will-change: transform;
}

/* Accessibility Enhancements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus Styles */
a:focus, button:focus, input:focus, textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .hero-slide::before {
        background: rgba(0,0,0,0.8);
    }
    
    .category-card {
        border: 2px solid #000;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero-slide {
        transition: none;
    }
}

/* Print Styles */
@media print {
    .hero-slider, #floating-share, #share-modal, .share-btn {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .category-card {
        border: 1px solid #000;
        break-inside: avoid;
    }
}