* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.animation-test-page {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    min-height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
    background: #0f0f0f;
}

.animation-test-screen {
    --animation-test-panel-height: 40vh;
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: #0f0f0f;
    overflow: hidden;
}

.animation-test-back-button {
    position: fixed;
    top: max(1rem, env(safe-area-inset-top));
    left: 1rem;
    border: none;
    border-radius: 999px;
    padding: 0.55rem 0.9rem;
    background: rgba(15, 15, 15, 0.8);
    color: #f5f5f5;
    font-size: 0.95rem;
    line-height: 1;
    cursor: pointer;
    z-index: 20;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    -webkit-transform: translateZ(0);
    transform-style: preserve-3d;
}

.animation-test-screen.show-back-button .animation-test-back-button {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.animation-test-description-button {
    position: fixed;
    bottom: max(1rem, env(safe-area-inset-bottom));
    right: 1rem;
    border: none;
    border-radius: 999px;
    padding: 0.55rem 0.9rem;
    background: rgba(15, 15, 15, 0.8);
    color: #f5f5f5;
    font-size: 0.95rem;
    line-height: 1;
    cursor: pointer;
    z-index: 20;
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    -webkit-transform: translateZ(0);
    transform-style: preserve-3d;
}

.animation-test-screen.show-back-button .animation-test-description-button {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.animation-test-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    cursor: pointer;
    clip-path: circle(84px at 50% 50%);
    transition: clip-path 2.5s ease-in-out, transform 0.9s ease;
    touch-action: pan-y;
}

.animation-test-embla-container {
    display: flex;
    height: 100%;
    touch-action: pan-y;
}

.animation-test-image:not(.carousel-swipable) .animation-test-embla-container {
    pointer-events: none;
}

.animation-test-embla-slide {
    position: relative;
    flex: 0 0 100%;
    min-width: 0;
    height: 100%;
}

.animation-test-embla-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.animation-test-slide-date {
    position: absolute;
    top: max(1rem, env(safe-area-inset-top));
    right: max(1rem, env(safe-area-inset-right));
    margin: 0;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: rgba(15, 15, 15, 0.78);
    color: #f5f5f5;
    font-size: 0.85rem;
    line-height: 1;
    z-index: 4;
}

.animation-test-image.is-expanded {
    clip-path: circle(150vmax at 50% 50%);
}
/* this controls how far up the description goes */
.animation-test-screen.show-panel .animation-test-image {
    transform: translateY(calc(var(--animation-test-panel-height) * -1));
}

.animation-test-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--animation-test-panel-height);
    background: rgba(15, 15, 15, 0.95);
    color: #f5f5f5;
    padding: 1.25rem;
    display: flex;
    /* align-items: center; */
    transform: translateY(100%);
    transition: transform 0.9s ease;
    z-index: 2;
}

.animation-test-panel p {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.5;
}

.animation-test-screen.show-panel .animation-test-panel {
    transform: translateY(0);
}

.animation-test-tap-indicator {
    position: absolute;
    left: 70%;
    bottom: calc(var(--animation-test-panel-height) + 6rem);
    width: 64px;
    height: 64px;
    transform: translate(-50%, 8px) rotate(-20deg);
    opacity: 0;
    pointer-events: none;
    z-index: 3;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.animation-test-tap-indicator img {
    width: 100%;
    height: 100%;
    display: block;
}

.animation-test-swipe-indicator {
    position: absolute;
    top: 50%;
    left: 80%;
    width: 64px;
    height: 64px;
    transform: translate(-50%, -50%) rotate(-20deg);
    opacity: 0;
    pointer-events: none;
    z-index: 3;
    transition: opacity 0.3s ease;
}

.animation-test-swipe-indicator img {
    width: 100%;
    height: 100%;
    display: block;
}

.animation-test-screen.show-back-button.show-swipe-indicator .animation-test-swipe-indicator {
    opacity: 1;
    animation: animation-test-swipe-left 1.2s ease-out infinite;
}

.animation-test-screen.show-panel.show-tap-indicator .animation-test-tap-indicator {
    opacity: 1;
    transform: translate(-50%, 0) rotate(-20deg);
    animation: animation-test-tap-pointer 1.2s ease-in-out infinite;
}

@keyframes animation-test-tap-pointer {
    0%,
    100% {
        transform: translate(-50%, 0) rotate(-20deg);
    }

    50% {
        transform: translate(-50%, -10px) rotate(-20deg);
    }
}

@keyframes animation-test-swipe-left {
    0% {
        transform: translate(calc(-50% + 14px), -50%) rotate(-20deg);
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    100% {
        transform: translate(calc(-50% - 20px), -50%) rotate(-20deg);
        opacity: 0;
    }
}

.animation-test-clean-page {
    margin: 0;
    min-height: 100dvh;
    overflow: hidden;
}

.animation-test-clean-screen {
    position: fixed;
    inset: 0;
}

.animation-test-clean-content {
    position: relative;
    z-index: 2;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.6rem;
    padding: 2rem;
    text-align: center;
    pointer-events: none;
}

.animation-test-bonsai-name {
    font-size: 2.2rem;
    line-height: 1.1;
    color: #111;
    margin: 0;
    transition: transform 1.15s ease, opacity 0.85s ease;
}

.animation-test-circle-spacer {
    width: min(52vw, 220px);
    height: min(52vw, 220px);
}

.animation-test-photo-circle {
    overflow: hidden;
    padding: 0;
}

.animation-test-photo-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.animation-test-artist-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    transition: transform 1.15s ease, opacity 0.85s ease;
}

.animation-test-artist-label {
    margin: 0;
    font-size: 1rem;
    color: #333;
}

.animation-test-artist-badge {
    margin: 0;
    background: #ffffff;
    color: #333;
    border-radius: 999px;
    padding: 0.55rem 1rem;
    font-size: 0.95rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.animation-test-screen.text-hidden .animation-test-bonsai-name {
    transform: translateY(-130vh);
    opacity: 0;
}

.animation-test-screen.text-hidden .animation-test-artist-block {
    transform: translateY(130vh);
    opacity: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    padding: 0;
    background: linear-gradient(135deg, #e8dcc4 0%, #f5f0e8 50%, #e8dcc4 100%);
    background-attachment: fixed;
}

/* Desktop Warning - Hide content on desktop */
@media (min-width: 769px) {
    .site-content {
        display: none;
    }
    
    .desktop-warning {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 100vh;
        text-align: center;
        padding: 2rem;
    }
    
    .desktop-warning h1 {
        color: #2c5f2d;
        font-size: 2rem;
        margin-bottom: 1rem;
    }
}

@media (max-width: 768px) {
    .desktop-warning {
        display: none;
    }
}

.site-content {
    padding: 20px;
}

header {
    background-color: #2c5f2d;
    color: white;
    padding: 1rem;
    margin: 0 0 2rem 0;
    border-radius: 8px;
}

header h1 {
    font-size: 1.5rem;
}

main {
    min-height: 60vh;
    padding: 0;
}

main h1 {
    color: #2c5f2d;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

main p {
    margin-bottom: 1rem;
}

/* Bonsai List Styles */
.bonsai-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bonsai-link {
    display: block;
    background: #f5f5f5;
    padding: 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.bonsai-link:active {
    transform: scale(0.98);
    background: #e8e8e8;
}

.bonsai-link h2 {
    color: #2c5f2d;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.bonsai-link p {
    color: #666;
    margin: 0;
}

/* Splash Screen Styles */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(180deg, #d4e4f7 0%, #e8f0f9 50%, #f5f8fc 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.splash-screen.fade-out {
    opacity: 0;
}

.splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 80vh;
    padding: 3rem 2rem;
}

.bonsai-image-container {
    position: relative;
    margin-top: 2rem;
}

.glow-circle {
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(200, 220, 240, 0.3) 70%, transparent 100%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    filter: blur(20px);
}

.bonsai-image {
    position: relative;
    width: 200px;
    height: 200px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 100px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.splash-text {
    text-align: center;
    margin-top: -2rem;
}

.subtitle {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.main-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: #000;
    margin: 0;
    letter-spacing: 1px;
}

.start-button {
    background: white;
    border: none;
    padding: 1.2rem 4rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.start-button:active {
    transform: scale(0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.start-button .arrow {
    font-size: 1.3rem;
    transition: transform 0.2s ease;
}

.start-button:hover .arrow {
    transform: translateX(4px);
}

/* Bonsai Content - Hidden Initially */
.bonsai-content {
    opacity: 0;
    transition: opacity 0.5s ease;
    padding: 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
}

.bonsai-content.fade-in {
    opacity: 1;
}

/* Details Card */
.details-card {
    background: #f5f5f0;
    border-radius: 30px;
    padding: 1.5rem;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    position: relative;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
}

.top-actions {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.action-button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.action-button:active {
    transform: scale(0.95);
}

.favorite-button.active svg {
    fill: #ff6b6b;
    stroke: #ff6b6b;
}

.details-header {
    text-align: center;
    margin-bottom: 2rem;
}

.latin-name {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.plant-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #000;
    margin: 0.5rem 0 1rem;
    line-height: 1.2;
}

.plant-description {
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
    max-width: 90%;
    margin: 0 auto;
}

.plant-image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem 0;
}

.plant-image {
    font-size: 200px;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.2));
}

.details-button {
    background: #1a1a1a;
    color: white;
    border: none;
    padding: 1.1rem 2rem;
    border-radius: 50px;
    font-size: 1.05rem;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    max-width: 320px;
    margin: 0 auto 2rem;
    transition: transform 0.2s ease;
}

.details-button:active {
    transform: scale(0.98);
}

.pagination-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
}

.pagination-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    transition: all 0.3s ease;
}

.pagination-dots .dot.active {
    background: #1a1a1a;
    width: 10px;
    height: 10px;
}

/* Extended Details - Slide Up Panel */
.extended-details {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 30px 30px 0 0;
    padding: 2rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
    z-index: 100;
}

.extended-details.show {
    max-height: 90vh;
    overflow-y: auto;
}

.extended-details .close-details {
    display: inline-block;
    color: #2c5f2d;
    text-decoration: none;
    margin-bottom: 1.5rem;
    font-weight: 500;
    font-size: 1rem;
}

.extended-details .close-details:hover {
    text-decoration: underline;
}

.details-section {
    margin-bottom: 2rem;
}

.details-section h2 {
    color: #2c5f2d;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.details-section .info-grid {
    display: grid;
    gap: 1rem;
}

.details-section .info-item {
    display: flex;
    flex-direction: column;
    background: #f9f9f9;
    padding: 1rem;
    border-radius: 8px;
}

.details-section .info-label {
    font-weight: bold;
    color: #2c5f2d;
    font-size: 0.9rem;
}

.details-section .info-value {
    color: #666;
    margin-top: 0.3rem;
}

.details-section p {
    color: #555;
    line-height: 1.7;
}

footer {
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid #ddd;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}
