/* ==========================================================================
   미래논문통계 - Custom Styles
   ========================================================================== */

/* Alpine.js Cloak */
[x-cloak] {
    display: none !important;
}

/* ==========================================================================
   Animations
   ========================================================================== */

/* Fade In */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Fade In Up */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Float Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Grow Width */
@keyframes growWidth {
    from {
        width: 0;
    }
}

/* Pulse Glow */
@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }
}

/* Animation Classes */
.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-grow-width {
    animation: growWidth 1.5s ease-out forwards;
}

.animate-pulse-glow {
    animation: pulseGlow 2s ease-in-out infinite;
}

/* Animation Delays */
.animation-delay-100 {
    animation-delay: 0.1s;
}

.animation-delay-200 {
    animation-delay: 0.2s;
}

.animation-delay-300 {
    animation-delay: 0.3s;
}

.animation-delay-400 {
    animation-delay: 0.4s;
}

.animation-delay-500 {
    animation-delay: 0.5s;
}

/* ==========================================================================
   Header
   ========================================================================== */

#main-header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-gradient {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 50%, #eff6ff 100%);
}

/* ==========================================================================
   Card Hover Effects
   ========================================================================== */

.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   Button Effects
   ========================================================================== */

.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

/* ==========================================================================
   Form Styles
   ========================================================================== */

.form-input {
    transition: all 0.2s ease;
}

.form-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input::placeholder {
    color: #94a3b8;
}

/* Floating Label */
.form-floating {
    position: relative;
}

.form-floating label {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    transition: all 0.2s ease;
    background: white;
    padding: 0 0.25rem;
}

.form-floating input:focus ~ label,
.form-floating input:not(:placeholder-shown) ~ label,
.form-floating textarea:focus ~ label,
.form-floating textarea:not(:placeholder-shown) ~ label {
    top: 0;
    font-size: 0.75rem;
    color: #3b82f6;
}

/* ==========================================================================
   Accordion (FAQ)
   ========================================================================== */

.accordion-item {
    border-bottom: 1px solid #e2e8f0;
}

.accordion-button {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0;
    text-align: left;
    font-weight: 600;
    color: #1e3a5f;
    cursor: pointer;
    transition: color 0.2s;
}

.accordion-button:hover {
    color: #3b82f6;
}

.accordion-button svg {
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.accordion-button.active svg {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-content.open {
    max-height: 500px;
}

.accordion-content-inner {
    padding-bottom: 1.25rem;
    color: #64748b;
    line-height: 1.7;
}

/* ==========================================================================
   Process Timeline
   ========================================================================== */

.process-step {
    position: relative;
}

.process-step::after {
    content: '';
    position: absolute;
    top: 2rem;
    right: -50%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #1e3a5f);
    opacity: 0.2;
}

.process-step:last-child::after {
    display: none;
}

@media (max-width: 1023px) {
    .process-step::after {
        display: none;
    }
}

/* ==========================================================================
   Scroll Top Button
   ========================================================================== */

#scrollTopBtn.visible {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   Custom Scrollbar
   ========================================================================== */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ==========================================================================
   Selection
   ========================================================================== */

::selection {
    background: #3b82f6;
    color: white;
}

/* ==========================================================================
   Page Transitions
   ========================================================================== */

.page-enter {
    opacity: 0;
    transform: translateY(20px);
}

.page-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.4s ease;
}

/* ==========================================================================
   Loading Spinner
   ========================================================================== */

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   Responsive Utilities
   ========================================================================== */

@media (max-width: 640px) {
    .text-responsive {
        font-size: 0.875rem;
    }

    .hide-mobile {
        display: none;
    }
}

@media (min-width: 641px) and (max-width: 1023px) {
    .hide-tablet {
        display: none;
    }
}

@media (min-width: 1024px) {
    .hide-desktop {
        display: none;
    }
}

/* ==========================================================================
   Gradient Text
   ========================================================================== */

.gradient-text {
    background: linear-gradient(135deg, #3b82f6 0%, #1e3a5f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==========================================================================
   Glass Effect
   ========================================================================== */

.glass {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* ==========================================================================
   Shadow Utilities
   ========================================================================== */

.shadow-soft {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.shadow-strong {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.shadow-accent {
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
}

.shadow-primary {
    box-shadow: 0 10px 30px rgba(30, 58, 95, 0.2);
}
