/* Modern 3D Effects and Photo Booth Styles */

/* 3D Tilt Effect for Photos */
.photo-item {
    transform-style: preserve-3d;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.photo-item:hover {
    transform: perspective(1000px) rotateY(5deg) rotateX(-5deg) translateZ(20px);
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.2);
}

/* 3D Tilt for Video Frame */
.video-frame {
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.video-frame:hover {
    transform: perspective(1500px) rotateY(3deg) rotateX(-3deg);
}

/* Photo Booth Button */
.photo-booth-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 25px;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.photo-booth-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
}

.photo-booth-btn span:first-child {
    font-size: 1.5rem;
}

/* Photo Booth Modal */
.photo-booth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    backdrop-filter: blur(10px);
}

.photo-booth-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.photo-booth-container {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    max-width: 800px;
    width: 90%;
    position: relative;
    backdrop-filter: blur(20px);
}

.photo-booth-container h2 {
    text-align: center;
    color: var(--gold);
    font-family: var(--font-elegant);
    font-size: 2.5rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ffd700, #ff6b9d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.close-booth {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.close-booth:hover {
    transform: rotate(90deg);
}

/* Booth Content */
.booth-content {
    position: relative;
    width: 100%;
    max-width: 640px;
    margin: 0 auto 20px;
    aspect-ratio: 4/3;
    background: #000;
    border-radius: 15px;
    overflow: hidden;
}

#boothVideo, .captured-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
}

.captured-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Filter Buttons */
.booth-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn:hover, .filter-btn.active {
    background: rgba(102, 126, 234, 0.3);
    border-color: #667eea;
    transform: translateY(-2px);
}

/* Action Buttons */
.booth-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.capture-btn, .retake-btn, .download-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.capture-btn {
    background: linear-gradient(135deg, #ff6b9d 0%, #feca57 100%);
    color: white;
}

.retake-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.download-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.capture-btn:hover, .retake-btn:hover, .download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Countdown */
.countdown {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 8rem;
    color: white;
    font-weight: bold;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
    animation: countPulse 1s ease;
    display: none;
    z-index: 10;
    pointer-events: none;
}

.countdown.active {
    display: block;
}

@keyframes countPulse {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
    50% { transform: translate(-50%, -50%) scale(1.2); }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* Video Filters */
.filter-none { filter: none; }
.filter-party { filter: hue-rotate(90deg) saturate(1.5) brightness(1.2); }
.filter-vintage { filter: sepia(0.5) contrast(1.2) brightness(0.9); }
.filter-rainbow {
    animation: rainbowFilter 3s linear infinite;
}
.filter-disco { filter: hue-rotate(270deg) saturate(2) contrast(1.3); }
.filter-sunset { filter: sepia(0.3) hue-rotate(320deg) saturate(1.3) brightness(1.1); }
.filter-ocean { filter: hue-rotate(180deg) saturate(1.2) brightness(1.1); }
.filter-bw { filter: grayscale(1) contrast(1.2); }
.filter-love { filter: hue-rotate(330deg) saturate(1.5) brightness(1.2); }

@keyframes rainbowFilter {
    0% { filter: hue-rotate(0deg) saturate(1.5); }
    100% { filter: hue-rotate(360deg) saturate(1.5); }
}

@keyframes slideUp {
    from {
        transform: translateX(-50%) translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
    to {
        transform: translateX(-50%) translateY(100px);
        opacity: 0;
    }
}

/* Photo Booth Gallery Styles */
.photobooth-gallery {
    padding: 80px 20px;
    background: #0a0a0f;
}

.photobooth-container {
    max-width: 1200px;
    margin: 0 auto;
}

.photobooth-title {
    text-align: center;
    font-family: var(--font-elegant);
    font-size: 3rem;
    color: var(--gold);
    margin-bottom: 1rem;
}

.photobooth-subtitle {
    text-align: center;
    color: var(--soft-pink);
    font-size: 1.2rem;
    margin-bottom: 3rem;
}

.photobooth-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 2rem;
}

.photobooth-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    background: #000;
    aspect-ratio: 4/3;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.photobooth-item:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 40px rgba(212, 175, 55, 0.3);
}

.photobooth-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photobooth-item .photo-time {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9rem;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.1rem;
}

.empty-state p {
    margin: 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .photo-booth-btn {
        bottom: 20px;
        right: 20px;
        padding: 12px 20px;
    }

    .booth-text {
        display: none;
    }

    .photo-booth-container {
        padding: 20px;
        width: 95%;
    }

    .filter-btn {
        padding: 6px 15px;
        font-size: 0.9rem;
    }
}

/* Interactive 3D Card Tilt on Mouse Move */
.tilt-3d {
    transform-style: preserve-3d;
    transform: perspective(1000px);
    transition: transform 0.1s linear;
}

.tilt-3d-active {
    transform: perspective(1000px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
}

/* Shiny hover effect overlay */
.photo-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.5s ease;
    pointer-events: none;
}

.photo-item:hover::after {
    left: 100%;
}