/* Custom styles */

/* 스크롤바 스타일링 */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #1f2937;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* 부드러운 스크롤 */
html {
    scroll-behavior: smooth;
}

/* 그라디언트 애니메이션 */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-animation {
    background-size: 200% 200%;
    animation: gradientShift 10s ease infinite;
}

/* 카드 호버 효과 */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* 모달 애니메이션 */
#app-modal {
    animation: fadeIn 0.3s ease-out;
}

#app-modal > div {
    animation: slideUp 0.3s ease-out;
}

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

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

/* Image loading placeholder */
.image-placeholder {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

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

/* 버튼 클릭 효과 */
button {
    position: relative;
    overflow: hidden;
}

button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:active::after {
    width: 300px;
    height: 300px;
}

/* Text selection color */
::selection {
    background-color: #3B82F6;
    color: white;
}

::-moz-selection {
    background-color: #3B82F6;
    color: white;
}

/* Responsive typography */
@media (max-width: 640px) {
    h1 {
        font-size: 1.875rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
}

/* Navigation sticky effect */
header {
    backdrop-filter: blur(10px);
    background-color: rgba(17, 24, 39, 0.95);
}

/* Mobile menu animation */
#mobile-menu {
    transition: all 0.3s ease-out;
}

#mobile-menu.hidden {
    max-height: 0;
    opacity: 0;
}

#mobile-menu:not(.hidden) {
    max-height: 300px;
    opacity: 1;
}

/* Footer link hover effect */
footer a {
    position: relative;
}

footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: white;
    transition: width 0.3s ease;
}

footer a:hover::after {
    width: 100%;
}

/* Loading spinner */
.spinner {
    border: 3px solid #374151;
    border-top: 3px solid #3B82F6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* App icon shadow effect */
.app-icon-shadow {
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5);
}

/* Slider transition */
#slider-container img {
    transition: opacity 0.3s ease-in-out;
}

/* Category tag style */
.category-tag {
    backdrop-filter: blur(10px);
}

/* Modal scrollbar custom */
#modal-content::-webkit-scrollbar {
    width: 6px;
}

#modal-content::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 3px;
}

/* Download button hover effect */
.download-button {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.download-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.5);
}

/* Responsive grid spacing */
@media (max-width: 768px) {
    #app-grid {
        gap: 1.5rem;
    }
}

@media (max-width: 640px) {
    #app-grid {
        gap: 1rem;
    }
}