/* === ENHANCED STYLE-SPECIFIC BACKGROUNDS === */

/* Base style-specific container */
.obituary-card.style-specific {
    position: relative;
    overflow: hidden;
}

.obituary-card.style-specific::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
    z-index: 1;
}

.obituary-card.style-specific .obituary-content {
    position: relative;
    z-index: 2;
}

/* === INFLUENCER STYLE === */
.obituary-card.influencer-background {
    background: linear-gradient(135deg, #ff6b9d 0%, #c44df0 50%, #667eea 100%);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(255, 107, 157, 0.3);
}

.obituary-card.influencer-background::before {
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 2px, transparent 2px),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 2px, transparent 2px),
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 60px 60px, 80px 80px, 40px 40px;
}

.obituary-card.influencer-background .obituary-card-header {
    background: rgba(255, 107, 157, 0.9);
    backdrop-filter: blur(10px);
}

.obituary-card.influencer-background .obituary-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

/* === YELP REVIEW STYLE === */
.obituary-card.yelp-background {
    background: linear-gradient(45deg, #d32323 0%, #ff6347 100%);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(211, 35, 35, 0.4);
}

.obituary-card.yelp-background::before {
    background-image: 
        radial-gradient(circle, #ffd700 2px, transparent 2px),
        radial-gradient(circle at 25% 25%, #ffd700 1px, transparent 1px);
    background-size: 30px 30px, 15px 15px;
}

.obituary-card.yelp-background .obituary-card-header {
    background: rgba(211, 35, 35, 0.9);
    position: relative;
}

.obituary-card.yelp-background .obituary-card-header::after {
    content: '⭐⭐⭐⭐⭐';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    opacity: 0.8;
}

/* === CORPORATE HR STYLE === */
.obituary-card.corporate-background {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(102, 126, 234, 0.3);
}

.obituary-card.corporate-background::before {
    background-image: 
        linear-gradient(45deg, rgba(255, 255, 255, 0.03) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255, 255, 255, 0.03) 25%, transparent 25%);
    background-size: 40px 40px;
}

.obituary-card.corporate-background .obituary-card-header {
    background: rgba(102, 126, 234, 0.9);
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* === DATING PROFILE STYLE === */
.obituary-card.dating-background {
    background: linear-gradient(135deg, #ff9a8b 0%, #fecfef 50%, #fecfef 100%);
    border-radius: 25px;
    box-shadow: 0 8px 32px rgba(255, 154, 139, 0.3);
}

.obituary-card.dating-background::before {
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.2) 2px, transparent 2px),
        radial-gradient(circle at 60% 60%, rgba(255, 192, 203, 0.1) 3px, transparent 3px);
    background-size: 50px 50px, 70px 70px;
}

.obituary-card.dating-background .obituary-card-header::after {
    content: '💕';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
}

/* === SPORTSCASTER STYLE === */
.obituary-card.sports-background {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    border-radius: 15px;
    box-shadow: 0 6px 28px rgba(86, 171, 47, 0.3);
}

.obituary-card.sports-background::before {
    background-image: 
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0px, rgba(255, 255, 255, 0.1) 2px, transparent 2px, transparent 20px),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.1) 0px, rgba(255, 255, 255, 0.1) 2px, transparent 2px, transparent 20px);
}

.obituary-card.sports-background .obituary-card-header {
    background: rgba(86, 171, 47, 0.9);
    position: relative;
}

.obituary-card.sports-background .obituary-card-header::after {
    content: '🏆';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
}

/* === TRUE CRIME STYLE === */
.obituary-card.truecrime-background {
    background: linear-gradient(135deg, #2c1810 0%, #8b2635 100%);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(139, 38, 53, 0.5);
    border: 2px solid #8b2635;
}

.obituary-card.truecrime-background::before {
    background-image: 
        repeating-linear-gradient(45deg, rgba(255, 255, 0, 0.1) 0px, rgba(255, 255, 0, 0.1) 10px, transparent 10px, transparent 20px);
    background-size: 30px 30px;
}

.obituary-card.truecrime-background .obituary-card-header {
    background: rgba(139, 38, 53, 0.95);
    color: #fef9f3;
}

.obituary-card.truecrime-background .obituary-content {
    background: rgba(44, 24, 16, 0.9);
    color: #fef9f3;
}

/* === CONSPIRACY THEORY STYLE === */
.obituary-card.conspiracy-background {
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    border-radius: 10px;
    box-shadow: 0 6px 30px rgba(238, 232, 44, 0.2);
    border: 2px solid #eee82c;
}

.obituary-card.conspiracy-background::before {
    background-image: 
        radial-gradient(circle at 30% 70%, rgba(238, 232, 44, 0.1) 2px, transparent 2px),
        radial-gradient(circle at 70% 30%, rgba(238, 232, 44, 0.05) 1px, transparent 1px);
    background-size: 80px 80px, 40px 40px;
}

.obituary-card.conspiracy-background .obituary-card-header {
    background: rgba(238, 232, 44, 0.9);
    color: #0f0f23;
}

.obituary-card.conspiracy-background .obituary-content {
    background: rgba(15, 15, 35, 0.9);
    color: #eee82c;
}

/* === COUNTRY SONG STYLE === */
.obituary-card.country-background {
    background: linear-gradient(135deg, #8b4513 0%, #deb887 50%, #f4a460 100%);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(139, 69, 19, 0.4);
    border: 3px solid #8b4513;
}

.obituary-card.country-background::before {
    background-image: 
        repeating-linear-gradient(90deg, rgba(139, 69, 19, 0.1) 0px, rgba(139, 69, 19, 0.1) 3px, transparent 3px, transparent 12px);
}

.obituary-card.country-background .obituary-card-header::after {
    content: '🎵';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
}

/* === HAIKU STYLE === */
.obituary-card.haiku-background {
    background: linear-gradient(135deg, #ffeef8 0%, #f0e6ff 50%, #e6f3ff 100%);
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(155, 89, 182, 0.2);
    border: 2px solid #d1c4e9;
}

.obituary-card.haiku-background::before {
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(233, 182, 233, 0.3) 2px, transparent 2px),
        radial-gradient(circle at 75% 75%, rgba(182, 233, 233, 0.2) 1px, transparent 1px);
    background-size: 60px 60px, 40px 40px;
}

.obituary-card.haiku-background .obituary-card-header::after {
    content: '🌸';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
}

/* === SONNET STYLE === */
.obituary-card.sonnet-background {
    background: linear-gradient(135deg, #2c1810 0%, #8b6914 50%, #daa520 100%);
    border-radius: 15px;
    box-shadow: 0 6px 30px rgba(218, 165, 32, 0.3);
    border: 3px double #daa520;
}

.obituary-card.sonnet-background::before {
    background-image: 
        repeating-linear-gradient(45deg, rgba(218, 165, 32, 0.1) 0px, rgba(218, 165, 32, 0.1) 2px, transparent 2px, transparent 20px);
}

.obituary-card.sonnet-background .obituary-card-header {
    background: rgba(218, 165, 32, 0.9);
    color: #2c1810;
}

.obituary-card.sonnet-background .obituary-content {
    background: rgba(44, 24, 16, 0.9);
    color: #f7f1e8;
}

.obituary-card.sonnet-background .obituary-card-header::after {
    content: '📜';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
}

/* === HOVER EFFECTS === */
.obituary-card.style-specific:hover {
    transform: translateY(-4px);
    transition: all 0.3s ease;
}

.obituary-card.style-specific:hover::before {
    opacity: 0.15;
    transition: opacity 0.3s ease;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 768px) {
    .obituary-card.style-specific {
        border-radius: 12px;
    }
    
    .obituary-card.style-specific .obituary-card-header::after {
        font-size: 1.2rem;
        right: 15px;
    }
}
/* === SPECIAL TEXT FORMATTING FOR ENHANCED STYLES === */

/* Influencer Post Formatting */
.obituary-text.influencer-post .social-handle {
    color: #667eea;
    font-weight: 700;
    text-decoration: none;
}

.obituary-text.influencer-post .social-hashtag {
    color: #ff6b9d;
    font-weight: 600;
}

.obituary-text.influencer-post .engagement-stats {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 12px;
    border-radius: 12px;
    margin: 8px 0;
    font-weight: 600;
    font-size: 0.95rem;
}

.obituary-text.influencer-post .profile-element {
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 10px;
    border-radius: 8px;
    margin: 4px 0;
    font-style: italic;
}

/* Yelp Review Formatting */
.obituary-text.yelp-review .star-rating {
    color: #ffd700;
    font-size: 1.2rem;
    margin: 8px 0;
    font-weight: bold;
}

.obituary-text.yelp-review .reviewer-info {
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 10px;
    border-radius: 6px;
    margin: 6px 0;
    font-weight: 600;
    font-size: 0.9rem;
}

.obituary-text.yelp-review .service-details {
    background: rgba(211, 35, 35, 0.1);
    padding: 8px 12px;
    border-left: 4px solid #d32323;
    margin: 8px 0;
    font-weight: 500;
}

/* Corporate HR Formatting */
.obituary-text.corporate-memo .memo-header {
    background: rgba(102, 126, 234, 0.1);
    padding: 8px 12px;
    border-radius: 6px;
    margin: 8px 0;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.obituary-text.corporate-memo .performance-metric {
    background: rgba(118, 75, 162, 0.1);
    padding: 6px 10px;
    border-radius: 8px;
    margin: 6px 0;
    font-weight: 600;
    border-left: 3px solid #764ba2;
}

.obituary-text.corporate-memo .policy-reference {
    background: rgba(102, 126, 234, 0.05);
    padding: 4px 8px;
    border-radius: 4px;
    margin: 4px 0;
    font-style: italic;
    font-size: 0.95rem;
}

/* === INTERACTIVE ELEMENTS === */

/* Social Media Like Button Animation */
@keyframes pulse {
    0%, 100% { 
        transform: translateY(-50%) scale(1); 
    }
    50% { 
        transform: translateY(-50%) scale(1.1); 
    }
}

.social-like-btn:hover {
    transform: translateY(-50%) scale(1.2) !important;
    transition: transform 0.2s ease;
}

/* Yelp Helpful Buttons */
.yelp-helpful button:hover {
    background: #f0f0f0 !important;
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

/* Corporate Watermark Animation */
.corporate-watermark {
    animation: fadeInOut 4s ease-in-out infinite;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 0.05; }
}

/* Evidence Tape Effect */
.evidence-tape {
    animation: tapeFlutter 3s ease-in-out infinite;
}

@keyframes tapeFlutter {
    0%, 100% { transform: rotate(-2deg); }
    50% { transform: rotate(-1deg); }
}

/* Classified Stamp Effect */
.classified-stamp {
    animation: stampPulse 2s ease-in-out infinite;
}

@keyframes stampPulse {
    0%, 100% { 
        transform: rotate(15deg) scale(1); 
        opacity: 0.9;
    }
    50% { 
        transform: rotate(15deg) scale(1.05); 
        opacity: 1;
    }
}

/* === CHARACTER-SPECIFIC STYLING === */

/* Character-specific color variations */
.obituary-card[data-character="darth-vader"] {
    --character-accent: #ff0000;
}

.obituary-card[data-character="ned-stark"] {
    --character-accent: #4a90a4;
}

.obituary-card[data-character="tony-stark"] {
    --character-accent: #ffd700;
}

.obituary-card[data-character="hermione-granger"] {
    --character-accent: #740001;
}

.obituary-card[data-character="mufasa"] {
    --character-accent: #ff8c00;
}

/* Apply character colors to style elements */
.obituary-card[data-character] .social-handle {
    color: var(--character-accent, #667eea) !important;
}

.obituary-card[data-character] .social-hashtag {
    color: var(--character-accent, #ff6b9d) !important;
}

/* === STYLE-SPECIFIC HOVER EFFECTS === */

.obituary-card.influencer-background:hover .social-like-btn {
    animation-duration: 1s;
}

.obituary-card.yelp-background:hover .star-rating {
    text-shadow: 0 0 10px #ffd700;
    transition: text-shadow 0.3s ease;
}

.obituary-card.corporate-background:hover .corporate-watermark {
    animation-duration: 2s;
}

.obituary-card.truecrime-background:hover .evidence-tape {
    animation-duration: 1.5s;
}

.obituary-card.conspiracy-background:hover .classified-stamp {
    animation-duration: 1s;
}

/* === ACCESSIBILITY AND RESPONSIVENESS === */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .social-like-btn,
    .corporate-watermark,
    .evidence-tape,
    .classified-stamp {
        animation: none !important;
    }
    
    .social-like-btn:hover,
    .yelp-helpful button:hover {
        transform: none !important;
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .obituary-text.influencer-post .engagement-stats,
    .obituary-text.yelp-review .service-details,
    .obituary-text.corporate-memo .performance-metric {
        padding: 6px 8px;
        font-size: 0.9rem;
    }
    
    .social-like-btn {
        right: 40px !important;
        font-size: 1.2rem;
    }
    
    .evidence-tape {
        left: -20px !important;
        right: -20px !important;
        font-size: 0.7rem;
    }
    
    .classified-stamp {
        padding: 6px 12px !important;
        font-size: 0.8rem;
    }
    
    .corporate-watermark {
        font-size: 2rem !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .obituary-text.influencer-post .social-handle,
    .obituary-text.influencer-post .social-hashtag {
        color: #000000 !important;
        background: #ffffff;
        padding: 2px 4px;
        border-radius: 3px;
    }
    
    .obituary-text.yelp-review .star-rating {
        color: #000000 !important;
        text-shadow: none !important;
    }
}
/* Daily Rotation Info Panel */
.daily-rotation-info {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(42, 31, 21, 0.8);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
}

.rotation-content {
    background: var(--primary-white);
    border: 6px solid var(--ink-black);
    border-radius: 16px;
    padding: var(--space-2xl);
    max-width: 600px;
    text-align: center;
    box-shadow: var(--shadow-strong);
}

.rotation-content h3 {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--ink-black);
    margin-bottom: var(--space-lg);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.rotation-content p {
    font-family: var(--font-newspaper);
    font-size: 1.1rem;
    color: var(--medium-gray);
    line-height: 1.6;
    margin-bottom: var(--space-lg);
}

.rotation-details {
    background: var(--sepia-light);
    border: 2px solid var(--border-gray);
    border-radius: 8px;
    padding: var(--space-lg);
    margin: var(--space-lg) 0;
    font-family: var(--font-sans);
}

.close-info-btn {
    background: var(--accent-red);
    color: var(--primary-white);
    border: none;
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-info-btn:hover {
    background: var(--deep-red);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* Dev mode indicator styling */
#devModeIndicator {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@media (max-width: 768px) {
    .rotation-content {
        padding: var(--space-lg);
        margin: var(--space-md);
    }
    
    .rotation-content h3 {
        font-size: 1.5rem;
    }
    
    #devModeIndicator {
        top: 5px;
        right: 5px;
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}
/* === MOBILE FIXES TO ADD TO enhanced-styles.css === */

/* INSTRUCTION: Add these fixes at the END of your enhanced-styles.css file (around line 400+) */
/* These fixes specifically address the text squishing issues with enhanced styles */

/* 1. Fix enhanced style elements that cause text wrapping issues */
@media (max-width: 768px) {
    /* Reduce padding on ALL enhanced style text elements */
    .obituary-text.influencer-post .engagement-stats,
    .obituary-text.influencer-post .profile-element,
    .obituary-text.yelp-review .reviewer-info,
    .obituary-text.yelp-review .service-details,
    .obituary-text.corporate-memo .memo-header,
    .obituary-text.corporate-memo .performance-metric,
    .obituary-text.corporate-memo .policy-reference {
        padding: 4px 6px !important;
        margin: 3px 0 !important;
        font-size: 0.85rem !important;
        border-radius: 4px !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Fix star ratings and other inline elements */
    .obituary-text.yelp-review .star-rating {
        font-size: 1rem !important;
        margin: 4px 0 !important;
    }
    
    /* Ensure enhanced backgrounds don't add too much padding */
    .obituary-card.style-specific .obituary-content {
        padding-left: var(--space-sm) !important;
        padding-right: var(--space-sm) !important;
    }
}

/* 2. Extra small screens - be more aggressive */
@media (max-width: 480px) {
    /* Make enhanced style elements even smaller */
    .obituary-text.influencer-post .engagement-stats,
    .obituary-text.influencer-post .profile-element,
    .obituary-text.yelp-review .reviewer-info,
    .obituary-text.yelp-review .service-details,
    .obituary-text.corporate-memo .memo-header,
    .obituary-text.corporate-memo .performance-metric,
    .obituary-text.corporate-memo .policy-reference {
        padding: 2px 4px !important;
        margin: 2px 0 !important;
        font-size: 0.8rem !important;
        border-radius: 3px !important;
    }
    
    /* Fix interactive elements that might be positioned off-screen */
    .social-like-btn {
        right: 5px !important;
        font-size: 0.9rem !important;
    }
    
    .evidence-tape {
        left: -5px !important;
        right: -5px !important;
        font-size: 0.5rem !important;
        padding: 1px 2px !important;
    }
    
    .classified-stamp {
        padding: 3px 6px !important;
        font-size: 0.6rem !important;
        right: 2px !important;
        top: 2px !important;
    }
    
    .corporate-watermark {
        font-size: 1.2rem !important;
        opacity: 0.02 !important;
    }
    
    /* Reduce border radius on enhanced cards for mobile */
    .obituary-card.style-specific {
        border-radius: 8px !important;
    }
    
    .obituary-card.style-specific .obituary-card-header::after {
        font-size: 1rem !important;
        right: 8px !important;
    }
}

/* 3. Fix specific enhanced style backgrounds that might cause issues */
@media (max-width: 768px) {
    /* Conspiracy theory style fixes */
    .obituary-card.conspiracy-background .obituary-content {
        padding: var(--space-md) var(--space-sm) !important;
    }
    
    /* True crime style fixes */
    .obituary-card.truecrime-background .obituary-content {
        padding: var(--space-md) var(--space-sm) !important;
    }
    
    /* Sonnet style fixes */
    .obituary-card.sonnet-background .obituary-content {
        padding: var(--space-md) var(--space-sm) !important;
    }
    
    /* Influencer style fixes */
    .obituary-card.influencer-background .obituary-content {
        padding: var(--space-md) var(--space-sm) !important;
    }
    
    /* Yelp style fixes */
    .obituary-card.yelp-background .obituary-content {
        padding: var(--space-md) var(--space-sm) !important;
    }
    
    /* Corporate style fixes */
    .obituary-card.corporate-background .obituary-content {
        padding: var(--space-md) var(--space-sm) !important;
    }
}

/* 4. Text overflow prevention for all enhanced styles */
@media (max-width: 768px) {
    /* Ensure all enhanced style text elements can wrap */
    .obituary-text.influencer-post *,
    .obituary-text.yelp-review *,
    .obituary-text.corporate-memo *,
    .obituary-text.country-song *,
    .obituary-text.haiku * {
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}
