/* ==========================================================
   EVENT PAGE
   ========================================================== */

:root {
    --event-max-width: 560px;

    --radius: 24px;

    --card-bg: #ffffff;

    --text: #1f2937;

    --text-light: #6b7280;

    --border: #ececec;

    --shadow:
        0 10px 30px rgba(0, 0, 0, .08);

    --primary: #6C63FF;
}

/* ==========================================================
   LAYOUT
   ========================================================== */

.event-layout {

    width: min(100%, var(--event-max-width));

    margin: 32px auto;

    display: flex;

    flex-direction: column;

    gap: 20px;

    padding: 0 18px;
}

/* ==========================================================
   CARDS
   ========================================================== */

.hero-card,
.progress-card,
.stats-card,
.actions-card {

    background: var(--card-bg);

    border-radius: var(--radius);

    box-shadow: var(--shadow);

    overflow: hidden;
}

/* ==========================================================
   HERO
   ========================================================== */
.gift-image-container {

    position: relative;

    width: 100%;

    aspect-ratio: 16/9;

    overflow: hidden;

    background: #f5f5f5;
}

.gift-image-skeleton {

    position: absolute;

    inset: 0;

    background: linear-gradient(90deg,
            #f2f2f2 0%,
            #fafafa 50%,
            #f2f2f2 100%);

    background-size: 200% 100%;

    animation: skeletonMove 1.3s infinite;
}

.gift-image {

    width: 100%;

    height: 100%;

    object-fit: cover;

    opacity: 0;

    transition: opacity .35s ease;
}

.hero-content {

    padding: 24px;
}

.hero-content h1 {

    font-size: 2rem;

    font-weight: 700;

    margin-bottom: 8px;

    color: var(--text);
}

.creator {

    color: var(--text-light);

    margin-bottom: 18px;
}

.hero-content h2 {

    font-size: 1.4rem;

    margin-bottom: 10px;
}

.hero-content p {

    line-height: 1.6;
}

.gift-info {

    margin-top: 24px;

    padding-top: 20px;

    border-top: 1px solid var(--border);
}

.gift-label {

    display: inline-block;

    font-size: .85rem;

    font-weight: 600;

    color: var(--primary);

    margin-bottom: 12px;

    letter-spacing: .05em;

    text-transform: uppercase;
}

.gift-info h2 {

    margin: 0 0 8px;

    font-size: 1.5rem;

    color: var(--text);
}

.gift-info p {

    margin: 0;

    color: var(--text-light);

    line-height: 1.5;
}

/* ==========================================================
   PROGRESS
   ========================================================== */

.progress-card {

    padding: 22px;
}

.progress-header {

    display: flex;

    justify-content: space-between;

    font-size: 1.2rem;

    font-weight: 700;

    margin-bottom: 16px;
}

.progress {

    height: 14px;

    border-radius: 20px;

    background: #ececec;

    overflow: hidden;
}

#progressFill {

    height: 100%;

    width: 0;

    background: linear-gradient(90deg, #6C63FF, #8B5CF6);

    border-radius: 20px;

    transition: width .4s;
}

.progress-amount {

    display: flex;

    flex-direction: column;

    margin-bottom: 18px;
}

.progress-amount span {

    font-size: 2rem;

    font-weight: 700;

    color: var(--text);
}

.progress-amount small {

    color: var(--text-light);

}

.progress-footer {

    margin-top: 14px;

    display: flex;

    justify-content: space-between;

    align-items: center;

    font-size: .95rem;
}

.progress-footer strong {

    color: var(--text);
}

#progressPercent {

    font-weight: 700;

    color: var(--primary);
}

.progress-message {

    margin-top: 18px;

    text-align: center;

    color: var(--text-light);

    font-size: .9rem;
}

/* ==========================================================
   STATS
   ========================================================== */

.stats-card {

    display: grid;

    grid-template-columns: repeat(3, 1fr);

    padding: 20px;
}

.stat {

    text-align: center;
}

.emoji {

    font-size: 1.6rem;

    display: block;

    margin-bottom: 10px;
}

.stat span {

    font-weight: 700;

    display: block;
}

.stat small {

    color: var(--text-light);
}

/* ==========================================================
   BUTTONS
   ========================================================== */

.actions-card {

    padding: 22px;

    display: flex;

    flex-direction: column;

    gap: 14px;
}

.actions-card button {

    height: 52px;

    border: none;

    border-radius: 14px;

    font-size: 1rem;

    font-weight: 600;

    cursor: pointer;
}

#installButton {

    background: #6C63FF;

    color: white;

    border: none;
}

.install-message {

    margin-top: 10px;

    text-align: center;

    font-size: .9rem;

    color: var(--text-light);

    line-height: 1.5;
}

@keyframes skeletonMove {

    from {

        background-position: 200% 0;

    }

    to {

        background-position: -200% 0;

    }

}

.not-found {

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    text-align: center;

    padding: 60px 25px;
}

.not-found-icon {

    font-size: 64px;

    margin-bottom: 24px;
}

.not-found h2 {

    margin-bottom: 14px;
}

.not-found p {

    color: var(--text-light);

    line-height: 1.6;

    margin-bottom: 28px;
}

#notFoundButton {

    background: var(--primary);

    color: white;

    border: none;

    padding: 16px 28px;

    border-radius: 14px;

    font-size: 1rem;

    cursor: pointer;
}

.not-found[hidden]{

    display: none !important;

}