/* LimeCounter Custom Styles */

/* Custom Font Declarations */
@font-face {
    font-family: 'GamjaFlower';
    src: url('../fonts/GamjaFlower-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'ShortStack';
    src: url('../fonts/ShortStack-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --lime-green: #c1e090;
    --lime-dark: #506d44;
    --lime-accent: #7FA556;
    --jar-color: #F5E8C0;
    --background: #fef9e0;
    --font-primary: 'GamjaFlower', 'Comic Sans MS', 'Chalkboard SE', 'Segoe UI', sans-serif;
    --font-secondary: 'ShortStack', 'Comic Sans MS', 'Chalkboard SE', 'Segoe UI', sans-serif;
}

body {
    background-color: var(--background);
    font-family: var(--font-primary);
    color: var(--lime-dark);
}

.counter-number {
    font-family: var(--font-primary);
    font-weight: 800;
    line-height: 1;
    transition: color 0.2s ease;
}

.counter-number:hover {
    color: var(--lime-accent);
}

.counter-number-container {
    position: relative;
    display: inline-block;
}

.counter-label {
    font-family: var(--font-secondary);
    font-weight: 500;
    line-height: 1.2;
}

.link {
    font-weight: 800;
    transition: color 0.2s ease;
}

.link:hover {
    color: var(--color-sky-400);
}

/* Tooltip styling */
.tooltip {
    font-family: var(--font-secondary);
    font-size: 1rem;
    pointer-events: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.tooltip-arrow {
    border-top-color: var(--color-lime-100); /* Match tooltip background */
}

/* Lime animations */
@keyframes bounce-lime {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-10px) scale(1.05);
    }
}

.animate-lime {
    animation: bounce-lime 3s ease-in-out infinite;
    animation-delay: var(--animation-delay, 0ms);
}

/* Character animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(1deg);
    }
    50% {
        transform: translateY(-15px) rotate(0deg);
    }
    75% {
        transform: translateY(-5px) rotate(-1deg);
    }
}

.floating {
    animation: float 6s ease-in-out infinite;
}

/* Character styling with rounded borders and fade effect */
.character-container {
    position: relative;
    display: inline-block;
    border-radius: 30px;
    overflow: hidden;
    /* box-shadow: 0 0 20px rgba(80, 109, 68, 0.15); */
}

.character-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        circle at center,
        transparent 50%,
        var(--background) 90%
    );
    pointer-events: none;
    z-index: 10;
    border-radius: 30px;
}

.character-image {
    display: block;
    border-radius: 33px;
    position: relative;
    z-index: 5;
    transition: all 0.3s ease;
}

.character-container:hover .character-image {
    transform: scale(1.05);
}

.character-container:hover::before {
    background: radial-gradient(
        circle at center,
        transparent 70%,
        var(--background) 100%
    );
}

/* Lime Jar styles */
.lime-jar-container {
    max-width: 400px;
    margin: 0 auto;
}

.jar-image {
    position: relative;
    width: 100%;
}

.jar-body {
    /* This creates the container area for the limes inside the jar */
    position: absolute;
    perspective: 800px; /* Add 3D perspective for more realistic dropping */
}

/* Lime drop effect styles */
.lime {
    will-change: transform, opacity, top, left;
    backface-visibility: hidden;
    transform-style: preserve-3d;
}

.lime.lime-dropped {
    transition: top 0.8s cubic-bezier(0.70, 0, 0.85, 1.2), 
                left 0.8s ease, 
                transform 0.8s ease;
}

/* Logo spin */
@keyframes slow-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.lime-spin {
    animation: slow-spin 30s linear infinite;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lime-spin img {
    max-width: 100%;
    height: auto;
    /* Ensure the image keeps its aspect ratio */
    transform-origin: center;
}

/* Title styling */
h1.text-lime-800 {
    font-family: var(--font-primary);
    letter-spacing: 0.5px;
}

/* Message styling */
.message {
    font-family: var(--font-secondary);
}
