@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Outfit:wght@300;400;500;600;700;800&family=Pretendard:wght@400;500;600;700&display=swap');

:root {
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.4);
    --secondary: #a855f7;
    --bg-deep: #0f1117;
    --bg-card: rgba(26, 29, 38, 0.7);
    --border-white: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --font-heading: 'Outfit', 'Pretendard', sans-serif;
    --font-body: 'Inter', 'Pretendard', sans-serif;
}

* {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    background: var(--bg-deep);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Premium Background Animation */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 20% 30%, rgba(168, 85, 247, 0.03) 0%, transparent 40%);
    z-index: -1;
    animation: bgMove 30s linear infinite;
}

@keyframes bgMove {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Glassmorphism Components */
header {
    background: rgba(15, 17, 23, 0.8) !important;
    -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
    backdrop-filter: blur(16px) saturate(180%) !important;
    border-bottom: 1px solid var(--border-white) !important;
}

.glass-card {
    background: var(--bg-card);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-white);
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 48px 0 rgba(0, 0, 0, 0.5), 0 0 20px var(--primary-glow);
    border-color: rgba(99, 102, 241, 0.3);
}

/* Typography Overrides */
h1,
h2,
h3,
.font-extrabold {
    font-family: var(--font-heading);
    letter-spacing: -0.03em;
}

/* Buttons and Links */
button,
.btn-primary {
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

button:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
    background: #2d313d;
    border-radius: 10px;
    border: 2px solid var(--bg-deep);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Tailwind Compatibility Utility Layers */
.bg-indigo-600 {
    background-color: var(--primary) !important;
    box-shadow: 0 4px 14px 0 var(--primary-glow) !important;
}

.text-indigo-400 {
    color: #818cf8 !important;
}

.border-indigo-500\/30 {
    border-color: rgba(99, 102, 241, 0.3) !important;
}

.shadow-indigo-600\/20 {
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.2) !important;
}

/* Chat UI Enhancement */
textarea,
input[type="text"] {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid var(--border-white) !important;
    border-radius: 12px !important;
    color: white !important;
    padding: 12px 16px !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    font-family: var(--font-body) !important;
}

textarea:focus,
input[type="text"]:focus {
    outline: none !important;
    border-color: var(--primary) !important;
    background: rgba(255, 255, 255, 0.06) !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15) !important;
}

.prose {
    color: #cbd5e1 !important;
    font-size: 0.95rem !important;
    line-height: 1.7 !important;
}

.prose strong {
    color: white !important;
    font-weight: 700 !important;
}

/* Nav Buttons Enhancement */
nav button {
    position: relative;
    overflow: hidden;
    padding-bottom: 2px !important;
}

nav button::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

nav button:hover::after {
    width: 100%;
}