/* Discord Nitro Gift Page Styles */

/* Gift Page - Full screen page */
.gift-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.gift-page.hidden {
    display: none;
}

/* Gift Card - 로그인 페이지 authBox와 동일한 스타일 */
.gift-card {
    background: var(--form-background);
    border-radius: 8px;
    padding: 32px;
    width: 480px;
    text-align: center;
    position: relative;
    z-index: 10;
}

/* Logo positioning for gift and loading pages */
.gift-page .svg-logo-text,
.loading-page .svg-logo-text {
    position: absolute;
    top: 48px;
    left: 48px;
    z-index: 20;
}

/* 프로필 아바타 원형 */
.gift-avatar {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    margin: 0 auto 24px;
}

.gift-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* "선물을 받았어요" 텍스트 */
.gift-header {
    color: var(--normal-text-color);
    font-size: 16px;
    font-weight: 400;
    margin-bottom: 16px;
    line-height: 20px;
}

/* Nitro 배지 영역 */
.nitro-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
}

.nitro-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
}

.nitro-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nitro-text {
    color: var(--headline-color);
    font-size: 24px;
    font-weight: 600;
    line-height: 30px;
}

/* 수락 버튼 - 로그인 버튼과 동일 스타일 */
.gift-accept-button {
    width: 100%;
    background: var(--btn-bg);
    color: #fff;
    padding: 7px 15px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    outline: none;
    border-radius: 8px;
    line-height: 24px;
    font-family: inherit;
    font-size: 16px;
    height: 44px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.17s ease;
}

.gift-accept-button:hover {
    background: var(--btn-bg-hover);
}

/* Hide login page initially */
.login-page.hidden {
    display: none;
}

/* ================================== */
/* Loading Screen Styles */
/* ================================== */

.loading-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.loading-page.hidden {
    display: none;
}

.loading-card {
    background: var(--form-background);
    border-radius: 8px;
    padding: 32px 48px;
    width: 420px;
    text-align: center;
    position: relative;
    z-index: 10;
}

.loading-header {
    color: var(--headline-color);
    font-size: 25px;
    font-weight: 600;
    line-height: 24px;
}

.loading-logo {
    width: 200px;
    height: 200px;
    margin: 0 auto;
}

.loading-logo video,
.loading-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ================================== */
/* Error Modal Styles */
/* ================================== */
.error-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.error-modal-overlay.hidden {
    display: none;
}

.error-modal {
    background: var(--form-background);
    border-radius: 8px;
    padding: 24px;
    width: 440px;
    max-width: 90%;
    text-align: center;
}

.error-modal-title {
    color: var(--headline-color);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    line-height: 24px;
}

.error-modal-message {
    color: var(--normal-text-color);
    font-size: 16px;
    font-weight: 400;
    line-height: 20px;
    margin-bottom: 24px;
}

.error-modal-button {
    width: 100%;
    background: var(--btn-bg);
    color: #fff;
    padding: 7px 15px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    outline: none;
    border-radius: 8px;
    line-height: 24px;
    font-family: inherit;
    font-size: 16px;
    height: 44px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.17s ease;
}

.error-modal-button:hover {
    background: var(--btn-bg-hover);
}

/* ================================== */
/* Mobile Responsive */
/* ================================== */
@media screen and (max-width: 850px) {
    .gift-card,
    .loading-card {
        width: 90%;
        max-width: 480px;
        padding: 32px;
    }
}

@media screen and (max-width: 480px) {
    .gift-page,
    .loading-page {
        background: var(--form-background);
    }

    .gift-page .bg,
    .loading-page .bg {
        display: none;
    }

    .gift-card,
    .loading-card {
        width: 100%;
        background: transparent;
        box-shadow: none;
        padding: 16px;
    }

    .gift-avatar {
        width: 64px;
        height: 64px;
        margin-bottom: 16px;
    }

    .gift-header {
        font-size: 14px;
        margin-bottom: 12px;
    }

    .nitro-row {
        gap: 8px;
        margin-bottom: 24px;
    }

    .nitro-icon {
        width: 32px;
        height: 32px;
    }

    .nitro-text {
        font-size: 20px;
    }

    .gift-accept-button {
        font-size: 14px;
        height: 40px;
    }

    .loading-header {
        font-size: 20px;
    }

    .loading-logo {
        width: 150px;
        height: 150px;
    }
}

