[x-cloak] {
    display: none !important;
}

html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background-color: rgba(13, 148, 136, 0.3);
    color: white;
}

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

::-webkit-scrollbar-track {
    background: #0f172a;
}

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

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

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
    -webkit-text-fill-color: #f8fafc;
    -webkit-box-shadow: 0 0 0px 1000px #1e293b inset;
    transition: background-color 5000s ease-in-out 0s;
}

@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient-shift 8s ease infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        opacity: 0.4;
    }
    50% {
        opacity: 0.7;
    }
}

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

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

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

.prose h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.prose h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.prose p {
    margin-bottom: 1rem;
    line-height: 1.75;
}

.prose ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    list-style-type: disc;
}

.prose li {
    margin-bottom: 0.5rem;
}

.prose a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.prose a:hover {
    text-decoration: none;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background-color: #0d9488;
    color: white;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: background-color 150ms ease;
}

.btn-primary:hover {
    background-color: #14b8a6;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background-color: #334155;
    color: white;
    font-weight: 500;
    border-radius: 0.5rem;
    border: 1px solid #475569;
    transition: background-color 150ms ease;
}

.btn-secondary:hover {
    background-color: #475569;
}

.card {
    background-color: rgba(30, 41, 59, 0.2);
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 0.5rem;
    padding: 1.5rem;
}

.card-hover {
    transition: all 150ms ease;
}

.card-hover:hover {
    background-color: rgba(30, 41, 59, 0.4);
    border-color: #475569;
}

.input {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: rgba(15, 23, 42, 0.5);
    border: 1px solid #334155;
    border-radius: 0.5rem;
    color: white;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.input::placeholder {
    color: #64748b;
}

.input:focus {
    outline: none;
    border-color: #0d9488;
    box-shadow: 0 0 0 1px #0d9488;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 0.375rem;
}

.badge-teal {
    background-color: rgba(13, 148, 136, 0.2);
    color: #2dd4bf;
    border: 1px solid rgba(13, 148, 136, 0.3);
}

.badge-slate {
    background-color: #334155;
    color: #cbd5e1;
}

.glass {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.text-gradient {
    background: linear-gradient(135deg, #2dd4bf 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.border-gradient {
    position: relative;
}

.border-gradient::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 1px;
    background: linear-gradient(135deg, #0d9488, #06b6d4);
    border-radius: inherit;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask-composite: xor;
    pointer-events: none;
}

.focus-ring {
    transition: box-shadow 150ms ease;
}

.focus-ring:focus {
    outline: none;
    box-shadow: 0 0 0 2px #0f172a, 0 0 0 4px #0d9488;
}

.truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

[x-collapse] {
    overflow: hidden;
}

[x-collapse].transitioning {
    transition: height 200ms ease-out;
}

/* Line clamp utilities */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Mobile-specific fixes */
@media (max-width: 640px) {
    /* Ensure buttons don't overflow */
    .btn-primary,
    .btn-secondary {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
        white-space: nowrap;
    }

    /* Ensure cards don't overflow */
    .card {
        padding: 1rem;
    }

    /* Prevent horizontal scroll from any source */
    section,
    main,
    .max-w-4xl {
        overflow-x: hidden;
    }

    /* Ensure all containers respect viewport */
    * {
        max-width: 100%;
    }

    /* Fix font-mono elements that can overflow */
    .font-mono {
        word-break: break-all;
    }
}
