/* Dashboard Animations & Visual Effects */

/* Animated Background */
.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(135deg, #f7f5f3 0%, #f2f0ed 50%, #f7f5f3 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

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

/* Floating Shapes */
.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.03;
    animation: float 20s infinite linear;
}

.shape-1 {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #d4a574, #c49963);
    top: 20%;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 25s;
}

.shape-2 {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #8db3a0, #7da491);
    top: 60%;
    left: 80%;
    animation-delay: -5s;
    animation-duration: 30s;
}

.shape-3 {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #f4a261, #e76f51);
    top: 80%;
    left: 20%;
    animation-delay: -10s;
    animation-duration: 22s;
}

.shape-4 {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #d4a574, #c49963);
    top: 10%;
    left: 70%;
    animation-delay: -15s;
    animation-duration: 28s;
}

.shape-5 {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #8db3a0, #7da491);
    top: 40%;
    left: 50%;
    animation-delay: -20s;
    animation-duration: 35s;
}

.shape-6 {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #f4a261, #e76f51);
    top: 70%;
    left: 60%;
    animation-delay: -25s;
    animation-duration: 26s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(30px, -30px) rotate(120deg);
    }
    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }
    100% {
        transform: translate(0, 0) rotate(360deg);
    }
}

/* Gradient Orbs */
.gradient-orbs {
    position: absolute;
    width: 100%;
    height: 100%;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.1;
    animation: orbFloat 20s infinite ease-in-out;
}

.orb-1 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #d4a574, #c49963);
    top: 10%;
    left: -5%;
    animation-delay: 0s;
}

.orb-2 {
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, #8db3a0, #7da491);
    top: 60%;
    right: -5%;
    animation-delay: -10s;
}

.orb-3 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, #f4a261, #e76f51);
    bottom: 10%;
    left: 50%;
    animation-delay: -5s;
}

@keyframes orbFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(20px, -20px) scale(1.1);
    }
}

/* Core Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@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);
    }
}

/* Animation Classes */
.animate-fade-in {
    animation: fadeIn 1s ease-out forwards;
}

.animate-slide-up {
    animation: slideUp 0.8s ease-out forwards;
}

.animate-slide-in {
    animation: slideIn 0.8s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.6s ease-out forwards;
}

.animate-bounce-in {
    animation: bounceIn 1s ease-out forwards;
}

/* Animation Delays */
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }
.delay-4 { animation-delay: 0.8s; }
.delay-5 { animation-delay: 1s; }
.delay-6 { animation-delay: 1.2s; }
.delay-7 { animation-delay: 1.4s; }
.delay-8 { animation-delay: 1.6s; }
.delay-9 { animation-delay: 1.8s; }
.delay-10 { animation-delay: 2s; }

/* Hero Section Enhancements */
.hero-title {
    background: linear-gradient(135deg, #2c2c2c 0%, #6b6b6b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.hero-title::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.4) 50%, transparent 100%);
    animation: textShimmer 3s infinite;
    pointer-events: none;
}

@keyframes textShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Enhanced Buttons */
.btn-primary, .btn-secondary {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transform: translateY(0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover, .btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn-icon {
    transition: transform 0.3s ease;
}

.btn-primary:hover .btn-icon {
    transform: scale(1.2) rotate(5deg);
}

.btn-secondary:hover .btn-icon {
    transform: scale(1.2);
}

.btn-ripple {
    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-primary:active .btn-ripple,
.btn-secondary:active .btn-ripple {
    width: 300px;
    height: 300px;
}

/* Entry Card Enhancements */
.entry-card {
    position: relative;
    transform: translateY(0);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.entry-card::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;
}

.entry-card:hover::before {
    left: 100%;
}

.entry-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.entry-glow {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #d4a574, #8db3a0, #f4a261);
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.entry-card:hover .entry-glow {
    opacity: 0.3;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { filter: blur(5px); }
    to { filter: blur(10px); }
}

.entry-hover-effect {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(212, 165, 116, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.entry-card:hover .entry-hover-effect {
    opacity: 1;
}

/* Community Section */
.community-section {
    position: relative;
    overflow: hidden;
}

.community-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, #8db3a0, #d4a574, #f4a261, #8db3a0);
    opacity: 0.05;
    animation: rotate 20s linear infinite;
    border-radius: 50%;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Journal Illustration Animations */
.animate-float {
    animation: floatAnimation 6s ease-in-out infinite;
}

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

.animate-tilt {
    animation: tiltAnimation 8s ease-in-out infinite;
}

@keyframes tiltAnimation {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(2deg); }
}

.cover-shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 4s infinite;
}

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

.animate-write {
    width: 0;
    animation: writeAnimation 2s ease-out forwards;
}

@keyframes writeAnimation {
    to { width: 100%; }
}

.animate-writing {
    animation: writingMotion 3s ease-in-out infinite;
}

@keyframes writingMotion {
    0%, 100% { transform: rotate(25deg) translateX(0); }
    50% { transform: rotate(30deg) translateX(5px); }
}

.pencil-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: shine 3s infinite;
}

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

.writing-sparkles {
    position: absolute;
    top: -10px;
    right: -10px;
}

.sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #f4a261;
    border-radius: 50%;
    animation: sparkle 1.5s infinite;
}

.sparkle-1 {
    top: 0;
    left: 0;
    animation-delay: 0s;
}

.sparkle-2 {
    top: 5px;
    left: 8px;
    animation-delay: 0.5s;
}

.sparkle-3 {
    top: -3px;
    left: 12px;
    animation-delay: 1s;
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Blog Section Enhancements */
.blog-section {
    position: relative;
}

.blog-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, rgba(141, 179, 160, 0.1) 0%, transparent 70%);
    border-radius: 12px;
    animation: pulse 4s ease-in-out infinite;
}

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

.blog-card {
    position: relative;
    transform: translateX(0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card:hover {
    transform: translateX(5px);
}

.thumbnail-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: thumbnailShine 3s infinite;
}

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

.thumbnail-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: thumbnailPulse 2s infinite;
}

@keyframes thumbnailPulse {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        width: 100%;
        height: 100%;
        opacity: 0;
    }
}

.blog-hover-effect {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.1), rgba(141, 179, 160, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
}

.blog-card:hover .blog-hover-effect {
    opacity: 1;
}

/* Tilt Effect */
[data-tilt] {
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

[data-tilt]:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(5deg);
}

/* Loading States */
.loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmerLoading 1.5s infinite;
}

@keyframes shimmerLoading {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Parallax Effects */
.parallax-element {
    transform: translateZ(0);
    transition: transform 0.1s ease-out;
}

/* Scroll Reveal */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease-out;
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

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

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #d4a574, #8db3a0);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #c49963, #7da491);
}

/* Selection Styling */
::selection {
    background: rgba(212, 165, 116, 0.3);
}

::-moz-selection {
    background: rgba(212, 165, 116, 0.3);
}
