/*!
 * Pokemon Wedding Invitation Theme
 * Main Stylesheet - Extended
 * All 8 Features Supported
 */

/* ==========================================
   SPLASH OVERLAY - POKEBALL ANIMATION
   ========================================== */
.splash-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #CC0000;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: opacity 0.8s ease;
}

.splash-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.splash-content {
    text-align: center;
    transition: opacity 0.5s, transform 0.5s;
}

.splash-content.fade-out {
    opacity: 0;
    transform: scale(0.8);
}

.big-pokeball {
    width: 150px;
    height: 150px;
    position: relative;
    margin: 0 auto 2rem;
    cursor: pointer;
    animation: bobPokeball 2s ease-in-out infinite;
}

@keyframes bobPokeball {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.big-pokeball.clicked {
    animation: openPokeball 1s forwards;
}

@keyframes openPokeball {
    0% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.2) rotate(5deg); }
    100% { transform: scale(0); opacity: 0; }
}

.bp-top, .bp-bottom {
    position: absolute;
    left: 0; width: 100%; height: 50%;
    border: 6px solid #222;
}

.bp-top {
    top: 0;
    background: #fff;
    border-radius: 150px 150px 0 0;
    border-bottom: 4px solid #222;
}

.bp-bottom {
    bottom: 0;
    background: #CC0000;
    border-radius: 0 0 150px 150px;
    border-top: 4px solid #222;
}

.bp-center-btn {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 44px; height: 44px;
    background: #fff;
    border: 5px solid #222;
    border-radius: 50%;
    z-index: 2;
    box-shadow: inset 0 0 0 8px #fff, inset 0 0 0 12px #ccc;
}

.bp-center-btn::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 18px; height: 18px;
    background: #fff;
    border: 3px solid #222;
    border-radius: 50%;
}

.splash-text {
    color: #fff;
    font-size: 1.1rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    animation: pulseText 2s infinite;
}

@keyframes pulseText {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Guest Reveal */
.guest-reveal {
    display: none;
    text-align: center;
    animation: fadeInScale 0.6s ease;
}

.guest-reveal.active {
    display: block;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.reveal-greeting {
    color: #fff;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.reveal-name {
    color: #FFDE00;
    font-size: 2.2rem;
    font-weight: 700;
    text-transform: capitalize;
    margin-bottom: 1rem;
    text-shadow: 0 3px 10px rgba(0,0,0,0.3);
}

.reveal-invite {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.btn-enter {
    background: #fff;
    color: #CC0000;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    transition: all 0.3s;
}

.btn-enter:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}

/* Main invitation transition */
.main-invitation {
    transition: opacity 0.8s ease;
}

.main-invitation.visible {
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* ==========================================
   GUEST CONFIRMATION BADGES IN DETAILS
   ========================================== */
.attendance-confirm {
    max-width: 500px;
    margin: 2rem auto;
    background: var(--pk-white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    text-align: center;
    border: 3px solid var(--pk-pink);
}

.attendance-confirm h3 {
    font-size: 1.4rem;
    color: var(--pk-text);
    margin-bottom: 1.5rem;
}

.attendance-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-attend {
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-yes {
    background: #4CAF50;
    color: white;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-yes:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(76, 175, 80, 0.4);
}

.btn-no {
    background: #ff5252;
    color: white;
    box-shadow: 0 4px 12px rgba(255, 82, 82, 0.3);
}

.btn-no:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(255, 82, 82, 0.4);
}

.attendance-message {
    margin-top: 1.5rem;
}

.attendance-message textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #eee;
    border-radius: 12px;
    font-family: inherit;
    resize: vertical;
    margin-top: 0.5rem;
}

.attendance-submitted {
    background: #E8F5E9;
    color: #2E7D32;
    padding: 1rem;
    border-radius: var(--radius);
    margin-top: 1rem;
}

/* ==========================================
   TIMELINE JOURNEY DOT STYLE
   ========================================== */
.story-timeline {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
    padding-left: 2rem;
}

.story-timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, var(--pk-red), var(--pk-pink), var(--pk-yellow));
    border-radius: 2px;
}

.timeline-event {
    position: relative;
    padding: 0 0 2.5rem 2.5rem;
    opacity: 0;
    transform: translateX(-20px);
    animation: slideInLeft 0.6s ease forwards;
}

.timeline-event:nth-child(1) { animation-delay: 0.2s; }
.timeline-event:nth-child(2) { animation-delay: 0.4s; }
.timeline-event:nth-child(3) { animation-delay: 0.6s; }

@keyframes slideInLeft {
    to { opacity: 1; transform: translateX(0); }
}

.timeline-event:last-child { padding-bottom: 0; }

.timeline-dot {
    position: absolute;
    left: -2.1rem;
    top: 0.3rem;
    width: 20px;
    height: 20px;
    background: var(--pk-white);
    border: 4px solid var(--pk-red);
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 0 0 4px var(--pk-pink-bg);
}

.timeline-dot::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: var(--pk-red);
    border-radius: 50%;
}

.timeline-content {
    background: var(--pk-white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.timeline-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.75rem;
}

.timeline-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--pk-text);
}

.timeline-content p {
    color: var(--pk-text-light);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Hide old story style */
.story-grid { display: none; }
.gallery-placeholder {
    background: var(--pk-pink-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.placeholder-text {
    text-align: center;
    color: var(--pk-pink);
    font-size: 0.9rem;
    line-height: 1.6;
    font-weight: 600;
}

/* ==========================================
   MUSIC PLAYER - AUTOPLAY BADGE
   ========================================== */
.music-player {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
}

.music-badge {
    background: var(--pk-white);
    border: 2px solid var(--pk-pink);
    border-radius: 50px;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--pk-text);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    cursor: pointer;
    opacity: 0.7;
}

.music-badge:hover { opacity: 1; transform: scale(1.05); }

.music-badge.playing {
    background: var(--pk-pink);
    color: var(--pk-white);
    border-color: var(--pk-pink);
    opacity: 1;
    animation: musicPulse 2s infinite;
}

@keyframes musicPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 143, 171, 0.4); }
    50% { box-shadow: 0 0 0 12px rgba(255, 143, 171, 0); }
}

.music-status { font-size: 0.8rem; }

/* ==========================================
   GALLERY SECTION
   ========================================== */
.gallery-section {
    padding: 5rem 2rem;
    background: var(--pk-white);
}

.gallery-section h2 {
    text-align: center;
    font-size: 2.2rem;
    color: var(--pk-text);
    margin-bottom: 0.5rem;
    padding-bottom: 1rem;
    position: relative;
}

.gallery-section h2::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%; transform: translateX(-50%);
    width: 60px; height: 4px;
    background: var(--pk-pink);
    border-radius: 2px;
}

.gallery-intro {
    text-align: center;
    color: var(--pk-text-light);
    margin-bottom: 2rem;
    font-size: 1rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    max-width: 1000px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    cursor: pointer;
    aspect-ratio: 4/3;
    background: var(--pk-gray);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img { transform: scale(1.1); }

.gallery-caption {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    padding: 2rem 1rem 1rem;
    font-weight: 600;
    font-size: 0.95rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-caption { transform: translateY(0); }

.gallery-tip {
    text-align: center;
    font-size: 0.85rem;
    color: var(--pk-text-light);
    margin-top: 2rem;
    font-style: italic;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.92);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 2rem;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px; right: 30px;
    font-size: 2.5rem;
    color: white;
    cursor: pointer;
    transition: transform 0.3s;
}

.lightbox-close:hover { transform: rotate(90deg); }

.lightbox-caption {
    color: white;
    margin-top: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

/* ==========================================
   GIFT REGISTRY SECTION
   ========================================== */
.gift-section {
    padding: 5rem 2rem;
    background: var(--pk-cream);
}

.gift-section h2 {
    text-align: center;
    font-size: 2.2rem;
    color: var(--pk-text);
    margin-bottom: 0.5rem;
    padding-bottom: 1rem;
    position: relative;
}

.gift-section h2::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%; transform: translateX(-50%);
    width: 60px; height: 4px;
    background: var(--pk-red);
    border-radius: 2px;
}

.gift-intro {
    text-align: center;
    color: var(--pk-text-light);
    margin-bottom: 2.5rem;
    font-size: 1rem;
    line-height: 1.8;
}

.gift-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.gift-card {
    background: var(--pk-white);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border-top: 5px solid var(--pk-yellow);
}

.gift-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.gift-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.gift-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--pk-text);
}

.gift-detail p {
    color: var(--pk-text-light);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.btn-copy {
    background: var(--pk-white);
    border: 2px solid var(--pk-pink);
    color: var(--pk-text);
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
    margin-top: 0.5rem;
}

.btn-copy:hover {
    background: var(--pk-pink);
    color: var(--pk-white);
}

/* ==========================================
   QR CODE SECTION
   ========================================== */
.qr-section {
    padding: 5rem 2rem;
    background: var(--pk-white);
}

.qr-section h2 {
    text-align: center;
    font-size: 2.2rem;
    color: var(--pk-text);
    margin-bottom: 0.5rem;
    padding-bottom: 1rem;
    position: relative;
}

.qr-section h2::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%; transform: translateX(-50%);
    width: 60px; height: 4px;
    background: var(--pk-pink);
    border-radius: 2px;
}

.qr-intro {
    text-align: center;
    color: var(--pk-text-light);
    margin-bottom: 2rem;
}

.qr-box {
    max-width: 400px;
    margin: 0 auto 2rem;
    background: var(--pk-cream);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 3px dashed var(--pk-pink);
    text-align: center;
}

.qr-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.qr-url-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #eee;
    border-radius: var(--radius);
    font-size: 0.9rem;
    text-align: center;
    background: white;
}

.qr-hint {
    font-size: 0.85rem;
    color: var(--pk-text-light);
    font-style: italic;
    margin-top: 1rem;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-share {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
}

.btn-share.wa {
    background: #25D366;
    color: white;
}

.btn-share.email {
    background: #EA4335;
    color: white;
}

.btn-share:hover { transform: translateY(-2px); filter: brightness(1.1); }

/* ==========================================
   RESPONSIVE ADD-ONS
   ========================================== */
@media (max-width: 768px) {
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .gift-options { grid-template-columns: 1fr; }
    .music-player { bottom: 10px; left: 10px; }
    .music-toggle { padding: 0.5rem 1rem; font-size: 0.8rem; }
    .qr-box { padding: 1.5rem; }
}

@media (max-width: 480px) {
    .gallery-grid { grid-template-columns: 1fr; }
    .gallery-item { aspect-ratio: 3/4; }
    .lightbox-img { max-width: 95vw; }
    .share-buttons { flex-direction: column; align-items: center; }
    .btn-share { width: 80%; justify-content: center; }
}
