@font-face {
    font-family: 'ChikiBubbles';
    src: url('../FONTS/ChikiBubbles.ttf') format('truetype');
}

:root {
    /* Theme Colors */
    --primary-color: #2c3e50;
    --secondary-color: #5a6c7d;
    --accent-color: #32c997;
    --light-text: #7f8c8d;
    --card-bg: rgba(248, 250, 252, 0.15);
    --card-border: rgba(255, 255, 255, 0.4);
    --card-shadow: rgba(0, 0, 0, 0.15);
    --card-inset: rgba(255, 255, 255, 0.8);
    
    /* Secret Mode Colors */
    --secret-bg: rgba(20, 20, 20, 0.90);
    --secret-text: #999;
    --secret-secondary: #777;
    --secret-light: #666;
    --secret-border: rgba(20, 20, 20, 0.6);
    --secret-shadow: rgba(255, 255, 255, 0.15);
    --secret-inset: rgba(20, 20, 20, 0.8);
    
    /* Interactive Colors */
    --hover-accent: rgba(32, 201, 151, 0.2);
    --hover-shadow: rgba(32, 201, 151, 0.3);
    --twitter-blue: #1DA1F2;
}

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

body {
    font-family: 'Arial', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
    position: relative;
}

/* Loader styles */
.loader-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(248, 250, 252, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.8s ease-out;
}

.loader-container.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loader {
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    animation: logoSpin 2s ease-in-out forwards;
}

@keyframes logoSpin {
    0% {
        transform: rotate(0deg);
        opacity: 1;
    }
    80% {
        transform: rotate(360deg);
        opacity: 1;
    }
    100% {
        transform: rotate(360deg);
        opacity: 0;
    }
}

.parallax-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 120vh;
    background-image: url('../IMAGES/paralax.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
    transition: transform 0.6s ease-in-out, opacity 0.6s ease-in-out;
}

body.secret-mode {
    background-color: #1a1a1a !important;
    transition: background-color 0.6s ease-in-out;
}

body.secret-mode .parallax-bg {
    opacity: 0.15;
}

.carousel-container {
    position: relative;
    max-width: 800px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.card-container {
    position: relative;
    width: 500px;
    height: 375px; /* Format 4:3 */
    perspective: 1000px;
    overflow: visible;
    margin-bottom: 30px;
}

.card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(248, 250, 252, 0.15);
    backdrop-filter: blur(4px);
    border-radius: 30px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.8s ease-in-out, opacity 0.4s ease-in-out, box-shadow 0.3s ease-in-out, visibility 0s linear 0s;
    transform: translateY(-10px);
    box-shadow: 
        0 15px 30px rgba(0, 0, 0, 0.15),
        inset 0 1px 2px rgba(255, 255, 255, 0.8),
        0 0 0 1px rgba(255, 255, 255, 0.4);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    will-change: transform, box-shadow;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Secret mode styling */
body.secret-mode .card {
    background: rgba(20, 20, 20, 0.90);
    backdrop-filter: blur(4px);
    box-shadow: 
        0 15px 30px rgba(255, 255, 255, 0.15),
        inset 0 1px 2px rgba(20, 20, 20, 0.8),
        0 0 0 1px rgba(20, 20, 20, 0.6);
}

body.secret-mode .card-title {
    color: #999 !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

body.secret-mode .card-description {
    color: #777 !important;
}

body.secret-mode .card-description span {
    color: inherit !important;
}

body.secret-mode .card-subtitle {
    color: #666 !important;
}

body.secret-mode .card-subtitle span {
    color: inherit !important;
}

body.secret-mode .nav-button {
    background: rgba(20, 20, 20, 0.85);
    box-shadow: 
        0 8px 16px rgba(255, 255, 255, 0.1),
        inset 0 2px 4px rgba(20, 20, 20, 0.8),
        0 0 0 1px rgba(20, 20, 20, 0.3);
}

body.secret-mode .nav-button:hover {
    background: rgba(32, 201, 151, 0.8);
}

body.secret-mode .chevron {
    fill: #999;
}

body.secret-mode .nav-button:hover .chevron {
    fill: #2c3e50;
}

body.secret-mode .indicator {
    background: rgba(255, 255, 255, 0.15);
}

body.secret-mode .indicator.active {
    background: #999;
}

/* Secret mode pseudo-element for green outline */
body.secret-mode .card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 30px;
    opacity: 0;
    z-index: -1;
    box-shadow: 
        0 0 0 3px rgba(32, 201, 151, 0.8),
        0 0 0 6px rgba(32, 201, 151, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.9);
    transition: opacity 0.4s ease-in-out;
    pointer-events: none;
}

/* Secret mode hover effect with green outline */
body.secret-mode .card:hover:not(.brilliance-active) {
    transform: translateY(-15px) !important;
    transition: transform 0.8s ease-in-out, opacity 0.4s ease-in-out, visibility 0s linear 0s;
}

body.secret-mode .card:hover:not(.brilliance-active)::after {
    opacity: 1;
}

.card.active {
    z-index: 20;
    opacity: 1;
    transform: translateY(-10px) scale(1);
    transition: transform 0.8s ease-in-out, opacity 0.4s ease-in-out, box-shadow 0.4s ease-in-out, visibility 0s linear 0s;
}

.card.next {
    z-index: 2;
    opacity: 0;
    transform: translateY(-10px) translateX(80px) scale(0.95);
    visibility: hidden;
}

.card.prev {
    z-index: 2;
    opacity: 0;
    transform: translateY(-10px) translateX(-80px) scale(0.95);
    visibility: hidden;
}

.card.hidden {
    z-index: 1;
    opacity: 0;
    transform: translateY(-10px) scale(0.85);
    visibility: hidden;
}

.card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 30px;
    opacity: 0;
    z-index: -1;
    box-shadow: 
        0 0 0 3px rgba(44, 62, 80, 0.8),
        0 0 0 6px rgba(44, 62, 80, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.9);
    transition: opacity 0.4s ease-in-out;
    pointer-events: none;
}

.card:hover:not(.brilliance-active) {
    transform: translateY(-15px) !important;
    transition: transform 0.8s ease-in-out, opacity 0.4s ease-in-out, visibility 0s linear 0s;
}

.card:hover:not(.brilliance-active)::after {
    opacity: 1;
}

/* Green shadow effect for album card */
.card.album-card.active {
    box-shadow: 
        0 15px 30px rgba(0, 0, 0, 0.15),
        inset 0 1px 2px rgba(255, 255, 255, 0.8),
        0 0 0 1px rgba(255, 255, 255, 0.4),
        0 0 20px #b8fea0;
}

/* Card specific styles */
.card-title {
    font-family: 'ChikiBubbles', 'Arial', sans-serif;
    color: #2c3e50;
    font-size: 2.5em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.1);
}

.card-emoji {
    font-size: 4em;
    margin-bottom: 20px;
    display: block;
}

.card-description {
    color: #5a6c7d;
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 15px;
}

.card-description span {
    color: inherit;
}

.card-subtitle {
    color: #7f8c8d;
    font-size: 0.9em;
    font-style: italic;
    position: absolute;
    bottom: 15px;
    left: 40px;
    right: 40px;
    text-align: center;
}

.card-subtitle span {
    color: inherit;
}

/* Background image for secret card */
.card.secret-card {
    color: white !important;
}

.card.secret-card * {
    color: white !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

/* Hide secret card content until secret mode is active */
.card.secret-card .gift-image,
.card.secret-card .card-description,
.card.secret-card .card-subtitle {
    opacity: 0;
    transition: opacity 0.4s ease-in-out 0.2s, transform 0.3s ease;
}

body.secret-mode .card.secret-card .gift-image,
body.secret-mode .card.secret-card .card-description,
body.secret-mode .card.secret-card .card-subtitle {
    opacity: 1;
}

/* Album card with large image - similar to gift card */
.album-image {
    width: auto;
    height: 70%;
    max-width: 100%;
    margin: 0 auto 20px auto;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Retrospective card with YouTube thumbnail */
.retrospective-image {
    width: auto;
    height: 70%;
    max-width: 100%;
    margin: 0 auto 20px auto;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.album-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.retrospective-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.card.album-card:hover .album-image {
    transform: scale(1.05);
}

.card.retrospective-card:hover .retrospective-image {
    transform: scale(1.05);
}


/* Gift card image - 90% of card height */
.gift-image {
    width: auto;
    height: 90%;
    max-width: 100%;
    margin: 0 auto;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gift-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.card.secret-card:hover .gift-image {
    transform: scale(1.05);
}


/* Navigation controls */
.nav-controls {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-button {
    width: 50px;
    height: 50px;
    background: rgba(248, 250, 252, 0.15);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out, background 0.3s ease-in-out;
    box-shadow: 
        0 8px 16px rgba(44, 62, 80, 0.1),
        inset 0 2px 4px rgba(255, 255, 255, 0.8);
    will-change: transform, box-shadow;
}

.nav-button:hover {
    background: rgba(32, 201, 151, 0.2);
    transform: scale(1.1);
    box-shadow: 
        0 12px 24px rgba(44, 62, 80, 0.2),
        inset 0 2px 4px rgba(255, 255, 255, 0.9),
        0 0 20px rgba(32, 201, 151, 0.3);
}

.chevron {
    width: 24px;
    height: 24px;
    fill: #2c3e50;
    transition: fill 0.3s ease;
}

.nav-button:hover .chevron {
    fill: #5a6c7d;
}

.indicators {
    display: flex;
    gap: 10px;
    margin: 0;
    align-items: center;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}

.indicator.active {
    background: #2c3e50;
    transform: scale(1.2);
}

/* Animations */
@keyframes confetti {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-2px); }
    20%, 40%, 60%, 80% { transform: translateX(2px); }
}

@keyframes sparkle {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 rgba(255, 255, 255, 0); }
    50% { opacity: 1; box-shadow: 0 0 50px rgba(255, 255, 255, 0.8), 0 0 100px rgba(255, 255, 255, 0.4); }
}


@keyframes floatUp {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-400px) translateX(var(--random-x)) rotate(var(--random-rotation));
        opacity: 0;
    }
}

@keyframes sparkleBackground {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 60px 60px;
    }
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--color);
    animation: confetti 3s linear;
    pointer-events: none;
    z-index: 1000;
    will-change: transform, opacity;
}

.floating-emote {
    position: absolute;
    width: 30px;
    height: 30px;
    background-image: url('../IMAGES/angledLove.png');
    background-size: cover;
    animation: floatUp 4s ease-out;
    pointer-events: none;
    z-index: 1500;
    will-change: transform, opacity;
}

.card.shake {
    animation: shake 0.5s ease-in-out;
    will-change: transform;
}

.card.sparkle {
    animation: sparkle 1s ease-in-out;
    will-change: box-shadow, opacity;
}

/* Explosion animation for confetti when clicking on first card */
@keyframes confettiExplosion {
    0% {
        transform: translate(-50%, -50%) translateX(0) translateY(0) rotate(0deg);
        opacity: 1;
    }
    70% {
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) translateX(var(--velocity-x)) translateY(var(--velocity-y)) rotate(720deg);
        opacity: 0;
    }
}

.confetti-explosion {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--color);
    animation: confettiExplosion 2.5s ease-out;
    pointer-events: none;
    z-index: 1500;
    will-change: transform, opacity;
}

/* Responsive Design */
@media (max-width: 768px) {
    .carousel-container {
        transform: scale(1.2);
    }
    
    .card {
        padding: 30px 20px;
    }
    
    .card-title {
        font-size: 2em;
    }
    
    .card-emoji {
        font-size: 3em;
    }
    
    .nav-button {
        width: 45px;
        height: 45px;
    }

    .chevron {
        width: 20px;
        height: 20px;
    }

    .gift-image {
        height: 85%;
    }
}

@media (max-width: 480px) {
    .carousel-container {
        transform: scale(1.0);
    }
    
    .card {
        padding: 25px 15px;
    }
    
    .card-title {
        font-size: 1.8em;
    }
    
    .card-emoji {
        font-size: 2.5em;
    }

    .gift-image {
        height: 80%;
    }
}

/* Footer styles */
.footer {
    position: fixed;
    bottom: 20px;
    right: 30px;
    z-index: 1000;
}

.footer-text {
    font-size: 0.9em;
    color: rgba(44, 62, 80, 0.7);
    margin: 0;
    font-family: 'Arial', sans-serif;
}

.footer-link {
    color: rgba(44, 62, 80, 0.8);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #1DA1F2;
}

.footer-logo {
    width: 16px;
    height: 16px;
    margin-right: 4px;
    vertical-align: middle;
}

/* Secret mode footer styling */
body.secret-mode .footer-text {
    color: rgba(255, 255, 255, 0.7);
}

body.secret-mode .footer-link {
    color: rgba(255, 255, 255, 0.8);
}

body.secret-mode .footer-link:hover {
    color: #1DA1F2;
}


/* Make all cards clickable, not just active ones */
.card {
    pointer-events: auto;
}

.card.next,
.card.prev,
.card.hidden {
    pointer-events: auto;
}

/* Ensure all child elements pass click events to parent card */
.card * {
    pointer-events: none;
}

/* Re-enable pointer events for interactive elements if needed */
.card a {
    pointer-events: auto;
}
