/* ================================
   ANONIFANS - PROFESSIONAL CSS
   Theme: Cyan/Turquoise
   ================================ */

/* ================================
   ROOT VARIABLES & RESET
   ================================ */
:root {
    /* Cyan Color Palette */
    --primary-cyan: #00D4FF;
    --cyan-light: #5DFDFF;
    --cyan-dark: #00A8CC;
    --cyan-darker: #007A99;
    --cyan-glow: rgba(0, 212, 255, 0.3);
    --cyan-shadow: rgba(0, 212, 255, 0.2);
    
    /* Supporting Colors */
    --dark-bg: #0A0E1A;
    --darker-bg: #060914;
    --card-bg: #111827;
    --text-primary: #FFFFFF;
    --text-secondary: #94A3B8;
    --accent-purple: #8B5CF6;
    --accent-pink: #EC4899;
    --success: #10B981;
    --warning: #F59E0B;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #00D4FF 0%, #00A8CC 50%, #8B5CF6 100%);
    --gradient-card: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
    --gradient-glow: radial-gradient(circle at 50% 50%, rgba(0, 212, 255, 0.15) 0%, transparent 70%);
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 212, 255, 0.1);
    --shadow-md: 0 4px 20px rgba(0, 212, 255, 0.15);
    --shadow-lg: 0 10px 40px rgba(0, 212, 255, 0.2);
    --shadow-xl: 0 20px 60px rgba(0, 212, 255, 0.3);
    --shadow-glow: 0 0 30px rgba(0, 212, 255, 0.5);
    
    /* Animations */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--darker-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Animated Background Effect */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 20% 80%, var(--cyan-glow) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 40% 40%, rgba(236, 72, 153, 0.05) 0%, transparent 50%);
    animation: backgroundShift 20s ease-in-out infinite;
    z-index: -1;
}

@keyframes backgroundShift {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(90deg) scale(1.1); }
    50% { transform: rotate(180deg) scale(1); }
    75% { transform: rotate(270deg) scale(1.1); }
}

/* ================================
   ANIMATIONS LIBRARY
   ================================ */

/* Entrance Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-180deg) scale(0.8);
    }
    to {
        opacity: 1;
        transform: rotate(0) scale(1);
    }
}

/* Loop Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 var(--cyan-glow);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 0 20px 10px var(--cyan-glow);
    }
}

@keyframes glow {
    0%, 100% { 
        box-shadow: 0 0 20px var(--cyan-shadow),
                    inset 0 0 20px rgba(0, 212, 255, 0.05);
    }
    50% { 
        box-shadow: 0 0 40px var(--cyan-glow),
                    inset 0 0 30px rgba(0, 212, 255, 0.1);
    }
}

@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

@keyframes borderGlow {
    0%, 100% {
        border-color: var(--primary-cyan);
        box-shadow: 0 0 5px var(--cyan-shadow);
    }
    50% {
        border-color: var(--cyan-light);
        box-shadow: 0 0 20px var(--cyan-glow);
    }
}

@keyframes textGlow {
    0%, 100% {
        text-shadow: 0 0 10px var(--cyan-shadow),
                     0 0 20px var(--cyan-shadow);
    }
    50% {
        text-shadow: 0 0 20px var(--cyan-glow),
                     0 0 40px var(--cyan-glow);
    }
}

/* ================================
   HERO SECTION
   ================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem;
    position: relative;
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--darker-bg) 100%);
    overflow: hidden;
}

/* Animated particles background */
.hero::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, white, transparent),
        radial-gradient(2px 2px at 60% 70%, var(--primary-cyan), transparent),
        radial-gradient(1px 1px at 50% 50%, white, transparent);
    background-size: 50vw 50vh;
    animation: particlesFloat 30s linear infinite;
}

@keyframes particlesFloat {
    from { transform: translateY(0); }
    to { transform: translateY(-100vh); }
}

.hero-content {
    flex: 1;
    max-width: 600px;
    z-index: 2;
    animation: fadeInLeft 1s ease-out;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textGlow 3s ease-in-out infinite;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.4s both;
}

/* ================================
   BUTTONS
   ================================ */
.btn {
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    white-space: nowrap;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
    animation: pulse 2s infinite;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.btn-outline {
    background: transparent;
    color: var(--primary-cyan);
    border: 2px solid var(--primary-cyan);
    animation: borderGlow 2s ease-in-out infinite;
}

.btn-outline:hover {
    background: var(--cyan-glow);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-large {
    padding: 1.125rem 2.5rem;
    font-size: 1.125rem;
}

/* ================================
   STATS
   ================================ */
.stats {
    display: flex;
    gap: 3rem;
    animation: fadeInUp 1s ease-out 0.6s both;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
    position: relative;
}

.stat::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-primary);
    animation: shimmer 3s linear infinite;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-cyan);
    animation: countUp 2s ease-out;
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ================================
   HERO CARDS
   ================================ */
.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-cards {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: 600px;
}

.hero-card {
    position: absolute;
    width: 280px;
    height: 380px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    transition: all var(--transition-normal);
    cursor: pointer;
    animation: float 6s ease-in-out infinite;
}

.hero-card.card-1 {
    top: 0;
    left: 0;
    z-index: 3;
    animation-delay: 0s;
    animation: fadeInRight 1s ease-out 0.5s both, float 6s ease-in-out 1.5s infinite;
}

.hero-card.card-2 {
    top: 50px;
    left: 100px;
    z-index: 2;
    animation-delay: 2s;
    animation: fadeInRight 1s ease-out 0.7s both, float 6s ease-in-out 1.7s infinite;
}

.hero-card.card-3 {
    top: 100px;
    left: 200px;
    z-index: 1;
    animation-delay: 4s;
    animation: fadeInRight 1s ease-out 0.9s both, float 6s ease-in-out 1.9s infinite;
}

.hero-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 30px 60px rgba(0, 212, 255, 0.4);
    z-index: 10;
}

.hero-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.hero-card:hover img {
    transform: scale(1.1);
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transform: translateY(100%);
    transition: transform var(--transition-normal);
}

.hero-card:hover .card-overlay {
    transform: translateY(0);
}

.card-overlay span {
    color: white;
    font-weight: 600;
}

.card-overlay .price {
    background: var(--gradient-primary);
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.875rem;
    animation: pulse 2s infinite;
}

/* ================================
   CATEGORIES SECTION
   ================================ */
.categories {
    padding: 6rem 2rem;
    background: var(--dark-bg);
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 4rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInDown 1s ease-out;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
    animation: shimmer 3s linear infinite;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.category-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    border: 1px solid rgba(0, 212, 255, 0.1);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    animation: scaleIn 0.6s ease-out;
    animation-fill-mode: both;
}

.category-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: var(--gradient-glow);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.category-card:hover::before {
    opacity: 1;
}

.category-card:nth-child(1) { animation-delay: 0.1s; }
.category-card:nth-child(2) { animation-delay: 0.2s; }
.category-card:nth-child(3) { animation-delay: 0.3s; }
.category-card:nth-child(4) { animation-delay: 0.4s; }
.category-card:nth-child(5) { animation-delay: 0.5s; }
.category-card:nth-child(6) { animation-delay: 0.6s; }

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-cyan);
    animation: glow 2s ease-in-out infinite;
}

.category-card i {
    font-size: 3rem;
    color: var(--primary-cyan);
    margin-bottom: 1.5rem;
    display: block;
    animation: float 4s ease-in-out infinite;
}

.category-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.category-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ================================
   MODAL
   ================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 24px;
    width: 90%;
    max-width: 600px;
    border: 1px solid var(--cyan-dark);
    box-shadow: var(--shadow-xl);
    animation: scaleIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close:hover {
    color: var(--primary-cyan);
    background: var(--cyan-glow);
    transform: rotate(90deg);
}

.modal-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.join-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.join-option {
    padding: 2rem;
    border-radius: 16px;
    border: 2px solid rgba(0, 212, 255, 0.2);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.join-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-glow);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.join-option:hover {
    transform: translateY(-5px);
    border-color: var(--primary-cyan);
    box-shadow: var(--shadow-lg);
}

.join-option:hover::before {
    opacity: 1;
}

.join-option i {
    font-size: 2.5rem;
    color: var(--primary-cyan);
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.join-option h3 {
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
}

.join-option p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    position: relative;
    z-index: 1;
}

.join-option .btn {
    width: 100%;
    position: relative;
    z-index: 1;
}

.login-link {
    text-align: center;
    color: var(--text-secondary);
    margin-top: 2rem;
}

.login-link a {
    color: var(--primary-cyan);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.login-link a:hover {
    text-decoration: underline;
    text-shadow: 0 0 10px var(--cyan-glow);
}

/* ================================
   FOOTER
   ================================ */
.footer {
    background: linear-gradient(to bottom, var(--dark-bg), var(--darker-bg));
    padding: 4rem 2rem 2rem;
    margin-top: 6rem;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-primary);
    animation: shimmer 5s linear infinite;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    animation: fadeInUp 1s ease-out;
}

.footer-section h3,
.footer-section h4 {
    color: var(--primary-cyan);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.footer-section p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.footer-section a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 0;
    transition: all var(--transition-fast);
    position: relative;
}

.footer-section a::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-normal);
}

.footer-section a:hover {
    color: var(--primary-cyan);
    transform: translateX(5px);
}

.footer-section a:hover::before {
    width: 100%;
}

.footer-bottom {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 212, 255, 0.1);
    color: var(--text-secondary);
    animation: fadeIn 1s ease-out 0.5s both;
}

/* ================================
   RESPONSIVE DESIGN
   ================================ */
@media (max-width: 1024px) {
    .hero {
        flex-direction: column;
        gap: 4rem;
        padding: 4rem 2rem;
    }
    
    .hero-content {
        max-width: 100%;
        text-align: center;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .stats {
        justify-content: center;
    }
    
    .hero-cards {
        height: 400px;
    }
    
    .hero-card {
        width: 200px;
        height: 280px;
    }
    
    .hero-card.card-2 {
        left: 60px;
    }
    
    .hero-card.card-3 {
        left: 120px;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .stats {
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
    }
    
    .stat {
        text-align: center;
    }
    
    .hero-image {
        width: 100%;
        overflow: hidden;
    }
    
    .hero-cards {
        transform: scale(0.8);
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .modal-content {
        padding: 2rem;
        width: 95%;
    }
    
    .join-options {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-section a {
        display: inline-block;
        margin: 0 1rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 2rem 1rem;
        min-height: auto;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .hero-cards {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        height: auto;
    }
    
    .hero-card {
        position: relative;
        top: auto !important;
        left: auto !important;
        width: 250px;
        height: 320px;
    }
    
    .categories {
        padding: 3rem 1rem;
    }
    
    .category-card {
        padding: 1.5rem;
    }
    
    .modal-content {
        padding: 1.5rem;
    }
}

/* ================================
   PERFORMANCE OPTIMIZATIONS
   ================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Loading animation for images */
img {
    background: linear-gradient(90deg, var(--card-bg) 25%, rgba(0, 212, 255, 0.1) 50%, var(--card-bg) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

img[src] {
    background: none;
    animation: none;
}

/* Smooth scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-cyan);
}

/* Focus styles for accessibility */
*:focus {
    outline: 2px solid var(--primary-cyan);
    outline-offset: 2px;
}