/* Custom CSS extensions for Tailwind */

/* Delta Flow Animation */
.delta-positive {
    color: #4ade80;
}

.delta-negative {
    color: #f87171;
}

/* Number transition animation */
.number-transition {
    transition: all 0.3s ease-in-out;
}

/* Microstructure card hover effect */
.microstructure-card {
    transition: all 0.2s ease;
}

.microstructure-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Status indicators */
.status-normal {
    background-color: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-warning {
    background-color: rgba(250, 204, 21, 0.1);
    border: 1px solid rgba(250, 204, 21, 0.3);
}

.status-danger {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Trend indicators */
.trend-up {
    color: #4ade80;
}

.trend-down {
    color: #f87171;
}

.trend-neutral {
    color: #9ca3af;
}

/* Chart container optimization - 차트 떨림 방지 */
#main-chart-container,
#main-chart-container * {
    transition: none !important;
    transform: translateZ(0);  /* GPU 가속 */
    will-change: auto;
}

/* Pattern history animation */
.pattern-history-item {
    animation: fadeIn 0.3s ease-out forwards;
    opacity: 0;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Wave canvas container */
.wave-container {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Wave glow effect */
@keyframes waveGlow {
    0% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.5;
    }
}

/* Text Ad Styles - 두 가지 사이즈 지원 */
.text-ad-small {
    width: 240px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.text-ad-large {
    width: 260px;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

/* 텍스트 광고는 고정 크기 유지, 단 화면보다 크면 축소 (반응형) */
.ad-slot .text-ad-small {
    width: 240px;
    max-width: 100%;
    height: 60px;
}

.ad-slot .text-ad-large {
    width: 260px;
    max-width: 100%;
    height: 110px;
}

/* Footer 텍스트 광고용 별도 스타일 */
.footer-text-ad {
    width: 100%;
    padding: 12px 20px;  /* Footer는 좀 더 여유있게 */
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    background: linear-gradient(135deg, rgba(0,0,0,0.9) 0%, rgba(20,20,20,0.95) 100%);
    text-align: center;
    transition: all 0.3s ease;
}

/* 텍스트 광고 호버 효과 */
.text-ad-small:hover,
.text-ad-large:hover,
.footer-text-ad:hover {
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* 텍스트 광고 내부 텍스트 스타일 */
.text-ad-small span,
.text-ad-large span,
.footer-text-ad span {
    display: block;
    font-weight: 500;
    line-height: 1.4;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    text-align: center;
}

/* 작은 화면에서도 텍스트 광고가 잘 보이도록 */
@media (max-width: 768px) {
    .text-ad-content {
        padding: 6px;
        font-size: 14px;
    }

    .footer-text-ad {
        padding: 10px 15px;
        font-size: 13px;
    }
}