/* style.css */
body {
    margin: 0;
    padding: 0;
    background-color: #000;
    color: #fff;
    font-family: sans-serif;
    overflow: hidden; /* Prevent scrolling during animation */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for stable mobile layout */
}

.animation-container {
    position: relative;
    width: 90%; /* Horizontal breathing room in portrait */
    max-width: 640px;
    max-height: 75vh; /* Vertical breathing room for elegance */
    aspect-ratio: 1850 / 1200;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 5vh; /* Guaranteed whitespace on the bottom for elegance */
    transition: width 0.3s ease-out, max-height 0.3s ease-out;
    user-select: none; /* Prevent accidental text selection */
    -webkit-user-select: none;
    -webkit-touch-callout: none; /* Disable system context menu on long-press (iOS) */
}

/* Desktop layout with margins */
@media (min-width: 1024px) {
    .animation-container {
        width: 80vw;
    }
}

#stage {
    width: 100%;
    height: 100%;
}

/* Top Right Controls */
.top-right-controls {
    position: fixed;
    top: 30px;
    right: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 1000; /* High z-index to stay above everything */
}

.play-pause-toggle {
    background: none;
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s, transform 0.2s;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-pause-toggle:hover {
    opacity: 1;
    transform: scale(1.1);
}

.play-pause-toggle svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
    display: block;
}

/* Skip to Home link */
.skip-home {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    opacity: 0.7;
    transition: opacity 0.3s;
    cursor: pointer;
}

.skip-home:hover {
    opacity: 1;
}

/* Development Controls */
.dev-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 8px;
    display: flex;
    gap: 15px;
    align-items: center;
    z-index: 10;
}

/* Central Overlay Play Button */
.central-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: transparent;
    color: rgba(180, 180, 180, 0.7);
    font-size: 70px;
    width: 140px;
    height: 140px;
    border: 3px double rgba(180, 180, 180, 0.7);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-left: 14px; /* Optical centering for the arrowhead */
    cursor: pointer;
    z-index: 20;
    transition: opacity 0.5s ease;
}

.central-play-btn:hover {
    color: rgba(220, 220, 220, 0.9);
    border-color: rgba(220, 220, 220, 0.9);
}

.central-play-btn.hidden {
    opacity: 0;
    pointer-events: none;
}

.dev-controls button {
    background: #fff;
    color: #000;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.dev-controls button:hover {
    background: #ddd;
}

#timerDisplay {
    font-family: monospace;
    font-size: 16px;
    min-width: 60px;
    text-align: right;
}

/* Ensure hit area captures touch without browser interference */
#logo-hit-area {
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}
