/**
 * Growzy Visual Upgrade 2025
 * Modern, profesyonel ve performanslı UI/UX iyilestirmeleri
 * Mevcut CSS degiskenlerini kullanir
 */

/* ========================================
   GLOBAL ENHANCEMENTS - Genel Iyilestirmeler
   ======================================== */

/* Smooth Scroll - Sayfa icinde yumusak gecis */
html {
    scroll-behavior: smooth;
}

/* Selection stilini degistir */
::selection {
    background: rgba(99, 102, 241, 0.2);
    color: var(--color-text-primary);
}

/* Focus state iyilestirmesi - Erisilebilirlik */
*:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
    transition: outline-offset 0.2s ease;
}

/* Global transition yumusakligi */
*, *::before, *::after {
    transition-property: transform, box-shadow, background-color, border-color, opacity;
    transition-duration: 0.2s;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   HERO SECTION - Premium Yukseltme
   ======================================== */

.hero-modern {
    background: linear-gradient(135deg,
        #6366f1 0%,
        #8b5cf6 35%,
        #a855f7 65%,
        #c084fc 100%);
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
    position: relative;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Hero arkaplana parildayan yildizlar */
.hero-modern::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(2px 2px at 20% 30%, rgba(255, 255, 255, 0.4), transparent),
        radial-gradient(2px 2px at 40% 70%, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(1px 1px at 60% 20%, rgba(255, 255, 255, 0.5), transparent),
        radial-gradient(2px 2px at 80% 50%, rgba(255, 255, 255, 0.35), transparent),
        radial-gradient(1px 1px at 90% 80%, rgba(255, 255, 255, 0.4), transparent);
    pointer-events: none;
    animation: twinkle 5s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Hero Badge - Daha dikkat cekici */
.hero-badge-new {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
    animation: fadeInUp 0.8s ease-out, badgePulse 3s ease-in-out infinite 1s;
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
    50% { box-shadow: 0 4px 30px rgba(255, 255, 255, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
}

/* Hero Title - Text Shadow ile derinlik */
.hero-title-new {
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

/* 10x Vurgu - Daha canli */
.highlight-gradient {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #ef4444 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 10px rgba(251, 191, 36, 0.4));
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { filter: drop-shadow(0 2px 10px rgba(251, 191, 36, 0.4)); }
    to { filter: drop-shadow(0 2px 20px rgba(251, 191, 36, 0.6)); }
}

/* CTA Butonlari - Premium Hover */
.btn-hero-primary {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.btn-hero-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
    transition: left 0.5s ease;
}

.btn-hero-primary:hover::before {
    left: 100%;
}

.btn-hero-primary:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.btn-hero-primary:active {
    transform: translateY(-2px) scale(1.01);
}

.btn-hero-secondary {
    position: relative;
    overflow: hidden;
}

.btn-hero-secondary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.btn-hero-secondary:hover::after {
    width: 300px;
    height: 300px;
}

.btn-hero-secondary:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.6);
}

/* Trust Avatars - Animated stack */
.avatar {
    transition: transform 0.3s ease, margin 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.avatar-stack:hover .avatar {
    margin-left: 0;
}

.avatar:hover {
    transform: scale(1.15);
    z-index: 10;
}

/* Visual Cards - 3D Etkisi */
.visual-card {
    transform-style: preserve-3d;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.visual-card:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.card-1 { animation: cardFloat1 6s ease-in-out infinite; }
.card-2 { animation: cardFloat2 5s ease-in-out infinite 0.5s; }
.card-3 { animation: cardFloat3 7s ease-in-out infinite 1s; }

@keyframes cardFloat1 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes cardFloat2 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(2deg); }
}

@keyframes cardFloat3 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* Chart bars animated */
.chart-bar {
    animation: chartGrow 1s ease-out forwards;
    animation-delay: calc(var(--delay, 0) * 0.1s);
    transform-origin: bottom;
}

.card-chart .chart-bar:nth-child(1) { --delay: 1; }
.card-chart .chart-bar:nth-child(2) { --delay: 2; }
.card-chart .chart-bar:nth-child(3) { --delay: 3; }
.card-chart .chart-bar:nth-child(4) { --delay: 4; }

@keyframes chartGrow {
    from { transform: scaleY(0); }
    to { transform: scaleY(1); }
}

/* ========================================
   FEATURES SECTION - Kart Iyilestirmeleri
   ======================================== */

.feature-card-modern {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.feature-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #a855f7);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card-modern:hover::before {
    transform: scaleX(1);
}

.feature-card-modern:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 60px rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
}

/* Feature icon pulse */
.feature-icon-modern {
    position: relative;
    transition: transform 0.3s ease;
}

.feature-card-modern:hover .feature-icon-modern {
    transform: scale(1.1);
}

.feature-icon-modern::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card-modern:hover .feature-icon-modern::after {
    animation: iconPulse 1s ease-out;
}

@keyframes iconPulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
        box-shadow: 0 0 0 0 currentColor;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
        box-shadow: 0 0 20px 10px transparent;
    }
}

/* Feature highlight - Parlak efekt */
.feature-highlight {
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.3);
}

.feature-highlight::before {
    display: none;
}

.feature-highlight:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 30px 80px rgba(99, 102, 241, 0.4);
}

/* ========================================
   TESTIMONIAL CARDS - Referans Kartlari
   ======================================== */

.testimonial-card {
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, transparent 0%, rgba(99, 102, 241, 0.1) 100%) border-box;
}

.testimonial-card::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 4rem;
    line-height: 1;
    color: rgba(99, 102, 241, 0.08);
    font-family: Georgia, serif;
    pointer-events: none;
}

.testimonial-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(99, 102, 241, 0.12);
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%) border-box;
}

.testimonial-avatar {
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover .testimonial-avatar {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.result-badge {
    position: relative;
    overflow: hidden;
}

.result-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: badgeShine 3s infinite;
}

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

/* ========================================
   CTA SECTION - Final Cagri
   ======================================== */

.cta-box-modern {
    position: relative;
    overflow: hidden;
}

.cta-box-modern::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(255, 255, 255, 0.1), transparent 30%);
    animation: ctaRotate 10s linear infinite;
}

@keyframes ctaRotate {
    100% { transform: rotate(360deg); }
}

.cta-content-modern {
    position: relative;
    z-index: 5;
}

.cta-emoji {
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.btn-cta-primary {
    position: relative;
    overflow: hidden;
    animation: ctaGlow 2s ease-in-out infinite;
}

@keyframes ctaGlow {
    0%, 100% { box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2); }
    50% { box-shadow: 0 10px 50px rgba(255, 255, 255, 0.3); }
}

.btn-cta-primary:hover {
    transform: translateY(-5px) scale(1.02);
}

.cta-feature-item {
    transition: transform 0.3s ease;
}

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

.cta-guarantee {
    animation: fadeIn 1s ease-out 0.5s both;
}

/* ========================================
   COMMUNITY FEED - Post Kartlari
   ======================================== */

/* Feed Post Card - Premium hover */
.feed-post,
.gz-post-card {
    position: relative;
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feed-post::after,
.gz-post-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    opacity: 0;
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.15);
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.feed-post:hover,
.gz-post-card:hover {
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.2);
}

.feed-post:hover::after,
.gz-post-card:hover::after {
    opacity: 1;
}

/* Post Avatar - Hover glow */
.post-avatar,
.post-author-avatar {
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-avatar::after,
.post-author-avatar::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feed-post:hover .post-avatar::after,
.feed-post:hover .post-author-avatar::after {
    opacity: 1;
}

.feed-post:hover .post-avatar,
.feed-post:hover .post-author-avatar {
    transform: scale(1.05);
}

/* Action Buttons - Like, Comment */
.post-action,
.gz-action-btn {
    position: relative;
    overflow: hidden;
}

.post-action::before,
.gz-action-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.post-action:hover::before,
.gz-action-btn:hover::before {
    width: 120%;
    height: 120%;
}

.post-action:hover,
.gz-action-btn:hover {
    transform: scale(1.05);
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* Like Button Active State - Kalp animasyonu */
.post-action.liked,
.like-btn.active {
    animation: likeHeart 0.4s ease;
}

@keyframes likeHeart {
    0% { transform: scale(1); }
    25% { transform: scale(1.2); }
    50% { transform: scale(0.9); }
    75% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* ========================================
   SIDEBAR ENHANCEMENTS - Kenar Cubugu
   ======================================== */

.sidebar-card {
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.sidebar-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
}

/* Stats Widget - Animated numbers */
.stat-number {
    transition: transform 0.3s ease;
}

.stat-item:hover .stat-number {
    transform: scale(1.1);
}

/* Online indicator - Pulse */
.stat-number.online-indicator::before {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    animation: onlinePulse 2s infinite;
}

@keyframes onlinePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Trending items - Hover slide */
a.trending-item {
    position: relative;
    overflow: hidden;
}

a.trending-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, #6366f1, #8b5cf6);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.3s ease;
}

a.trending-item:hover::before {
    transform: scaleY(1);
}

/* Active Members - Avatar hover */
.active-member-item {
    transition: all 0.3s ease;
}

.active-member-item:hover {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8ecff 100%);
    transform: translateX(8px);
}

.active-member-item:hover .member-avatar {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

/* ========================================
   BUTTONS - Genel Buton Stilleri
   ======================================== */

.btn,
button:not(.toolbar-btn):not(.ideas-close):not(.search-clear) {
    position: relative;
    overflow: hidden;
}

.btn::after,
.btn-primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.5s ease;
}

.btn:active::after,
.btn-primary:active::after {
    transform: translate(-50%, -50%) scale(40);
    transition: transform 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

/* ========================================
   COMPOSER - Post Olusturma Kutusu
   ======================================== */

.skool-composer {
    transition: all 0.3s ease;
}

.skool-composer:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 8px 40px rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.1);
}

/* Toolbar buttons - Animated */
.toolbar-btn {
    transition: all 0.2s ease;
}

.toolbar-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
}

.toolbar-btn:active {
    transform: translateY(0) scale(0.98);
}

/* Submit button - Pulse on ready */
.composer-submit-btn:not(:disabled) {
    animation: submitReady 2s ease-in-out infinite;
}

@keyframes submitReady {
    0%, 100% { box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35); }
    50% { box-shadow: 0 4px 25px rgba(99, 102, 241, 0.5); }
}

/* Category Pills - Modern */
.cat-pill {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.cat-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.cat-pill.active {
    transform: translateY(-1px);
}

/* ========================================
   LOADING STATES - Skeleton Screens
   ======================================== */

.loading-spinner,
.feed-posts.loading::before {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

/* Skeleton shimmer effect */
@keyframes skeleton {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

.skeleton-loader {
    background: linear-gradient(90deg,
        #f0f0f0 0px,
        #e0e0e0 40px,
        #f0f0f0 80px);
    background-size: 200px 100%;
    animation: skeleton 1.2s ease-in-out infinite;
    border-radius: 4px;
}

/* ========================================
   MODALS & POPUPS - Modal Gelistirmeleri
   ======================================== */

.lightbox {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
}

.emoji-picker-popup,
.gif-picker-popup,
.notification-dropdown {
    animation: popIn 0.25s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ========================================
   FORMS - Form Elementleri
   ======================================== */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
textarea,
select {
    transition: all 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    transform: translateY(-1px);
}

/* ========================================
   SCROLL INDICATORS
   ======================================== */

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #cbd5e1, #94a3b8);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #94a3b8, #64748b);
}

/* ========================================
   MOBILE OPTIMIZATIONS - Mobil
   ======================================== */

@media (max-width: 768px) {
    /* Touch-friendly interactions */
    .btn,
    .post-action,
    .cat-pill,
    .trending-item {
        min-height: 44px;
        min-width: 44px;
    }

    /* Reduce animations on mobile for performance */
    .hero-modern::after,
    .float-element {
        animation: none;
    }

    /* Simplified hover states */
    .feed-post:hover,
    .feature-card-modern:hover {
        transform: none;
    }

    /* Improve tap feedback */
    .btn:active,
    .post-action:active,
    .cat-pill:active {
        transform: scale(0.97);
        opacity: 0.9;
    }
}

/* ========================================
   DARK MODE PREPARATION - Karanlik Mod
   ======================================== */

@media (prefers-color-scheme: dark) {
    /* Sadece kullanici sistemi dark mode ise */
    /* Su an aktif degil - ileride kullanilabilir */
}

/* ========================================
   REDUCED MOTION - Azaltilmis Hareket
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* ========================================
   PRINT STYLES - Yazici Icin
   ======================================== */

@media print {
    .hero-modern {
        background: #6366F1 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .feed-sidebar,
    .composer-toolbar,
    .post-actions {
        display: none;
    }
}
