/* Custom Styles for Personal Blog */

:root {
    --color-primary: #06b6d4;
    --color-secondary: #a855f7;
}

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

/* Navigation Links */
.nav-link {
    @apply text-gray-300 hover:text-white transition-colors duration-200 font-medium;
}

/* Buttons */
.btn-primary {
    @apply px-6 py-3 bg-gradient-to-r from-cyan-500 to-purple-500 text-white font-semibold rounded-lg hover:shadow-xl hover:shadow-cyan-500/50 transition-all duration-300 hover:-translate-y-0.5 inline-block;
}

.btn-secondary {
    @apply px-6 py-3 bg-dark-800 text-gray-300 font-semidordbold rounded-lg border border-gray-700 hover:border-cyan-500 hover:text-white transition-all duration-300 inline-block;
}

/* Animations */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fade-in 1s ease-out;
}

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

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

::-webkit-scrollbar-thumb {
    background: #252525;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #06b6d4;
}

/* Prose Styles for Markdown Content */
.prose {
    @apply text-gray-300;
}

.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
    @apply font-display font-bold text-white mt-8 mb-4;
}

.prose h1 {
    @apply text-5xl;
}

.prose h2 {
    @apply text-4xl;
}

.prose h3 {
    @apply text-3xl;
}

.prose p {
    @apply mb-6 leading-relaxed text-xl;
}

.prose a {
    @apply text-cyan-400 hover:text-cyan-300 underline;
}

.prose code {
    @apply bg-dark-800 text-cyan-400 px-2 py-1 rounded text-base font-mono;
}

.prose pre {
    @apply bg-dark-800 rounded-xl p-6 overflow-x-auto mb-6 border border-gray-700;
}

.prose pre code {
    @apply bg-transparent p-0 text-base;
}

.prose blockquote {
    @apply border-l-4 border-cyan-500 pl-6 italic text-gray-400 my-6;
}

.prose ul, .prose ol {
    @apply mb-6 pl-8;
}

.prose li {
    @apply mb-2 text-xl;
}

.prose img {
    @apply rounded-xl my-8 shadow-2xl;
}

.prose strong {
    @apply text-white font-bold;
}

.prose em {
    @apply italic;
}

.prose hr {
    @apply border-gray-800 my-12;
}

/* Line Clamp Utilities */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.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;
}

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

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(6, 182, 212, 0.3);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(to right, #06b6d4, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Focus Styles */
input:focus, textarea:focus, select:focus {
    outline: none;
    ring: 2px;
    ring-color: #06b6d4;
}

/* Loading Spinner */
.spinner {
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid #06b6d4;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* Mobile Menu Transition */
#mobile-menu {
    transition: max-height 0.3s ease-out;
    overflow: hidden;
}

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

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

/* Reading Progress Bar */
#reading-progress {
    transition: width 0.1s ease;
}

/* Hover Effects for Images */
img {
    transition: transform 0.3s ease;
}

.hover-zoom:hover img {
    transform: scale(1.05);
}

/* Custom Selection Color */
::selection {
    background-color: rgba(6, 182, 212, 0.3);
    color: white;
}

/* Smooth Transitions */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Form Error Styles */
.errorlist {
    @apply text-red-400 text-sm mt-1 list-none;
}

/* Badge Styles */
.badge {
    @apply px-3 py-1 text-sm rounded-full font-medium;
}

.badge-primary {
    @apply bg-cyan-900/30 text-cyan-400 border border-cyan-700/30;
}

.badge-secondary {
    @apply bg-purple-900/30 text-purple-400 border border-purple-700/30;
}

/* Alert Styles */
.alert {
    @apply p-4 rounded-lg border mb-4;
}

.alert-success {
    @apply bg-green-900/20 border-green-700 text-green-300;
}

.alert-error {
    @apply bg-red-900/20 border-red-700 text-red-300;
}

.alert-info {
    @apply bg-blue-900/20 border-blue-700 text-blue-300;
}

/* Pagination */
.pagination {
    @apply flex justify-center gap-2 mt-12;
}

.pagination a, .pagination span {
    @apply px-4 py-2 bg-dark-800 rounded-lg border border-gray-700 hover:border-cyan-500 transition-colors;
}

.pagination .current {
    @apply bg-cyan-900/30 border-cyan-500 text-cyan-400;
}
