/* css/pages/ai-support.css */

.ai-support-overlay {
    position: fixed;
    inset: 0;
    z-index: 100001;
    display: none;
    align-items: center;
    justify-content: center;
}

.ai-support-overlay.active {
    display: flex;
}

/* Blurred background - instant blur and black, no delay */
.ai-support-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    opacity: 0;
    transition: opacity 0.15s ease;
}

.ai-support-overlay.active::before {
    opacity: 1;
}

/* Apple Intelligence style glow border - full frame with color shift */
.ai-glow-border {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

/* Top edge */
.ai-glow-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 16px;
    background: linear-gradient(
        90deg,
        #6366f1 0%,
        #8b5cf6 16%,
        #a855f7 32%,
        #ec4899 48%,
        #f43f5e 64%,
        #f97316 80%,
        #6366f1 100%
    );
    background-size: 200% 100%;
    animation: aiColorShift 8s ease-in-out infinite;
    opacity: 0;
    filter: blur(12px);
    transition: opacity 0.8s ease;
}

/* Bottom edge */
.ai-glow-border::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 16px;
    background: linear-gradient(
        90deg,
        #f97316 0%,
        #f43f5e 16%,
        #ec4899 32%,
        #a855f7 48%,
        #8b5cf6 64%,
        #6366f1 80%,
        #f97316 100%
    );
    background-size: 200% 100%;
    animation: aiColorShift 8s ease-in-out infinite;
    opacity: 0;
    filter: blur(12px);
    transition: opacity 0.8s ease;
}

.ai-support-overlay.active .ai-glow-border::before,
.ai-support-overlay.active .ai-glow-border::after {
    opacity: 0.7;
}

/* Side glows */
.ai-glow-border-sides {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

/* Left edge */
.ai-glow-border-sides::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 16px;
    background: linear-gradient(
        180deg,
        #6366f1 0%,
        #8b5cf6 16%,
        #a855f7 32%,
        #ec4899 48%,
        #f43f5e 64%,
        #f97316 80%,
        #6366f1 100%
    );
    background-size: 100% 200%;
    animation: aiColorShiftVertical 8s ease-in-out infinite;
    opacity: 0;
    filter: blur(12px);
    transition: opacity 0.8s ease;
}

/* Right edge */
.ai-glow-border-sides::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 16px;
    background: linear-gradient(
        180deg,
        #f97316 0%,
        #f43f5e 16%,
        #ec4899 32%,
        #a855f7 48%,
        #8b5cf6 64%,
        #6366f1 80%,
        #f97316 100%
    );
    background-size: 100% 200%;
    animation: aiColorShiftVertical 8s ease-in-out infinite;
    opacity: 0;
    filter: blur(12px);
    transition: opacity 0.8s ease;
}

.ai-support-overlay.active .ai-glow-border-sides::before,
.ai-support-overlay.active .ai-glow-border-sides::after {
    opacity: 0.7;
}

/* Corner glows to fill gaps */
.ai-glow-corners {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.ai-glow-corners::before,
.ai-glow-corners::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    filter: blur(15px);
    opacity: 0;
    transition: opacity 0.8s ease;
    animation: aiCornerPulse 8s ease-in-out infinite;
}

/* Top-left corner */
.ai-glow-corners::before {
    top: -20px;
    left: -20px;
    background: #8b5cf6;
}

/* Bottom-right corner */
.ai-glow-corners::after {
    bottom: -20px;
    right: -20px;
    background: #ec4899;
}

.ai-support-overlay.active .ai-glow-corners::before,
.ai-support-overlay.active .ai-glow-corners::after {
    opacity: 0.6;
}

/* Extra corners container */
.ai-glow-corners-extra {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.ai-glow-corners-extra::before,
.ai-glow-corners-extra::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    filter: blur(15px);
    opacity: 0;
    transition: opacity 0.8s ease;
    animation: aiCornerPulse 8s ease-in-out infinite reverse;
}

/* Top-right corner */
.ai-glow-corners-extra::before {
    top: -20px;
    right: -20px;
    background: #f97316;
}

/* Bottom-left corner */
.ai-glow-corners-extra::after {
    bottom: -20px;
    left: -20px;
    background: #f43f5e;
}

.ai-support-overlay.active .ai-glow-corners-extra::before,
.ai-support-overlay.active .ai-glow-corners-extra::after {
    opacity: 0.6;
}

@keyframes aiColorShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes aiColorShiftVertical {
    0%, 100% { background-position: 50% 0%; }
    50% { background-position: 50% 100%; }
}

@keyframes aiCornerPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Content container */
.ai-support-content {
    position: relative;
    z-index: 1;
    text-align: center;
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ai-support-overlay.active .ai-support-content {
    transform: scale(1) translateY(0);
    opacity: 1;
    transition-delay: 0.3s;
}

/* Verse Logo */
.ai-logo {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
}

.ai-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Title */
.ai-title {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px 0;
}

.ai-title::before {
    display: none;
}

/* Description */
.ai-description {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0 0 32px 0;
}

/* Support cards container */
.ai-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
}

/* Card style */
.ai-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: pointer;
}

.ai-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.12);
}

.ai-card-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(167, 139, 250, 0.12);
    border-radius: 10px;
    flex-shrink: 0;
}

.ai-card-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 4px;
}

.ai-card-icon.discord {
    background: rgba(88, 101, 242, 0.15);
}

.ai-card-icon.discord svg {
    width: 22px;
    height: 22px;
    color: #5865F2;
}

.ai-card-content {
    flex: 1;
    text-align: left;
    min-width: 0;
}

.ai-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
}

.ai-card-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ai-card-btn {
    padding: 8px 16px;
    background: var(--accent-primary);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.ai-card-btn:hover {
    background: var(--accent-secondary);
    transform: translateY(-1px);
}

/* Legacy styles - keep for backwards compatibility */
.ai-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.ai-option-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    min-width: 280px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ai-option-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
}

.ai-option-btn .option-icon-wrapper {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    flex-shrink: 0;
}

.ai-option-btn .option-icon-wrapper img {
    width: 26px;
    height: 26px;
    object-fit: contain;
    border-radius: 4px;
}

.ai-option-btn .option-icon-wrapper .discord-icon {
    width: 24px;
    height: 24px;
    color: #5865F2;
}

.ai-option-btn .option-text {
    flex: 1;
    text-align: left;
}

/* Click to close hint */
.ai-support-overlay .close-hint {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.35);
    font-size: 13px;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.4s ease 1s;
}

.ai-support-overlay.active .close-hint {
    opacity: 1;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    .ai-support-content {
        padding: 0 20px;
        width: 100%;
    }

    .ai-title {
        font-size: 24px;
    }

    .ai-description {
        font-size: 13px;
        margin-bottom: 24px;
    }

    .ai-cards {
        max-width: 100%;
    }

    .ai-card {
        padding: 12px 16px;
        gap: 12px;
    }

    .ai-card-icon {
        width: 38px;
        height: 38px;
    }

    .ai-card-title {
        font-size: 13px;
    }

    .ai-card-desc {
        font-size: 11px;
    }

    .ai-card-btn {
        padding: 7px 14px;
        font-size: 12px;
    }

    .ai-option-btn {
        min-width: unset;
        width: 100%;
        padding: 14px 18px;
        font-size: 14px;
    }

    .ai-support-overlay .close-hint {
        bottom: 30px;
        font-size: 12px;
    }

    .ai-logo {
        width: 60px;
        height: 60px;
        margin-bottom: 16px;
    }
}
