/* Custom Styles for 집사정신 */

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Animations */
@keyframes wiggle {
    0%, 7% { transform: rotateZ(0); }
    15% { transform: rotateZ(-15deg); }
    20% { transform: rotateZ(10deg); }
    25% { transform: rotateZ(-10deg); }
    30% { transform: rotateZ(6deg); }
    35% { transform: rotateZ(-4deg); }
    40%, 100% { transform: rotateZ(0); }
}

.wiggle {
    animation: wiggle 2s ease-in-out infinite;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Test Card Hover Effects */
.test-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.test-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.test-card:active {
    transform: translateY(-2px);
}

/* Progress Bar */
.progress-bar {
    width: 0%;
    height: 8px;
    background: linear-gradient(90deg, #FF8C42, #FFA500);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Result Modal Styles */
.result-modal {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Custom Button Styles */
.btn-primary {
    @apply bg-gradient-to-r from-cat-orange to-yellow-500 text-white font-semibold py-3 px-6 rounded-full shadow-lg hover:shadow-xl transition-all duration-300 transform hover:scale-105;
}

.btn-secondary {
    @apply bg-white text-cat-brown border-2 border-cat-orange font-semibold py-3 px-6 rounded-full shadow-lg hover:bg-cat-orange hover:text-white transition-all duration-300;
}

/* Image Upload Area */
.upload-area {
    border: 3px dashed #FF8C42;
    transition: all 0.3s ease;
}

.upload-area.dragover {
    background-color: rgba(255, 140, 66, 0.1);
    border-color: #FFA500;
}

/* Question Styles */
.question-card {
    @apply bg-white rounded-2xl shadow-lg p-6 mb-6 border-l-4 border-cat-orange;
}

.answer-option {
    @apply bg-gray-50 border-2 border-gray-200 rounded-xl p-4 cursor-pointer transition-all duration-300 hover:border-cat-orange hover:bg-orange-50;
}

.answer-option.selected {
    @apply border-cat-orange bg-orange-50 shadow-md;
}

/* Share Buttons */
.share-btn {
    @apply flex items-center justify-center space-x-2 py-3 px-4 rounded-xl font-semibold transition-all duration-300 hover:scale-105;
}

.share-btn.kakao {
    @apply bg-yellow-400 text-black hover:bg-yellow-500;
}

.share-btn.instagram {
    @apply bg-gradient-to-r from-purple-500 to-pink-500 text-white hover:from-purple-600 hover:to-pink-600;
}

.share-btn.threads {
    @apply bg-black text-white hover:bg-gray-800;
}

/* Ranking Styles */
.ranking-item {
    @apply flex items-center justify-between p-3 bg-gray-50 rounded-xl mb-2 hover:bg-gray-100 transition-colors;
}

.ranking-medal {
    @apply w-8 h-8 rounded-full flex items-center justify-center text-sm font-bold text-white;
}

.gold { @apply bg-yellow-500; }
.silver { @apply bg-gray-400; }
.bronze { @apply bg-yellow-600; }
.other { @apply bg-cat-gray text-white; }

/* Mobile Optimizations */
@media (max-width: 768px) {
    .test-card {
        margin-bottom: 1rem;
    }
    
    .question-card {
        padding: 1rem;
    }
    
    .answer-option {
        padding: 0.75rem;
        margin-bottom: 0.5rem;
    }
}

/* Privacy Modal */
.privacy-modal {
    max-height: 80vh;
    overflow-y: auto;
}

/* Loading States */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Accessibility Improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus States */
button:focus, 
input:focus, 
textarea:focus,
select:focus {
    outline: 2px solid #FF8C42;
    outline-offset: 2px;
}

/* Social Media Links */
.social-link {
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.social-link:hover::before {
    width: 100%;
    height: 100%;
}

/* Social Media Hover Effects */
.social-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* YouTube specific styling */
.social-link:has(.fa-youtube) {
    background: linear-gradient(135deg, #ff0000, #cc0000);
}

/* Instagram specific styling */
.social-link:has(.fa-instagram) {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

/* TikTok specific styling */
.social-link:has(.fa-tiktok) {
    background: linear-gradient(135deg, #000000, #333333);
}

/* Pulse animation for social icons */
@keyframes socialPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.social-link:hover i {
    animation: socialPulse 0.6s ease-in-out infinite;
}

/* Coming Soon Features Animations */
@keyframes comingSoonGlow {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(255, 140, 66, 0.3);
        transform: translateY(0px);
    }
    50% { 
        box-shadow: 0 0 30px rgba(255, 140, 66, 0.5);
        transform: translateY(-2px);
    }
}

.coming-soon-card:hover {
    animation: comingSoonGlow 2s ease-in-out infinite;
}

/* Progress Bar Animation */
@keyframes progressFill {
    from { width: 0%; }
    to { width: var(--progress-width); }
}

.progress-animated {
    animation: progressFill 2s ease-out;
}

/* Popular Badge Pulse */
@keyframes popularPulse {
    0%, 100% { transform: scale(1) rotate(-5deg); }
    50% { transform: scale(1.1) rotate(-5deg); }
}

.popular-badge {
    animation: popularPulse 2s ease-in-out infinite;
}

/* Newsletter signup hover effect */
.newsletter-signup:hover {
    background: linear-gradient(135deg, #FF8C42, #FFA500, #FFD700);
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(255, 140, 66, 0.4);
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .test-card {
        border: 2px solid #000;
    }
    
    .btn-primary {
        border: 2px solid #000;
    }
    
    .social-link {
        border: 2px solid #000;
    }
}