/* ===================================
   Modern Design Effects & Icons
   정보 전달 사이트용 가독성 중심 효과
   =================================== */

/* Icon Styles */
.icon {
    width: 1.25rem;
    height: 1.25rem;
    stroke-width: 2;
    fill: none;
    stroke: currentColor;
    transition: all var(--transition-base);
    flex-shrink: 0;
}

.icon-sm {
    width: 1rem;
    height: 1rem;
    stroke-width: 1.5;
}

.icon-lg {
    width: 1.5rem;
    height: 1.5rem;
    stroke-width: 2.5;
}

.icon-xl {
    width: 2rem;
    height: 2rem;
    stroke-width: 2.5;
}

/* Icon Hover Effects */
.icon-link:hover .icon,
.btn:hover .icon {
    transform: scale(1.1);
    color: var(--color-primary);
}

.icon-link:active .icon,
.btn:active .icon {
    transform: scale(0.95);
}

/* Enhanced Card Effects */
.card-enhanced {
    position: relative;
    overflow: hidden;
}

.card-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-base);
}

.card-enhanced:hover::before {
    transform: scaleX(1);
}

/* Glassmorphism Effect (미묘하게) */
.glass-effect {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Enhanced Button Effects */
.btn-enhanced {
    position: relative;
    overflow: hidden;
}

.btn-enhanced::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-enhanced:active::before {
    width: 300px;
    height: 300px;
}

/* Focus Ring Enhancement */
.form-input:focus,
.form-textarea:focus,
.form-select:focus,
.search-input:focus,
.chat-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1),
                0 0 0 2px var(--color-primary);
    background-color: var(--bg-primary);
}

/* Information Section Icons */
.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--color-primary-50) 0%, var(--color-primary-100) 100%);
    color: var(--color-primary);
    margin-right: var(--space-md);
    flex-shrink: 0;
}

.info-section h2,
.info-section h3 {
    display: flex;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.info-section h2 .info-icon {
    width: 2rem;
    height: 2rem;
}

.info-section h3 .info-icon {
    width: 1.75rem;
    height: 1.75rem;
}

/* Subtle Animation for Info Cards */
.info-card {
    position: relative;
    transition: all var(--transition-base);
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Enhanced Typography for Readability */
.readable-text {
    font-size: var(--font-size-base);
    line-height: 1.7;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.readable-text p {
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
    line-height: 1.7;
}

.readable-text strong {
    color: var(--text-primary);
    font-weight: var(--font-weight-semibold);
}

/* Loading Animation Enhancement */
.spinner-enhanced {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    border: 3px solid var(--border-color-light);
    border-top-color: var(--color-primary);
    border-right-color: var(--color-primary-light);
    border-radius: var(--radius-full);
    animation: spin-smooth 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

@keyframes spin-smooth {
    to { transform: rotate(360deg); }
}

/* Pulse Animation for Important Info */
@keyframes pulse-subtle {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.pulse-subtle {
    animation: pulse-subtle 2s ease-in-out infinite;
}

/* Smooth Fade In */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fade-in-up 0.6s ease-out;
}

/* Enhanced Badge with Icon */
.badge-with-icon {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 0.375rem 0.875rem;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    border-radius: var(--radius-full);
    background-color: var(--color-primary-50);
    color: var(--color-primary-700);
}

.badge-with-icon .icon {
    width: 0.875rem;
    height: 0.875rem;
}

/* Section Divider with Icon */
.section-divider-enhanced {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin: var(--space-2xl) 0;
    padding: var(--space-lg) 0;
}

.section-divider-enhanced::before,
.section-divider-enhanced::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

/* Tooltip Enhancement */
.tooltip-enhanced {
    position: relative;
}

.tooltip-enhanced:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: var(--space-sm);
    padding: var(--space-xs) var(--space-sm);
    background-color: var(--color-gray-900);
    color: var(--text-inverse);
    font-size: var(--font-size-xs);
    border-radius: var(--radius-md);
    white-space: nowrap;
    opacity: 0;
    animation: tooltip-fade-in 0.2s ease-out forwards;
    pointer-events: none;
    z-index: var(--z-tooltip);
}

@keyframes tooltip-fade-in {
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(-4px);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .info-icon {
        width: 2rem;
        height: 2rem;
        margin-right: var(--space-sm);
    }
    
    .info-section h2 .info-icon {
        width: 1.75rem;
        height: 1.75rem;
    }
    
    .info-section h3 .info-icon {
        width: 1.5rem;
        height: 1.5rem;
    }
    
    .readable-text {
        font-size: var(--font-size-base);
        line-height: 1.6;
    }
}

/* ===== GLASSMORPHISM ANIMATIONS ===== */

/* Glass Shimmer Effect */
@keyframes glass-shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.glass-shimmer-effect {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: glass-shimmer 2s infinite;
}

/* Float Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Pulse Glow Effect */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(37, 99, 235, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(37, 99, 235, 0.6);
    }
}

.animate-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Bounce In Animation */
@keyframes bounce-in {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-bounce-in {
    animation: bounce-in 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Shake Animation (for errors) */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

.animate-shake {
    animation: shake 0.6s ease-in-out;
}

/* Ripple Effect */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.click-ripple {
    position: relative;
    overflow: hidden;
}

.click-ripple::after {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: scale(0);
    pointer-events: none;
}

.click-ripple:active::after {
    animation: ripple 0.6s ease-out;
}

/* Skeleton Loading */
@keyframes skeleton-loading {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-tertiary, #f3f4f6) 0px,
        var(--bg-secondary, #f9fafb) 40px,
        var(--bg-tertiary, #f3f4f6) 80px
    );
    background-size: 200px 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: var(--radius-md, 0.5rem);
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-title {
    height: 1.5rem;
    width: 60%;
    margin-bottom: 1rem;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

/* Typing Dots Animation */
@keyframes typing-dots {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.6;
    }
    30% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

.typing-dots span {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin: 0 2px;
    background: var(--color-primary, #2563eb);
    border-radius: 50%;
    animation: typing-dots 1.4s infinite;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

/* Slide In Animations */
@keyframes slide-in-left {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slide-in-right {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-slide-in-left {
    animation: slide-in-left 0.4s ease-out;
}

.animate-slide-in-right {
    animation: slide-in-right 0.4s ease-out;
}

/* Scale In Animation */
@keyframes scale-in {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-scale-in {
    animation: scale-in 0.3s ease-out;
}

/* ===== HOVER UTILITY CLASSES ===== */

.hover-lift {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.15);
}

.hover-glow {
    transition: box-shadow 0.25s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.3);
}

.hover-scale {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-scale:hover {
    transform: scale(1.02);
}

/* Scroll Reveal Animation */
@keyframes reveal-from-bottom {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
}

.animate-on-scroll.visible {
    animation: reveal-from-bottom 0.6s ease-out forwards;
}

/* Staggered Animation Delays */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

/* Dark Mode Adjustments */
.dark-mode .skeleton,
[data-theme="dark"] .skeleton {
    background: linear-gradient(
        90deg,
        rgba(51, 65, 85, 0.8) 0px,
        rgba(71, 85, 105, 0.8) 40px,
        rgba(51, 65, 85, 0.8) 80px
    );
    background-size: 200px 100%;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .icon,
    .card-enhanced,
    .btn-enhanced,
    .info-card,
    .spinner-enhanced,
    .pulse-subtle,
    .fade-in-up,
    .animate-float,
    .animate-pulse-glow,
    .animate-bounce-in,
    .animate-shake,
    .animate-slide-in-left,
    .animate-slide-in-right,
    .animate-scale-in,
    .animate-on-scroll,
    .skeleton,
    .glass-shimmer-effect,
    .typing-dots span,
    .hover-lift,
    .hover-glow,
    .hover-scale {
        animation: none !important;
        transition: none !important;
    }

    .animate-on-scroll {
        opacity: 1;
    }
}
