/**
 * !Go Extension Website - Custom Styles
 */

/* ===============================================
   BASE STYLES
   =============================================== */

* {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===============================================
   BUTTONS
   =============================================== */

.btn-primary {
    @apply bg-primary-600 text-white hover:bg-primary-700 transition-all duration-300;
}

.btn-secondary {
    @apply bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100 border-2 border-gray-300 dark:border-gray-600 hover:border-primary-500 dark:hover:border-primary-500 transition-all duration-300;
}

/* ===============================================
   NAVIGATION
   =============================================== */

.nav-link {
    position: relative;
}

.nav-link.nav-active,
.nav-link:hover {
    @apply text-primary-600 dark:text-primary-400;
}

.nav-link.nav-active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
}

/* ===============================================
   ANIMATIONS
   =============================================== */

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

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

/* Typing Animation */
@keyframes typing {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-typing {
    animation: typing 0.5s ease-out forwards;
    opacity: 0;
}

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

.animation-delay-2 {
    animation-delay: 1s;
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
}

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

/* Slide Animations */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-slide-in-right {
    animation: slideInRight 0.4s ease-out;
}

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

.animate-slide-up {
    animation: slideUp 0.3s ease-out;
}

/* ===============================================
   BACKGROUNDS
   =============================================== */

.bg-grid-pattern {
    background-image: 
        linear-gradient(to right, rgba(0, 0, 0, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
}

.dark .bg-grid-pattern {
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
}

/* ===============================================
   SCROLLBAR
   =============================================== */

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

::-webkit-scrollbar-track {
    @apply bg-gray-100 dark:bg-gray-800;
}

::-webkit-scrollbar-thumb {
    @apply bg-gray-300 dark:bg-gray-600 rounded-lg;
}

::-webkit-scrollbar-thumb:hover {
    @apply bg-gray-400 dark:bg-gray-500;
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: rgb(209 213 219) rgb(243 244 246);
}

.dark * {
    scrollbar-color: rgb(75 85 99) rgb(31 41 55);
}

/* ===============================================
   CODE BLOCKS
   =============================================== */

code {
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
}

/* ===============================================
   TRANSITIONS
   =============================================== */

.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}

/* ===============================================
   HOVER EFFECTS
   =============================================== */

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ===============================================
   DETAILS/ACCORDION
   =============================================== */

details summary {
    list-style: none;
}

details summary::-webkit-details-marker {
    display: none;
}

details summary::after {
    content: '+';
    float: right;
    font-size: 1.5rem;
    font-weight: bold;
    transition: transform 0.3s ease;
}

details[open] summary::after {
    transform: rotate(45deg);
}

/* ===============================================
   GRADIENT TEXT
   =============================================== */

.gradient-text {
    background: linear-gradient(to right, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ===============================================
   LOADING SPINNER
   =============================================== */

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

.animate-spin {
    animation: spin 1s linear infinite;
}

/* ===============================================
   FOCUS STYLES
   =============================================== */

*:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
}

*:focus-visible {
    @apply ring-2 ring-primary-500 ring-offset-2 dark:ring-offset-gray-900;
}

/* ===============================================
   SELECTION
   =============================================== */

::selection {
    @apply bg-primary-500 text-white;
}

::-moz-selection {
    @apply bg-primary-500 text-white;
}

/* ===============================================
   PRINT STYLES
   =============================================== */

@media print {
    header, footer, nav {
        display: none;
    }
    
    * {
        background: white !important;
        color: black !important;
    }
}

/* ===============================================
   RESPONSIVE UTILITIES
   =============================================== */

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
}

/* ===============================================
   ACCESSIBILITY
   =============================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Skip to content link */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000;
    color: #fff;
    padding: 8px;
    z-index: 100;
}

.skip-to-content:focus {
    top: 0;
}

/* ===============================================
   REDUCED MOTION
   =============================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===============================================
   DARK MODE SPECIFIC
   =============================================== */

.dark {
    color-scheme: dark;
}

/* ===============================================
   CUSTOM UTILITIES
   =============================================== */

.text-balance {
    text-wrap: balance;
}

.glass-effect {
    @apply bg-white/80 dark:bg-gray-900/80 backdrop-blur-lg;
}

/* ===============================================
   TIMELINE (for changelog)
   =============================================== */

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, transparent, currentColor, transparent);
}
