:root {
    --bg-color: #f5f5f5;
    --text-color: #1a1a1a;
    --accent-color: #ff3366;
    --font-main: 'DM Mono', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100vh;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

/* Magazine Layout */
#magazine-cover {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: 100vh;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 10;
    text-align: center;
}

.magazine-header {
    border-bottom: 2px solid var(--text-color);
    padding-bottom: 10px;
}

.issue-number,
.date {
    font-size: 0.8rem;
    letter-spacing: 2px;
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.logo {
    font-size: 4rem;
    font-weight: 500;
    letter-spacing: -2px;
    line-height: 1;
    margin: 10px 0;
    text-transform: uppercase;
}

.main-feature {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.headline {
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    line-height: 1.2;
}

.sub-headline {
    font-size: 1rem;
    font-style: italic;
    margin-bottom: 0.5rem;
    opacity: 0.7;
}

.cta-text {
    margin-top: 2rem;
    font-size: 0.9rem;
    animation: blink 2s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.magazine-footer {
    border-top: 1px solid var(--text-color);
    padding-top: 10px;
    font-size: 0.7rem;
    letter-spacing: 1px;
}

/* Kiss Container */
/* Video Container */
.video-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    /* Wider max width */
    height: auto;
    /* Let content define height */
    margin: 0 auto;
    border: 1px solid var(--text-color);
    background: #000;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

#kiss-video {
    width: 100%;
    height: auto;
    /* Maintain aspect ratio */
    display: block;
    opacity: 0.8;
    transition: opacity 0.3s;
}

#kiss-video.playing {
    opacity: 1;
}

/* Click Counter */
#click-counter {
    text-align: center;
    margin-top: 20px;
    font-size: 5rem;
    color: var(--accent-color);
    font-weight: bold;
    line-height: 1;
}

#click-counter.vibrate {
    animation: vibrate 0.1s linear infinite;
}

@keyframes vibrate {
    0% {
        transform: translate(0);
    }

    20% {
        transform: translate(-2px, 2px);
    }

    40% {
        transform: translate(-2px, -2px);
    }

    60% {
        transform: translate(2px, 2px);
    }

    80% {
        transform: translate(2px, -2px);
    }

    100% {
        transform: translate(0);
    }
}

/* Canvas for hearts */
#heart-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
    pointer-events: none;
}

/* Responsiveness */
@media (max-width: 560px) {
    .logo {
        font-size: 3rem;
    }

    .headline {
        font-size: 2rem;
    }

    .video-container {
        width: 100%;
        height: auto;
        aspect-ratio: 11 / 16;
    }

    #kiss-video {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    #click-counter {
        font-size: 3rem;
        margin-top: 10px;
    }
}

/* Popup Styles */
#popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

#popup-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

#popup-img {
    max-width: 90%;
    max-height: 90%;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.27);
}

@keyframes popIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}