/* ======================
   메시지 말풍선
   ====================== */

.message-user {
    background: #1A1A1A;
    border: 1px solid #2A2A2A;
}

.message-ai {
    background: #0A0A0A;
    border: 1px solid #00FF00;
}

/* ======================
   그라데이션 요소
   ====================== */

.gradient-accent {
    background: linear-gradient(135deg, #00FF00 0%, #00BFFF 100%);
}

.gradient-text {
    background: linear-gradient(135deg, #00FF00 0%, #00BFFF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

/* 호버시 그라데이션 반전 */
.example-prompt:hover .gradient-text {
    background: linear-gradient(135deg, #00BFFF 0%, #00FF00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

/* ======================
   💎 프리미엄 광고 배너
   ====================== */

.premium-ad-banner {
    background: linear-gradient(135deg, 
        rgba(0, 255, 0, 0.15) 0%, 
        rgba(0, 221, 170, 0.15) 50%, 
        rgba(0, 191, 255, 0.15) 100%
    );
    border: 2px solid transparent;
    background-clip: padding-box;
    animation: premiumPulse 3s ease-in-out infinite;
}

.premium-ad-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    padding: 2px;
    background: linear-gradient(135deg, #00FF00, #00DDAA, #00BFFF, #00FF00);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: rotateBorder 4s linear infinite;
    background-size: 200% 200%;
}

@keyframes premiumPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 30px rgba(0, 255, 0, 0.5);
    }
}

@keyframes rotateBorder {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 반짝이 효과 */
.sparkle-effect {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.3) 0%, transparent 50%);
    animation: sparkleMove 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes sparkleMove {
    0%, 100% {
        transform: translateX(-100%) scale(0.5);
        opacity: 0;
    }
    50% {
        transform: translateX(100%) scale(1);
        opacity: 1;
    }
}

/* PRO 배지 */
.pro-badge {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
    font-size: 0.6rem;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% {
        box-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
    }
    50% {
        box-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
    }
}

/* 업그레이드 버튼 */
.premium-upgrade-btn {
    background: linear-gradient(90deg, #00FF00, #00DDAA, #00BFFF);
    background-size: 200% auto;
    color: #000;
    font-weight: 700;
    transition: all 0.3s ease;
    animation: gradientShift 3s ease infinite;
}

.premium-upgrade-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 255, 0, 0.4);
}

/* ======================
   🎁 스폰서 광고 카드
   ====================== */

.sponsor-card {
    background: linear-gradient(135deg, #1A1A1A 0%, #0F0F0F 100%);
    border: 2px solid #FFD700;
    position: relative;
    animation: sponsorGlow 3s ease-in-out infinite;
}

@keyframes sponsorGlow {
    0%, 100% {
        box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
    }
    50% {
        box-shadow: 0 0 25px rgba(255, 215, 0, 0.6);
    }
}

/* 스폰서 반짝임 효과 */
.sponsor-shimmer {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 215, 0, 0.2) 50%,
        transparent 70%
    );
    animation: shimmer 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* 스폰서 텍스트 그라데이션 */
.gradient-text-sponsor {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FFD700 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: gradientShift 3s ease infinite;
}

/* 스폰서 태그 */
.sponsor-tag {
    background: rgba(255, 215, 0, 0.2);
    color: #FFD700;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid #FFD700;
    letter-spacing: 0.5px;
    animation: tagBlink 2s ease-in-out infinite;
}

@keyframes tagBlink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* ======================
   🔥 Navigation Tabs (1, 2, 3)
   ====================== */

.nav-tab {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: visible; /* Changed to visible for tooltip */
}

.nav-tab::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(0, 255, 0, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 8px;
}

.nav-tab:hover::before {
    opacity: 1;
}

.nav-tab .nav-number {
    font-size: 15px;
    font-weight: 600;
    color: #666666;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.nav-tab:hover {
    background: #2A2A2A;
    border-color: #00FF00;
    transform: translateY(-2px);
}

.nav-tab:hover .nav-number {
    color: #00FF00;
    transform: scale(1.1);
}

.nav-tab.active {
    background: linear-gradient(135deg, rgba(0, 255, 0, 0.25), rgba(0, 191, 255, 0.25));
    border-color: #00FF00;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.4), 0 4px 6px rgba(0, 0, 0, 0.3);
}

.nav-tab.active .nav-number {
    color: #00FF00;
    font-weight: 800;
    text-shadow: 0 0 8px rgba(0, 255, 0, 0.6);
}

/* ======================
   💬 Tab Tooltips (말풍선)
   ====================== */

.nav-tab-tooltip {
    position: absolute;
    bottom: -45px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: linear-gradient(135deg, rgba(0, 255, 0, 0.95), rgba(0, 191, 255, 0.95));
    color: #000;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 255, 0, 0.3);
}

/* Tooltip arrow */
.nav-tab-tooltip::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid rgba(0, 255, 0, 0.95);
}

/* Show tooltip on hover when tooltips are enabled */
.tooltips-enabled .nav-tab:hover .nav-tab-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Hide tooltips when disabled */
.tooltips-disabled .nav-tab-tooltip {
    display: none !important;
}

/* Light mode tooltip */
.light-mode .nav-tab-tooltip {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.95), rgba(6, 182, 212, 0.95));
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.light-mode .nav-tab-tooltip::before {
    border-bottom-color: rgba(16, 185, 129, 0.95);
}

/* ======================
   🎯 Tooltip Toggle Button
   ====================== */

.tooltip-toggle-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #1A1A1A;
    border: 1px solid #2A2A2A;
    border-radius: 8px;
    color: #B0B0B0;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tooltip-toggle-btn:hover {
    background: #2A2A2A;
    border-color: #00FF00;
    color: #00FF00;
}

.tooltip-toggle-btn.active {
    background: linear-gradient(135deg, rgba(0, 255, 0, 0.2), rgba(0, 191, 255, 0.2));
    border-color: #00FF00;
    color: #00FF00;
}

.tooltip-icon {
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
}

.tooltip-toggle-btn.active .tooltip-icon {
    transform: scale(1.1);
}

/* Light mode toggle button */
.light-mode .tooltip-toggle-btn {
    background: #F8F8F8;
    border-color: #E5E7EB;
    color: #6B7280;
}

.light-mode .tooltip-toggle-btn:hover {
    background: #F3F4F6;
    border-color: #10B981;
    color: #10B981;
}

.light-mode .tooltip-toggle-btn.active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(6, 182, 212, 0.2));
    border-color: #10B981;
    color: #10B981;
}

/* Tab content visibility with smooth transitions */
.tab-content {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
    opacity: 1;
}

/* Smooth iframe loading */
.tab-content iframe {
    transition: opacity 0.3s ease;
}
