@tailwind base;
@tailwind components;
@tailwind utilities;

/* Custom Styles overriding or supplementing Tailwind */
::selection {
    background-color: #8b5cf6;
    color: white;
}

::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #000000;
}
::-webkit-scrollbar-thumb {
    background: #8b5cf6;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #06b6d4;
}

/* Floating Contact Button Tooltips */
.contact-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.contact-btn:hover {
    transform: scale(1.15) rotate(5deg);
}

.contact-btn::before {
    content: attr(data-tooltip);
    position: absolute;
    right: 80px; /* Adjust for RTL */
    background: rgba(255,255,255,0.9);
    color: #000;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
    white-space: nowrap;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* For LTR in en.html */
[dir="ltr"] .contact-btn::before {
    right: auto;
    left: 80px;
}

.contact-btn:hover::before {
    opacity: 1;
}

/* Logo Glitch Effect */
.logo-glitch {
    position: relative;
}
.logo-glitch::before, .logo-glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    clip: rect(0, 0, 0, 0);
}
.logo-glitch::before {
    left: 2px;
    text-shadow: -2px 0 #06b6d4;
    animation: glitch-anim-1 3s infinite linear alternate-reverse;
}
.logo-glitch::after {
    left: -2px;
    text-shadow: -2px 0 #8b5cf6;
    animation: glitch-anim-2 4s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
    0% { clip: rect(20px, 9999px, 85px, 0); }
    20% { clip: rect(40px, 9999px, 15px, 0); }
    40% { clip: rect(60px, 9999px, 50px, 0); }
    60% { clip: rect(10px, 9999px, 30px, 0); }
    80% { clip: rect(80px, 9999px, 90px, 0); }
    100% { clip: rect(30px, 9999px, 40px, 0); }
}
@keyframes glitch-anim-2 {
    0% { clip: rect(10px, 9999px, 60px, 0); }
    20% { clip: rect(80px, 9999px, 30px, 0); }
    40% { clip: rect(40px, 9999px, 10px, 0); }
    60% { clip: rect(90px, 9999px, 80px, 0); }
    80% { clip: rect(20px, 9999px, 50px, 0); }
    100% { clip: rect(50px, 9999px, 20px, 0); }
}

/* Infinite Marquee Animations */
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(50%); } /* Positive X for RTL */
}
.animate-marquee {
    animation: marquee 25s linear infinite;
    width: max-content;
}
.animate-marquee:hover {
    animation-play-state: paused;
}

@keyframes marquee-ltr {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } /* Negative X for LTR */
}
.animate-marquee-ltr {
    animation: marquee-ltr 25s linear infinite;
    width: max-content;
}
.animate-marquee-ltr:hover {
    animation-play-state: paused;
}

/* 3D Auto-Rotating Carousel */
.carousel-container {
    perspective: 1200px;
    width: 100%;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.carousel-3d {
    width: 340px;
    height: 360px;
    position: relative;
    transform-style: preserve-3d;
    animation: rotate-carousel 24s infinite linear;
}

.carousel-card {
    position: absolute;
    width: 340px;
    height: 360px;
    left: 0;
    top: 0;
    /* backface-visibility: hidden; (Removed so you can see them passing behind) */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    border-radius: 1.5rem;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.carousel-card.card-1 { transform: rotateY(0deg) translateZ(300px); border-color: rgba(6, 182, 212, 0.4); box-shadow: 0 0 30px rgba(6, 182, 212, 0.2); }
.carousel-card.card-2 { transform: rotateY(120deg) translateZ(300px); border-color: rgba(139, 92, 246, 0.4); box-shadow: 0 0 30px rgba(139, 92, 246, 0.2); }
.carousel-card.card-3 { transform: rotateY(240deg) translateZ(300px); border-color: rgba(251, 191, 36, 0.4); box-shadow: 0 0 30px rgba(251, 191, 36, 0.2); }

@keyframes rotate-carousel {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(-360deg); }
}

