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

body {
    font-family: 'Arial', sans-serif;
    color: #333333;
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;

    /* Background setup */
    background-color: #fff5f5; /* Light pink fallback */
    background-image: url('../assets/images/heroina.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
}

/* Semi-transparent overlay to ensure text remains readable */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 245, 245, 0.443) 0%, rgba(255, 230, 230, 0.495) 100%);
    z-index: -1;
}

.container {
    width: 100%;
    max-width: 1200px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* Welcome screen */
.welcome-screen {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
    z-index: 1;
}

.welcome-screen h1 {
    font-size: 4rem;
    text-align: center;
    opacity: 0;
    color: #f44336; /* Main red color */
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    -webkit-text-stroke: 2px black; /* Black outline for webkit browsers */
}

/* .gift-content h2,
.gift-content .rotulado,
.instruction-message,
.initial-message {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.gift-content h2,
.gift-content .rotulado {
    color: #020202;
    text-shadow: 0 6px 6px rgba(0, 0, 0, 0.9);
} */

/* Date display */
.date-display {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 5rem;
    opacity: 0;
}

.date-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-box {
    width: 120px;
    height: 180px;
    background: #ffffff;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(244, 67, 54, 0.2);
    border: 2px solid rgba(244, 67, 54, 0.1);
}

.separator {
    font-size: 4rem;
    font-weight: bold;
    margin: 0 5px;
    color: #f44336; /* Main red color */
}

/* Seven-segment display styling */
.digit-roller {
    position: absolute;
    width: 100%;
    height: 1000%; /* 10x height to hold 0-9 */
    top: 0;
}

/* Seven-segment display */
.seven-segment {
    position: relative;
    width: 80px;
    height: 140px;
    margin: 0 auto;
}

.segment {
    position: absolute;
    background-color: #f0f0f0; /* Light gray for inactive segments */
    transition: background-color 0.3s, box-shadow 0.3s;
}

.segment.active {
    background-color: #f44336; /* Main red color */
    box-shadow: 0 0 10px rgba(244, 67, 54, 0.5), 0 0 20px rgba(244, 67, 54, 0.3);
}

/* Horizontal segments (a, d, g) */
.segment-a, .segment-d, .segment-g {
    width: 64px;
    height: 10px;
    left: 8px;
    border-radius: 5px;
}

.segment-a { top: 0; }
.segment-g { top: 65px; }
.segment-d { bottom: 0; }

/* Vertical segments (b, c, e, f) */
.segment-b, .segment-c, .segment-e, .segment-f {
    width: 10px;
    height: 64px;
    border-radius: 5px;
}

.segment-b, .segment-c { right: 0; }
.segment-e, .segment-f { left: 0; }

.segment-f, .segment-b { top: 8px; }
.segment-e, .segment-c { bottom: 8px; }

/* Enhanced Gift box */
.gift-container {
    position: relative;
    width: 300px;
    height: 300px;
    opacity: 0;
    perspective: 1000px;
    z-index: 5;
    pointer-events: auto;
}

.gift-box {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s ease-in-out;
}

.gift-box:hover {
    transform: rotate(5deg);
}

.gift-body {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 80%;
    background: linear-gradient(45deg, #f44336 0%, #ff8a80 100%); /* Red gradient */
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(244, 67, 54, 0.4);
    overflow: hidden;
}

/* Gift pattern */
.gift-body::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to right,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.3) 50%,
            rgba(255, 255, 255, 0) 100%);
    transform: rotate(30deg);
    animation: shine 3s infinite;
    pointer-events: none;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) rotate(30deg);
    }
    20% {
        transform: translateX(100%) rotate(30deg);
    }
    100% {
        transform: translateX(100%) rotate(30deg);
    }
}

.gift-body::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.1),
        rgba(255, 255, 255, 0.1) 10px,
        transparent 10px,
        transparent 20px
    );
}

.gift-lid {
    position: absolute;
    top: 0;
    width: 110%;
    height: 25%;
    background: linear-gradient(45deg, #d32f2f 0%, #f44336 100%); /* Darker red gradient */
    left: -5%;
    border-radius: 15px;
    z-index: 2;
    transform-origin: bottom;
    box-shadow: 0 5px 15px rgba(211, 47, 47, 0.4);
    overflow: hidden;
}

/* Lid pattern */
.gift-lid::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.1),
        rgba(255, 255, 255, 0.1) 10px,
        transparent 10px,
        transparent 20px
    );
}

.gift-ribbon {
    position: absolute;
    width: 20%;
    height: 120%;
    background-color: #ffffff;
    left: 40%;
    top: -20%;
    z-index: 1;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.gift-ribbon::before {
    content: '';
    position: absolute;
    width: 140%;
    height: 40%;
    background-color: #ffffff;
    left: -20%;
    top: 10%;
    border-radius: 50% / 20%;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.gift-bow {
    position: absolute;
    top: -15%;
    left: 35%;
    width: 30%;
    height: 30%;
    z-index: 3;
    transform-style: preserve-3d;
}

.bow-left, .bow-right {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #ff8a80 0%, #ffcdd2 100%); /* Light red gradient */
    border-radius: 50%;
    transform-origin: center;
}

.bow-left {
    transform: rotate(30deg) translateX(-30%);
}

.bow-right {
    transform: rotate(-30deg) translateX(30%);
}

.bow-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30%;
    height: 30%;
    background: linear-gradient(45deg, #ff8a80 0%, #ffcdd2 100%); /* Light red gradient */
    border-radius: 50%;
    z-index: 4;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.gift-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    text-align: center;
    z-index: 10;
    pointer-events: auto;
}

.gift-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #f44336; /* Main red color */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    -webkit-text-stroke: 2px black;
}

.gift-content .rotulado {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #f44336; /* Main red color */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    -webkit-text-stroke: 1px black;
}

.spotify-link {
    margin-top: 2rem;
    position: relative;
    z-index: 20;
}

/* Button styling to match the previous link appearance */
.spotify-button {
    display: inline-block;
    background-color: #f44336;
    /* Main red color */
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: bold;
    transition: all 0.3s ease;
    position: relative;
    z-index: 25;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(244, 67, 54, 0.3);
    border: none;
    font-size: 1rem;
    font-family: 'Arial', sans-serif;
}

.spotify-button:hover {
    background-color: #d32f2f;
    /* Darker red */
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(244, 67, 54, 0.5);
}

.spotify-button:focus {
    outline: none;
}

/* Background animation */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0;
}

/* Hearts and Butterflies */
.heart {
    position: absolute;
    font-size: 24px;
    color: #f44336; /* Main red color */
    opacity: 0.8;
    z-index: 1;
    display: inline-block;
    filter: drop-shadow(0 0 5px rgba(244, 67, 54, 0.5));
    will-change: transform;
    pointer-events: none;
}

/* Add better responsive design for date display */
@media (max-width: 768px) {
    .date-container {
        flex-wrap: nowrap;
        justify-content: center;
        gap: 5px;
    }

    .date-box {
        width: 65px;
        height: 100px;
    }

    .seven-segment {
        width: 45px;
        height: 80px;
    }

    .segment-a,
    .segment-d,
    .segment-g {
        width: 35px;
        height: 6px;
        left: 5px;
    }

    .segment-b,
    .segment-c,
    .segment-e,
    .segment-f {
        width: 6px;
        height: 37px;
    }

    .segment-g {
        top: 37px;
    }

    .separator {
        font-size: 2.5rem;
        margin: 0 2px;
    }

    .initial-message {
        font-size: 1.2rem;
        padding: 1.5rem;
        min-height: 250px;
        gap: 1.5rem;
    }

    .instruction-message {
        /* Repositioned for mobile */
        bottom: auto;
        top: 20px;
        font-size: 14px;
        padding: 8px 16px;
    }

    .sound-control {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .date-container {
        gap: 2px;
    }

    .date-box {
        width: 45px;
        height: 70px;
        margin: 2px;
    }

    .seven-segment {
        width: 32px;
        height: 55px;
    }

    .segment-a,
    .segment-d,
    .segment-g {
        width: 26px;
        height: 4px;
        left: 3px;
    }

    .segment-b,
    .segment-c,
    .segment-e,
    .segment-f {
        width: 4px;
        height: 25px;
    }

    .segment-g {
        top: 25px;
    }

    .separator {
        font-size: 1.8rem;
        margin: 0 1px;
    }

    .initial-message {
        font-size: 1rem;
        padding: 1rem;
        min-height: 200px;
        gap: 1rem;
        width: 95%;
    }

    .instruction-message {
        max-width: 90%;
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* Updated Sound control button with red theme */
.sound-control {
    position: fixed;
    bottom: 10px;
    right: 1%;
    /* transform: translateX(-50%); */
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgba(244, 67, 54, 0.8); /* Red with slight transparency */
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(244, 67, 54, 0.4);
}

.sound-control:hover {
    background-color: rgba(211, 47, 47, 0.9); /* Darker red */
    transform: translateX(-50%) scale(1.1);
    box-shadow: 0 5px 25px rgba(244, 67, 54, 0.6);
}

.sound-control:focus {
    outline: none;
}

.instruction-message {
    position: fixed;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(244, 67, 54, 0.7);
    /* Red with transparency */
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 16px;
    z-index: 101;
    /* Increased z-index to ensure it's above other elements */
    transition: opacity 0.5s ease;
    box-shadow: 0 5px 15px rgba(244, 67, 54, 0.4);
    font-weight: 500;
    letter-spacing: 0.5px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    width: auto;
    max-width: 80%;
    text-align: center;
}

.initial-message {
    font-size: 1.5rem;
    padding: 2rem;
    background-color: rgba(244, 67, 54, 0.8);
    /* Red with transparency */
    color: white;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    border-radius: 20px;
    opacity: 1;
    transition: opacity 0.5s ease;
    width: 90%;
    max-width: 600px;
    text-align: center;
    height: auto;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 30px rgba(244, 67, 54, 0.5);
    border: 3px solid rgba(255, 255, 255, 0.6);
}
