/* Cortex MCP - Custom Styles */

/* Base styles */
:root {
    --cortex-50: #f0f9ff;
    --cortex-100: #e0f2fe;
    --cortex-200: #bae6fd;
    --cortex-300: #7dd3fc;
    --cortex-400: #38bdf8;
    --cortex-500: #0ea5e9;
    --cortex-600: #0284c7;
    --cortex-700: #0369a1;
    --cortex-800: #075985;
    --cortex-900: #0c4a6e;
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, var(--cortex-600) 0%, var(--cortex-400) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hero gradient background */
.hero-gradient {
    background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 50%, #f0f9ff 100%);
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s ease;
}

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

/* Pricing card popular highlight */
.pricing-popular {
    position: relative;
    border: 2px solid var(--cortex-500);
}

.pricing-popular::before {
    content: 'Most Popular';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--cortex-600);
    color: white;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* Feature icon animation */
.feature-icon {
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

/* Button styles */
.btn-primary {
    background: linear-gradient(135deg, var(--cortex-600) 0%, var(--cortex-700) 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--cortex-700) 0%, var(--cortex-800) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--cortex-600);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    border: 2px solid var(--cortex-200);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    border-color: var(--cortex-400);
    background: var(--cortex-50);
}

/* Code block styles */
.code-block {
    background: #1e293b;
    border-radius: 8px;
    padding: 16px;
    overflow-x: auto;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.code-block code {
    color: #4ade80;
    font-size: 14px;
    line-height: 1.6;
}

/* Comparison table */
.comparison-table th,
.comparison-table td {
    padding: 12px 16px;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
}

.comparison-table tr:hover {
    background: #f9fafb;
}

/* FAQ accordion */
.faq-item {
    border-bottom: 1px solid #e5e7eb;
}

.faq-question {
    cursor: pointer;
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

/* Stats counter animation */
.stat-number {
    font-variant-numeric: tabular-nums;
}

/* Loading spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--cortex-600);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

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

/* Toast notification */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-success {
    background: #10b981;
    color: white;
}

.toast-error {
    background: #ef4444;
    color: white;
}

/* Mobile navigation */
.mobile-menu {
    display: none;
}

.mobile-menu.active {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }
}

/* Animation utilities */
.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

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

.slide-in-left {
    animation: slideInLeft 0.5s ease forwards;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Pulse animation for CTA */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(2, 132, 199, 0);
    }
}

/* Toggle switch */
.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.toggle-switch.active {
    background: var(--cortex-600);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.toggle-switch.active::after {
    transform: translateX(20px);
}

/* Tooltip */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: #1f2937;
    color: white;
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Badge styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 9999px;
}

.badge-success {
    background: #d1fae5;
    color: #059669;
}

.badge-warning {
    background: #fef3c7;
    color: #d97706;
}

.badge-error {
    background: #fee2e2;
    color: #dc2626;
}

.badge-info {
    background: #dbeafe;
    color: #2563eb;
}

/* Progress bar */
.progress-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--cortex-500), var(--cortex-400));
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Input focus states */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    ring: 2px solid var(--cortex-500);
    border-color: var(--cortex-500);
}

/* Link hover effect */
.link-hover {
    position: relative;
}

.link-hover::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--cortex-600);
    transition: width 0.3s ease;
}

.link-hover:hover::after {
    width: 100%;
}

/* Hamburger menu wrapper */
.menu-wrapper {
    position: relative;
    margin-left: auto;
}

.hamburger {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

@media (max-width: 767px) {
    .hamburger {
        display: flex;
    }
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #0284c7;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Mobile first - 기본 숨김 */
.nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.nav-links.show {
    display: flex;
}

.nav-link {
    padding: 10px 15px;
    color: #374151;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.nav-link:hover {
    background: #f3f4f6;
}

.btn-primary-mobile {
    margin-top: 10px;
    padding: 10px 15px;
    background: linear-gradient(135deg, var(--cortex-600) 0%, var(--cortex-700) 100%);
    color: white;
    text-align: center;
    border-radius: 6px;
    font-weight: 600;
}

/* PC 버전 */
@media (min-width: 768px) {
    .nav-links {
        display: flex !important;
        flex-direction: row;
        position: static;
        padding: 0;
        background: transparent;
        border: none;
        box-shadow: none;
        min-width: auto;
    }

    .hamburger {
        display: none;
    }

    .nav-link {
        padding: 0;
    }

    .btn-primary-mobile {
        display: none;
    }
}
