/* Enhanced Visual Effects for Letters from the Ice */

/* Glowing text effects */
.glow-text {
    text-shadow: 0 0 10px rgba(181, 45, 43, 0.3), 0 0 20px rgba(181, 45, 43, 0.2);
}

/* Ice crystal animations */
.ice-crystals {
    position: relative;
    overflow: hidden;
}

.ice-crystals::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(244, 246, 248, 0.7), transparent),
        radial-gradient(1px 1px at 40px 70px, rgba(244, 246, 248, 0.5), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(244, 246, 248, 0.6), transparent),
        radial-gradient(2px 2px at 130px 80px, rgba(244, 246, 248, 0.4), transparent);
    background-repeat: repeat;
    background-size: 150px 100px;
    animation: sparkle-drift 20s linear infinite;
    pointer-events: none;
}

@keyframes sparkle-drift {
    0% { transform: translateX(0) translateY(0); }
    100% { transform: translateX(-150px) translateY(-100px); }
}

/* Hockey rink lines */
.rink-lines {
    position: relative;
    background: 
        linear-gradient(90deg, transparent 48%, var(--vintage-red) 49%, var(--vintage-red) 51%, transparent 52%),
        linear-gradient(0deg, transparent 48%, rgba(26, 43, 76, 0.1) 49%, rgba(26, 43, 76, 0.1) 51%, transparent 52%);
    background-size: 100px 100px;
}

/* Enhanced card reveals */
.card-reveal {
    opacity: 0;
    transform: translateY(30px) rotateX(10deg);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.card-reveal.revealed {
    opacity: 1 !important;
    transform: translateY(0) rotateX(0deg) !important;
}

/* 3D letter post effect */
.letter-post-3d {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.letter-post-3d:hover {
    transform: rotateY(5deg) rotateX(2deg);
}

/* Vintage stamp effect */
.vintage-stamp {
    position: relative;
    display: inline-block;
    padding: 10px 15px;
    background: var(--vintage-red);
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transform: rotate(-5deg);
    box-shadow: 0 4px 8px rgba(181, 45, 43, 0.3);
}

.vintage-stamp::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    border: 2px dashed rgba(255, 255, 255, 0.6);
}

/* Typewriter cursor effect */
.typewriter-cursor::after {
    content: "|";
    color: var(--vintage-red);
    animation: blink 1s infinite;
    font-weight: bold;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Hockey stick decorative border */
.stick-border {
    position: relative;
    padding: 20px;
    border-left: 4px solid var(--wood-tone);
    background: linear-gradient(90deg, rgba(212, 165, 116, 0.05) 0%, transparent 10%);
}

.stick-border::before {
    content: "";
    position: absolute;
    left: -6px;
    top: -10px;
    width: 8px;
    height: 30px;
    background: var(--wood-tone);
    border-radius: 4px 4px 0 0;
    transform: rotate(45deg);
}

/* Floating action effects */
.float-up {
    animation: float-up 0.6s ease-out;
}

@keyframes float-up {
    0% {
        transform: translateY(0);
        box-shadow: 0 8px 32px rgba(26, 43, 76, 0.08);
    }
    100% {
        transform: translateY(-8px);
        box-shadow: 0 20px 40px rgba(26, 43, 76, 0.15);
    }
}

/* Ice surface reflection */
.ice-reflection {
    position: relative;
}

.ice-reflection::after {
    content: "";
    position: absolute;
    bottom: -20px;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(
        180deg,
        rgba(244, 246, 248, 0.3) 0%,
        transparent 100%
    );
    transform: scaleY(-1);
    opacity: 0.6;
    filter: blur(1px);
}

/* Hockey puck bounce animation */
@keyframes puck-bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.puck-bounce {
    animation: puck-bounce 2s infinite;
}

/* Enhanced gradient overlays */
.gradient-overlay {
    position: relative;
}

.gradient-overlay::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at top left, rgba(26, 43, 76, 0.1) 0%, transparent 50%),
        radial-gradient(circle at bottom right, rgba(181, 45, 43, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

/* Scrolling parallax elements */
.parallax-element {
    transform: translateZ(0);
    will-change: transform;
}

/* Enhanced mobile animations */
@media (max-width: 768px) {
    .ice-crystals::before,
    .sparkle-drift {
        animation-duration: 15s;
    }
    
    .letter-post-3d:hover {
        transform: none;
    }
    
    .card-reveal {
        transform: translateY(20px);
    }
    
    /* Fix mobile brain duplication */
    .mycelf-signature {
        padding: 6px 12px;
        font-size: 0.8rem;
        margin: 8px 2px;
    }
    
    .mycelf-signature img {
        width: 14px;
        height: 14px;
    }
    
    /* Ensure no duplicate elements on mobile */
    .site-header::before {
        display: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .ice-crystals::before {
        opacity: 0.9;
    }
    
    .vintage-stamp {
        border: 2px solid white;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .ice-crystals::before,
    .puck-bounce,
    .sparkle-drift,
    .float-up {
        animation: none;
    }
    
    .card-reveal {
        transition: opacity 0.3s ease;
        transform: none;
    }
}

/* Technology badges animations */
.tech-badge {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.tech-badge:hover,
a .tech-badge:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Linked tech badges */
a .tech-badge {
    transition: all 0.3s ease;
}

a:hover .tech-badge {
    transform: translateY(-3px) scale(1.08);
}

.tech-badge::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 ease;
}

.tech-badge:hover::before {
    left: 100%;
}

/* Special styling for MyCelf Intelligence badge */
.tech-badge[style*="MyCelf"] {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.tech-badge[style*="MyCelf"]:hover {
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    transform: translateY(-3px) scale(1.08);
}

/* MyCelf Intelligence Brain Logo Integration */
.mycelf-brain-bg {
    position: relative;
}

.mycelf-brain-bg::before {
    content: "";
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 30px;
    background-image: url("https://dont.histick.us/letters/wp-content/uploads/2025/06/Brain-Standalone.png");
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    pointer-events: none;
    opacity: 0.1;
    filter: blur(1px);
}

.mycelf-signature {
    position: relative;
    display: inline-block;
    padding: 8px 15px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 20px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    font-size: 0.85rem;
    color: var(--deep-navy);
    margin: 10px 5px;
}

/* Remove the brain emoji from mycelf-signature */
.mycelf-signature::before {
    display: none;
}

/* AI Neural Network Background Pattern */
.neural-network-bg {
    position: relative;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(102, 126, 234, 0.05) 2px, transparent 2px),
        radial-gradient(circle at 60% 40%, rgba(118, 75, 162, 0.05) 2px, transparent 2px),
        radial-gradient(circle at 80% 80%, rgba(100, 255, 218, 0.05) 2px, transparent 2px);
    background-size: 100px 100px, 150px 150px, 80px 80px;
}

.neural-network-bg::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(45deg, transparent 40%, rgba(102, 126, 234, 0.02) 50%, transparent 60%),
        linear-gradient(-45deg, transparent 40%, rgba(118, 75, 162, 0.02) 50%, transparent 60%);
    pointer-events: none;
}

/* Neural pulse animation for MyCelf branding */
@keyframes neural-pulse {
    0%, 100% { 
        text-shadow: 0 0 5px rgba(102, 126, 234, 0.5), 0 0 10px rgba(102, 126, 234, 0.3);
        transform: scale(1);
    }
    50% { 
        text-shadow: 0 0 10px rgba(102, 126, 234, 0.8), 0 0 20px rgba(118, 75, 162, 0.4);
        transform: scale(1.05);
    }
}

.mycelf-signature .brain-icon,
.tech-badge .brain-icon {
    animation: neural-pulse 3s ease-in-out infinite;
}

/* Enhanced trademark styling - keep only for tech badges */
.tech-badge[style*="MyCelf"] {
    position: relative;
}

/* Remove automatic trademark generation - let it be in the HTML text instead */

/* MyCelf Intelligence connection lines */
@keyframes neural-connect {
    0% { stroke-dashoffset: 100; }
    100% { stroke-dashoffset: 0; }
}

.neural-connection {
    stroke-dasharray: 5,5;
    animation: neural-connect 2s ease-in-out infinite;
}

/* AI-themed decorative animations */
@keyframes ai-pulse {
    0%, 100% { 
        transform: scale(1); 
        opacity: 0.7; 
    }
    50% { 
        transform: scale(1.1); 
        opacity: 1; 
    }
}

.ai-decoration {
    animation: ai-pulse 3s ease-in-out infinite;
}

/* About page specific enhancements */
.about-page h2 {
    position: relative;
    padding-left: 25px;
}

.about-page h2::before {
    content: "⚡";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--vintage-red);
    animation: ai-pulse 2s ease-in-out infinite;
}

.about-page h3 {
    position: relative;
    padding-left: 25px;
}

.about-page h3::before {
    content: "🔗";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--wood-tone);
    animation: ai-pulse 2.5s ease-in-out infinite;
}

/* Enhanced link hover effects */
.about-content a {
    color: var(--vintage-red);
    text-decoration: none;
    position: relative;
    font-weight: 600;
}

.about-content a::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--vintage-red);
    transition: width 0.3s ease;
}

.about-content a:hover::after {
    width: 100%;
}

/* Social Sharing Buttons */
.letter-sharing a,
.letter-sharing button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.letter-sharing a:hover,
.letter-sharing button:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

/* Responsive sharing buttons */
@media (max-width: 768px) {
    .letter-sharing > div {
        flex-direction: column;
        align-items: center;
    }
    
    .letter-sharing a,
    .letter-sharing button {
        width: 200px;
        justify-content: center;
    }
}

/* Meta tag improvements for better social sharing */
.social-preview {
    max-width: 500px;
    margin: 20px auto;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px var(--shadow-subtle);
}

.social-preview-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--deep-navy), #2c4a75);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
}

.social-preview-content {
    padding: 15px;
    background: white;
}

.social-preview-title {
    font-weight: 600;
    color: var(--deep-navy);
    margin-bottom: 5px;
}

.social-preview-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

.social-preview-url {
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-top: 8px;
}