/* Keyframe Animations */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes loading {
    0% { width: 0; }
    100% { width: 100%; }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes rotateGlow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Animation Classes */
.animate-slide-up {
    animation: slideUp 0.8s ease forwards;
}

.animate-fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.animate-slide-left {
    animation: slideInLeft 0.8s ease forwards;
}

.animate-slide-right {
    animation: slideInRight 0.8s ease forwards;
}

.animate-bounce-in {
    animation: bounceIn 0.8s ease forwards;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Hover Animations */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-primary);
}

.hover-glow {
    position: relative;
    overflow: hidden;
}

.hover-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s;
}

.hover-glow:hover::before {
    left: 100%;
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* Loading Animations */
.loading-dots::after {
    content: '';
    animation: loadingDots 1.5s infinite;
}

@keyframes loadingDots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* Pulse Animation */
.pulse {
    animation: pulse 2s infinite;
}

/* Rotate Animation */
.rotate {
    animation: rotateGlow 4s linear infinite;
}

/* Text Animations */
.typewriter {
    overflow: hidden;
    border-right: 2px solid var(--purple);
    white-space: nowrap;
    animation: typewriter 3s steps(40) forwards, blink 0.75s step-end infinite;
}

/* Gradient Background Animation */
.gradient-bg {
    background: linear-gradient(-45deg, var(--primary-black), var(--dark-blue), var(--purple), var(--secondary-black));
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

/* Stagger Animation */
.stagger-animation > * {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.6s ease forwards;
}

.stagger-animation > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-animation > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-animation > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-animation > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-animation > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-animation > *:nth-child(6) { animation-delay: 0.6s; }

/* Parallax Effect */
.parallax {
    transform: translateZ(0);
    transition: transform 0.1s ease;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Intersection Observer Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* Button Animations */
/* Button Animations */
.btn-animate {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-animate::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;
}

.btn-animate:hover::before {
    left: 100%;
}

.btn-animate:active {
    transform: scale(0.98);
}

/* Card Flip Animation */
.flip-card {
    background-color: transparent;
    perspective: 1000px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.flip-card-back {
    transform: rotateY(180deg);
}

/* Ripple Effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::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;
}

.ripple:active::before {
    width: 300px;
    height: 300px;
}

/* Packages Section - Animasyonlu Arkaplan */
.packages-section {
    background: var(--primary-black);
    position: relative;
    overflow: hidden;
}

/* Animasyonlu parçacık sistemi */
.packages-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(107, 70, 193, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(139, 92, 246, 0.06) 0%, transparent 50%);
    animation: backgroundFloat 20s ease-in-out infinite;
    z-index: 0;
}

/* Üst gradient çizgi */
.packages-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    z-index: 1;
}

/* Floating dots animasyonu */
.packages-section .container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 10% 20%, #6b46c1 1px, transparent 1px),
        radial-gradient(circle at 90% 30%, #3b82f6 1px, transparent 1px),
        radial-gradient(circle at 30% 70%, #8b5cf6 1px, transparent 1px),
        radial-gradient(circle at 70% 80%, #6b46c1 1px, transparent 1px),
        radial-gradient(circle at 50% 10%, #3b82f6 1px, transparent 1px);
    background-size: 200px 200px, 300px 300px, 250px 250px, 180px 180px, 320px 320px;
    animation: floatingDots 25s linear infinite;
    opacity: 0.3;
    z-index: 0;
    pointer-events: none;
}

/* Container relative positioning */
.packages-section .container {
    position: relative;
    z-index: 2;
}

/* Package cards enhanced */
.package-card {
    background: rgba(42, 42, 42, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid rgba(107, 70, 193, 0.3);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    z-index: 3;
}

/* Glow effect on hover */
.package-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(107, 70, 193, 0.1), transparent);
    transition: all 0.6s ease;
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
    z-index: -1;
}

.package-card:hover::before {
    transform: translateX(0) translateY(0) rotate(45deg);
}

.package-card:hover {
    transform: translateY(-15px) scale(1.02);
    border-color: var(--light-purple);
    box-shadow: 
        var(--shadow-primary),
        0 0 30px rgba(107, 70, 193, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Pulsing border animation */
.package-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    padding: 1px;
    background: linear-gradient(45deg, var(--purple), var(--light-purple), var(--accent-blue));
    mask: linear-gradient(white 0 0) content-box, linear-gradient(white 0 0);
    mask-composite: subtract;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.package-card:hover::after {
    opacity: 0.8;
    animation: borderPulse 2s ease-in-out infinite;
}

/* Section title enhanced */
.packages-section .section-title {
    position: relative;
    z-index: 3;
    text-shadow: 0 0 20px rgba(107, 70, 193, 0.3);
}

/* Keyframe animations */
@keyframes backgroundFloat {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg);
        opacity: 0.8;
    }
    25% { 
        transform: translateY(-20px) rotate(1deg);
        opacity: 0.6;
    }
    50% { 
        transform: translateY(-10px) rotate(-1deg);
        opacity: 0.9;
    }
    75% { 
        transform: translateY(-30px) rotate(0.5deg);
        opacity: 0.7;
    }
}

@keyframes floatingDots {
    0% { 
        transform: translateY(0px) translateX(0px);
    }
    25% { 
        transform: translateY(-10px) translateX(5px);
    }
    50% { 
        transform: translateY(-20px) translateX(-5px);
    }
    75% { 
        transform: translateY(-5px) translateX(3px);
    }
    100% { 
        transform: translateY(0px) translateX(0px);
    }
}

@keyframes borderPulse {
    0%, 100% { 
        opacity: 0.8;
        transform: scale(1);
    }
    50% { 
        opacity: 0.4;
        transform: scale(1.02);
    }
}

/* Package grid enhanced */
.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    position: relative;
    z-index: 2;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .packages-section::before {
        opacity: 0.5;
    }
    
    .packages-section .container::before {
        opacity: 0.2;
    }
    
    .packages-grid {
        gap: 1.5rem;
    }
    
    .package-card:hover {
        transform: translateY(-10px) scale(1.01);
    }
}

/* Loading state için */
.package-card.loading {
    opacity: 0;
    transform: translateY(50px);
    animation: packageSlideIn 0.6s ease forwards;
}

@keyframes packageSlideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger animation delays */
.package-card:nth-child(1) { animation-delay: 0.1s; }
.package-card:nth-child(2) { animation-delay: 0.2s; }
.package-card:nth-child(3) { animation-delay: 0.3s; }
.package-card:nth-child(4) { animation-delay: 0.4s; }
.package-card:nth-child(5) { animation-delay: 0.5s; }
.package-card:nth-child(6) { animation-delay: 0.6s; }

/* Who Am I Section Specific Animation */
@keyframes whoAmIFadeIn {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    50% {
        opacity: 0.7;
        transform: translateY(15px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes whoAmIProfileSlide {
    0% {
        opacity: 0;
        transform: translateX(-50px) rotate(-5deg);
    }
    100% {
        opacity: 1;
        transform: translateX(0) rotate(0deg);
    }
}

@keyframes whoAmIContentSlide {
    0% {
        opacity: 0;
        transform: translateX(50px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes whoAmIStatsCount {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Who Am I Animation Classes */
.whoami-section-animate {
    animation: whoAmIFadeIn 0.8s ease-out forwards;
}

.whoami-profile-animate {
    animation: whoAmIProfileSlide 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

.whoami-content-animate {
    animation: whoAmIContentSlide 0.8s ease-out 0.4s forwards;
    opacity: 0;
}

.whoami-stats-animate {
    animation: whoAmIStatsCount 0.6s ease-out 0.6s forwards;
    opacity: 0;
}

/* Hover Effects for Who Am I */
.whoami-profile-card {
    transition: all 0.3s ease;
}

.whoami-profile-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 15px 35px rgba(107, 70, 193, 0.3);
}

.whoami-skill-item {
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateX(-20px);
}

.whoami-skill-item.animate {
    opacity: 1;
    transform: translateX(0);
}

.whoami-skill-item:hover {
    transform: translateX(10px);
    color: var(--light-purple);
}

/* Stagger animation for skills */
.whoami-skill-item:nth-child(1) { animation-delay: 0.8s; }
.whoami-skill-item:nth-child(2) { animation-delay: 0.9s; }
.whoami-skill-item:nth-child(3) { animation-delay: 1.0s; }
.whoami-skill-item:nth-child(4) { animation-delay: 1.1s; }
.whoami-skill-item:nth-child(5) { animation-delay: 1.2s; }
.whoami-skill-item:nth-child(6) { animation-delay: 1.3s; }

/* Mission text animation */
.whoami-mission-animate {
    opacity: 0;
    transform: translateY(20px);
    animation: whoAmIFadeIn 0.8s ease-out 1.0s forwards;
}