/* ===== Variables ===== */
:root {
    --primary: #A17BF4;
    --primary-light: #E1D3FF;
    --primary-dark: #8251EB;
    --bg-dark: #222222;
    --card-bg: rgba(156, 156, 166, 0.2);
    --text-white: #FFFFFF;
    --text-hint: #9E9EAA;
    --text-secondary: #8E8E93;
    --grey20: #9C9CA6;
    --divider: rgba(156, 156, 166, 0.2);
    --radius-card: 24px;
    --radius-cover: 36px;
    --warning: #F5A623;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro', 'SF Pro Text', 'Inter', 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-dark);
    min-height: 100vh;
    color: var(--text-white);
    line-height: 1.4;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Background ===== */
.background-blur {
    position: fixed;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background-size: cover;
    background-position: center;
    filter: blur(9.95px);
    z-index: 0;
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(34, 34, 34, 0.1) 0%,
        rgba(34, 34, 34, 0.92) 72.115%,
        #222222 100%
    );
    z-index: 1;
}

/* ===== Loading Screen ===== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-dark);
    z-index: 9999;
}

.loading-screen .spinner-border {
    width: 3rem;
    height: 3rem;
    color: var(--primary);
}

/* ===== Error Screen ===== */
.error-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-dark);
    padding: 2rem;
    z-index: 9999;
}

.error-content {
    max-width: 400px;
}

.error-icon {
    font-size: 4rem;
    color: var(--warning);
    margin-bottom: 1rem;
}

.error-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-white);
}

.error-content p {
    color: var(--text-hint);
}

/* ===== Logo ===== */
.logo-container {
    position: fixed;
    top: 37.89px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 4.53px;
    z-index: 100;
}

.logo-icon {
    height: 59.93px;
    width: 38.36px;
}

.logo-text {
    font-family: 'Multiround Pro', 'Inter', sans-serif;
    font-size: 27.178px;
    font-weight: 400;
    color: var(--text-white);
    letter-spacing: -1.9817px;
    line-height: 40.755px;
}

/* ===== Main Content ===== */
.main-content {
    position: relative;
    min-height: 100vh;
    z-index: 10;
    padding-top: 144px;
}

/* ===== Invitation Layout ===== */
.invitation-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 0 16px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Desktop: Side by side */
@media (min-width: 992px) {
    .invitation-layout {
        flex-direction: row;
        align-items: flex-start;
        justify-content: center;
        gap: 40px;
    }
}

/* ===== Cover Card ===== */
.cover-card-wrapper {
    width: 100%;
    max-width: 361px;
}

@media (min-width: 992px) {
    .cover-card-wrapper {
        width: 541.5px;
        max-width: 541.5px;
        flex-shrink: 0;
    }
}

.cover-card {
    position: relative;
    width: 100%;
    aspect-ratio: 361 / 401;
    border-radius: var(--radius-card);
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding: 24px;
    gap: 12px;
}

@media (min-width: 992px) {
    .cover-card {
        aspect-ratio: 541.5 / 601.5;
        border-radius: var(--radius-cover);
    }
}

.cover-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cover-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
}

.cover-content {
    position: relative;
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.host-invites {
    font-size: 17px;
    font-weight: 510;
    color: var(--text-white);
    margin: 0;
    text-shadow: 0px 6px 12px rgba(0, 0, 0, 0.25), 0px 6px 6px rgba(0, 0, 0, 0.25);
    letter-spacing: -0.66px;
    line-height: 30px;
}

@media (min-width: 992px) {
    .host-invites {
        font-size: 25.5px;
    }
}

.event-title {
    font-family: 'SF Pro Rounded', -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
    font-size: 28px;
    font-weight: 600;
    color: var(--text-white);
    line-height: 1.2;
    text-shadow: 0px 6px 12px rgba(0, 0, 0, 0.25), 0px 6px 6px rgba(0, 0, 0, 0.25);
    margin: 0;
    letter-spacing: 0.57px;
}

@media (min-width: 992px) {
    .event-title {
        font-size: 42px;
        line-height: 51px;
    }
}

/* ===== Content Wrapper ===== */
.content-wrapper {
    width: 100%;
    max-width: 361px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

@media (min-width: 992px) {
    .content-wrapper {
        width: 569px;
        max-width: 569px;
    }
}

/* ===== RSVP Section ===== */
.rsvp-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

@media (min-width: 992px) {
    .rsvp-section {
        width: 522px;
        margin: 0 auto;
    }
}

.rsvp-prompt {
    font-size: 17px;
    font-weight: 510;
    color: var(--text-white);
    letter-spacing: -0.44px;
    line-height: 20px;
    margin: 0;
}

.rsvp-buttons {
    display: flex;
    gap: 8px;
}

.btn-rsvp {
    flex: 1;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px;
    background: var(--card-bg);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border: none;
    border-radius: var(--radius-card);
    color: var(--text-hint);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-rsvp .icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-rsvp .icon svg {
    width: 20px;
    height: 20px;
}

.btn-rsvp .label {
    font-size: 15px;
    font-weight: 400;
    letter-spacing: -0.23px;
    line-height: 20px;
}

.btn-rsvp:hover {
    background: rgba(156, 156, 166, 0.3);
}

.btn-rsvp.selected {
    background: var(--primary);
    color: var(--text-white);
}

.btn-rsvp.selected .icon svg path,
.btn-rsvp.selected .icon svg circle {
    stroke: var(--text-white);
}

/* ===== Success/Responded Section ===== */
.success-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    width: 100%;
}

@media (min-width: 992px) {
    .success-section {
        width: 522px;
        margin: 0 auto;
    }
}

.response-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--primary-light);
    font-size: 15px;
    font-weight: 400;
    letter-spacing: -0.23px;
    line-height: 20px;
    padding: 8px;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-radius: var(--radius-card);
}

.response-badge .icon {
    width: 20px;
    height: 20px;
}

.response-badge .icon svg {
    width: 20px;
    height: 20px;
}

.response-badge .icon svg path,
.response-badge .icon svg circle {
    stroke: var(--primary-light);
}

.response-message {
    font-size: 17px;
    font-weight: 510;
    color: var(--text-white);
    letter-spacing: -0.44px;
    line-height: 20px;
    margin: 0;
}

.btn-change-response {
    width: 100%;
    padding: 16px 8px;
    background: var(--card-bg);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border: none;
    border-radius: var(--radius-card);
    color: var(--text-white);
    font-size: 17px;
    font-weight: 510;
    letter-spacing: -0.44px;
    line-height: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.btn-change-response:hover {
    background: rgba(156, 156, 166, 0.3);
}

/* ===== Event Passed Section ===== */
.event-passed-section {
    text-align: center;
    padding: 32px 16px;
    background: var(--text-white);
    border-radius: var(--radius-card);
}

.event-passed-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FFF;
    border: 2px solid var(--warning);
    border-radius: 8px;
    position: relative;
}

.event-passed-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 16px;
    background: var(--warning);
    border-radius: 6px 6px 0 0;
}

.event-passed-icon i {
    font-size: 24px;
    color: var(--warning);
    margin-top: 8px;
}

.event-passed-section h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1C1C1E;
    margin-bottom: 8px;
}

.event-passed-section p {
    font-size: 15px;
    color: var(--text-secondary);
    margin: 0;
}

/* ===== Details Card ===== */
.details-card {
    background: var(--card-bg);
    border-radius: var(--radius-card);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

@media (min-width: 992px) {
    .details-card {
        width: 523px;
        margin: 0 auto;
    }
}

.detail-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.detail-row .icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-row .icon svg {
    width: 18px;
    height: 18px;
}

.detail-row span:not(.icon) {
    font-size: 17px;
    font-weight: 400;
    color: var(--text-white);
    letter-spacing: -0.43px;
    line-height: 22px;
    flex: 1;
}

.detail-divider {
    height: 1px;
    background: rgba(156, 156, 166, 0.2);
    border-radius: 8px;
    width: 100%;
}

/* ===== Description Card ===== */
.description-section {
    width: 100%;
    padding: 0 16px;
}

@media (min-width: 992px) {
    .description-section {
        padding: 0;
        display: flex;
        justify-content: center;
    }
}

.description-card {
    background: var(--card-bg);
    border-radius: var(--radius-card);
    padding: 16px;
    min-height: 102px;
    width: 100%;
}

@media (min-width: 992px) {
    .description-card {
        width: 100%;
        max-width: 537px;
    }
}

.description-card p {
    font-size: 17px;
    font-weight: 400;
    color: var(--text-white);
    letter-spacing: -0.43px;
    line-height: 22px;
    margin: 0;
    white-space: pre-wrap;
}

/* ===== Hosted By Section ===== */
.hosted-by-section {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    padding: 0 16px;
}

@media (min-width: 992px) {
    .hosted-by-section {
        padding: 0;
        max-width: 537px;
        margin: 0 auto;
    }
}

.hosted-by-header {
    height: 38px;
    display: flex;
    align-items: center;
    padding: 2px 0;
    overflow: hidden;
}

.hosted-by-label {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-white);
    letter-spacing: -0.13px;
    line-height: 18px;
    text-transform: uppercase;
}

.host-card {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--card-bg);
    border-radius: var(--radius-card);
    padding: 12px 16px;
    width: 100%;
}

.host-avatar {
    width: 32px;
    height: 32px;
    border-radius: 100px;
    background: var(--primary);
    border: 2px solid var(--text-white);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.host-avatar span {
    font-size: 12px;
    font-weight: 510;
    color: var(--text-white);
    line-height: 16px;
    text-align: center;
}

.host-avatar-img {
    width: 32px;
    height: 32px;
    border-radius: 100px;
    border: 2px solid var(--text-white);
    object-fit: cover;
}

.host-name {
    font-size: 17px;
    font-weight: 510;
    color: var(--text-white);
    letter-spacing: -0.44px;
    line-height: 20px;
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-content {
    animation: fadeIn 0.3s ease-out;
}

/* ===== Utility Classes ===== */
.d-none {
    display: none !important;
}

/* ===== Mobile Optimizations ===== */
@media (max-width: 576px) {
    .logo-container {
        top: 20px;
    }

    .logo-icon {
        height: 40px;
        width: 25px;
    }

    .logo-text {
        font-size: 20px;
        line-height: 30px;
    }

    .main-content {
        padding-top: 100px;
    }

    .cover-card-wrapper {
        max-width: 100%;
    }

    .content-wrapper {
        max-width: 100%;
    }

    .hosted-by-section,
    .description-section {
        padding: 0;
    }

    .details-card {
        width: 100%;
    }
}

/* ===== Tablet Adjustments ===== */
@media (min-width: 577px) and (max-width: 991px) {
    .invitation-layout {
        padding: 0 24px 40px;
    }

    .cover-card-wrapper {
        max-width: 450px;
    }

    .content-wrapper {
        max-width: 450px;
    }
}
