/* Immersive Unlock Experience */

/* Content Overlay */
.immersive-content-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

/* Floating Polaroids */
.floating-polaroids {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.floating-polaroid {
    position: absolute;
    width: 220px;
    background: var(--surface-light);
    border-radius: 8px;
    padding: 15px 15px 50px 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: rotate(var(--rotation)) scale(0);
    opacity: 0;
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 20;
    animation: polaroidFloat 8s ease-in-out infinite;
}

.floating-polaroid.visible {
    opacity: 1;
    transform: rotate(var(--rotation)) scale(1);
}

.floating-polaroid:nth-child(1) {
    --rotation: -8deg;
    top: 15%;
    left: 5%;
    animation-delay: 0s;
}

.floating-polaroid:nth-child(2) {
    --rotation: 12deg;
    top: 25%;
    right: 8%;
    animation-delay: 2s;
}

.floating-polaroid:nth-child(3) {
    --rotation: -15deg;
    top: 55%;
    left: 15%;
    animation-delay: 4s;
}

.floating-polaroid:nth-child(4) {
    --rotation: 10deg;
    top: 45%;
    right: 20%;
    animation-delay: 6s;
}

@keyframes polaroidFloat {
    0%, 100% {
        transform: rotate(var(--rotation)) scale(1) translateY(0px);
    }
    25% {
        transform: rotate(calc(var(--rotation) + 3deg)) scale(1.02) translateY(-8px);
    }
    50% {
        transform: rotate(calc(var(--rotation) - 2deg)) scale(1) translateY(-5px);
    }
    75% {
        transform: rotate(calc(var(--rotation) + 1deg)) scale(0.98) translateY(-3px);
    }
}

.polaroid-img-large {
    width: 100%;
    height: 160px;
    background: var(--surface);
    border-radius: 4px;
    margin-bottom: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.polaroid-img-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.polaroid-caption-large {
    font-family: 'Crimson Text', serif;
    font-size: 14px;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.3;
    font-weight: 500;
}

/* Voice Message Overlay */
.voice-message-overlay {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
}

.voice-bubble {
    background: var(--surface-light);
    border: 2px solid var(--primary-color);
    border-radius: 25px;
    padding: 20px 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 8px 25px var(--shadow);
    min-width: 280px;
}

.voice-waveform-mini {
    display: flex;
    align-items: end;
    gap: 3px;
    height: 30px;
}

.mini-wave {
    width: 4px;
    background: var(--primary-color);
    border-radius: 2px;
    height: 15px;
    animation: miniWaveAnimation 1.5s ease-in-out infinite;
}

.mini-wave:nth-child(1) { animation-delay: 0s; }
.mini-wave:nth-child(2) { animation-delay: 0.2s; }
.mini-wave:nth-child(3) { animation-delay: 0.4s; }
.mini-wave:nth-child(4) { animation-delay: 0.6s; }
.mini-wave:nth-child(5) { animation-delay: 0.8s; }

@keyframes miniWaveAnimation {
    0%, 100% { height: 15px; }
    50% { height: 25px; }
}

.voice-message-text {
    font-family: 'Playfair Display', serif;
    color: var(--text-primary);
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

/* Memory Hearts */
.memory-hearts {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.memory-heart {
    position: absolute;
    background: var(--primary-color);
    color: var(--light-color);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0);
    transition: all 0.8s ease;
    box-shadow: 0 6px 20px var(--glow);
    cursor: pointer;
    z-index: 25;
}

.memory-heart.visible {
    opacity: 0.9;
    transform: scale(1);
}

.memory-heart:hover {
    opacity: 1;
    transform: scale(1.1);
}

.memory-heart .heart-icon {
    font-size: 20px;
    margin-bottom: 4px;
}

.memory-heart .heart-number {
    font-size: 12px;
    font-weight: bold;
}

.memory-heart:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 1s;
}

.memory-heart:nth-child(2) {
    top: 35%;
    right: 15%;
    animation-delay: 2s;
}

.memory-heart:nth-child(3) {
    top: 60%;
    left: 25%;
    animation-delay: 3s;
}

.memory-heart:nth-child(4) {
    top: 70%;
    right: 30%;
    animation-delay: 4s;
}

/* Experience Timeline */
.experience-timeline {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, var(--surface-light) 0%, var(--surface) 100%);
    border-top: 3px solid var(--primary-color);
    padding: 25px;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.2);
    z-index: 15;
    max-height: 300px;
    overflow-y: auto;
}

.timeline-container {
    max-width: 800px;
    margin: 0 auto;
}

.timeline-container h3 {
    font-family: 'Playfair Display', serif;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.4rem;
}

.timeline-tracks {
    display: grid;
    gap: 12px;
}

.timeline-track {
    background: var(--surface);
    border-left: 4px solid var(--primary-color);
    padding: 15px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.timeline-track:hover {
    background: var(--surface-dark);
    box-shadow: 0 4px 15px var(--shadow);
}

.timeline-track-number {
    background: var(--primary-color);
    color: var(--light-color);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
}

.timeline-track-content {
    flex: 1;
}

.timeline-track-title {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-size: 16px;
}

.timeline-track-date {
    font-family: 'Crimson Text', serif;
    color: var(--text-secondary);
    font-size: 14px;
}

/* Auto-play sequence */
.auto-play-sequence .floating-polaroid:nth-child(1) {
    animation-delay: 2s;
}
.auto-play-sequence .floating-polaroid:nth-child(2) {
    animation-delay: 4s;
}
.auto-play-sequence .floating-polaroid:nth-child(3) {
    animation-delay: 6s;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .floating-polaroid {
        width: 180px;
        padding: 12px 12px 40px 12px;
    }
    
    .polaroid-img-large {
        height: 130px;
    }
    
    .polaroid-caption-large {
        font-size: 13px;
    }
    
    .floating-polaroid:nth-child(1) {
        top: 10%;
        left: 2%;
    }
    
    .floating-polaroid:nth-child(2) {
        top: 20%;
        right: 3%;
    }
    
    .floating-polaroid:nth-child(3) {
        top: 50%;
        left: 8%;
    }
    
    .voice-bubble {
        min-width: 240px;
        padding: 15px 20px;
    }
    
    .voice-message-text {
        font-size: 14px;
    }
    
    .memory-heart {
        width: 60px;
        height: 60px;
    }
    
    .memory-heart .heart-icon {
        font-size: 16px;
    }
    
    .memory-heart .heart-number {
        font-size: 10px;
    }
    
    .experience-timeline {
        padding: 20px 15px;
    }
    
    .timeline-container h3 {
        font-size: 1.2rem;
    }
    
    .timeline-track {
        padding: 12px 15px;
    }
    
    .timeline-track-number {
        width: 25px;
        height: 25px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .floating-polaroid {
        width: 150px;
        padding: 10px 10px 35px 10px;
    }
    
    .polaroid-img-large {
        height: 110px;
    }
    
    .polaroid-caption-large {
        font-size: 12px;
    }
    
    .voice-bubble {
        min-width: 200px;
        padding: 12px 16px;
    }
    
    .voice-message-text {
        font-size: 13px;
    }
    
    .memory-heart {
        width: 50px;
        height: 50px;
    }
    
    .memory-heart .heart-icon {
        font-size: 14px;
    }
    
    .timeline-track-title {
        font-size: 14px;
    }
    
    .timeline-track-date {
        font-size: 12px;
    }
}