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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #e8e6e1;
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
    cursor: default;
    user-select: none;
}

#app {
    width: 100%;
    height: 100%;
    position: relative;
}

/* Bug container */
.bug {
    position: absolute;
    width: 35px;
    height: 35px;
    z-index: 100;
    pointer-events: auto;
    transition: opacity 0.5s ease;
    touch-action: none;
}

.bug img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
}

/* Speech bubble */
.speech-bubble {
    position: absolute;
    width: 142px;
    min-height: 40px;
    max-height: 80px;
    background-color: rgb(248, 247, 244);
    border: 1px solid #c0c0c0;
    border-radius: 10px;
    padding: 6px 8px;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    box-shadow: 1px 2px 6px rgba(0, 0, 0, 0.15);
}

.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 15px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid rgb(248, 247, 244);
}

.speech-bubble::before {
    content: '';
    position: absolute;
    bottom: -9px;
    left: 14px;
    width: 0;
    height: 0;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-top: 9px solid #c0c0c0;
}

.speech-bubble.visible {
    opacity: 0.85;
}

.speech-text {
    font-size: 11px;
    color: #333;
    line-height: 1.4;
    word-wrap: break-word;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

/* Heart overlay */
.heart-overlay {
    position: absolute;
    z-index: 150;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.heart-overlay.visible {
    opacity: 1;
}

.heart-overlay img {
    width: 25px;
    height: 25px;
    object-fit: contain;
}

/* Event overlay */
.event-overlay {
    position: absolute;
    z-index: 300;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.event-overlay.visible {
    opacity: 1;
}

.event-overlay img {
    max-width: 200px;
    max-height: 200px;
    object-fit: contain;
}

#event-text {
    font-family: Arial, sans-serif;
    font-size: 30px;
    font-weight: bold;
    color: #ff6b9d;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    margin-top: 5px;
    display: none;
}

/* House */
.house {
    position: absolute;
    z-index: 50;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.3s ease;
}

.house.visible {
    opacity: 1;
}

.house img {
    max-width: 120px;
    max-height: 100px;
    object-fit: contain;
}

/* Info panel */
#info-panel {
    position: fixed;
    bottom: 15px;
    left: 15px;
    z-index: 10;
    color: rgba(0, 0, 0, 0.3);
    font-size: 12px;
    pointer-events: none;
}

.info-title {
    font-size: 16px;
    font-weight: bold;
    color: rgba(0, 0, 0, 0.4);
    margin-bottom: 3px;
}

.info-subtitle {
    font-size: 13px;
    font-weight: normal;
}

.info-days {
    font-size: 11px;
    color: rgba(0, 0, 0, 0.25);
    margin-bottom: 2px;
}

/* Buttons */
#btn-meet, #btn-talk {
    position: fixed;
    bottom: 15px;
    z-index: 400;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 8px 18px;
    font-size: 14px;
    cursor: pointer;
    color: #555;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: background 0.2s, transform 0.1s;
    -webkit-tap-highlight-color: transparent;
}

#btn-meet {
    right: 15px;
}

#btn-talk {
    right: 145px;
}

#btn-meet:hover, #btn-talk:hover {
    background: rgba(255, 220, 230, 0.9);
}

#btn-meet:active, #btn-talk:active {
    transform: scale(0.95);
}

#btn-meet:disabled, #btn-talk:disabled {
    opacity: 0.4;
    cursor: default;
    pointer-events: none;
}

/* Fade animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes heartFloat {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    100% { transform: translateY(-30px) scale(1.3); opacity: 0; }
}

.heart-float {
    animation: heartFloat 1.5s ease-out forwards;
}

/* Mobile responsive */
@media (max-width: 600px) {
    .bug {
        width: 50px;
        height: 50px;
    }

    .speech-bubble {
        width: 160px;
        min-height: 36px;
        padding: 8px 10px;
    }

    .speech-text {
        font-size: 12px;
    }

    #info-panel {
        bottom: 10px;
        left: 10px;
    }

    .info-title {
        font-size: 14px;
    }

    #btn-meet, #btn-talk {
        bottom: 10px;
        padding: 10px 16px;
        font-size: 13px;
    }

    #btn-meet {
        right: 10px;
    }

    #btn-talk {
        right: 130px;
    }

    .event-overlay img {
        max-width: 150px;
        max-height: 150px;
    }

    .heart-overlay img {
        width: 30px;
        height: 30px;
    }
}
