/* ============================================
   Professional tModLoader Website Styles
   ============================================ */

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body { 
    font-family: 'Rajdhani', sans-serif; 
    line-height: 1.6; 
    overflow-x: hidden;
    font-weight: 500;
}

.font-display {
    font-family: 'Orbitron', sans-serif;
}

html { 
    scroll-behavior: smooth; 
}

/* ============================================
   Advanced Background & Gradients
   ============================================ */

body {
    background: 
        radial-gradient(ellipse 1200px 600px at 10% 0%, rgba(34, 211, 238, 0.12), transparent 50%),
        radial-gradient(ellipse 1200px 600px at 90% 20%, rgba(168, 85, 247, 0.12), transparent 50%),
        radial-gradient(ellipse 800px 800px at 50% 80%, rgba(16, 185, 129, 0.08), transparent 50%),
        linear-gradient(180deg, #0f172a 0%, #111827 50%, #1e293b 100%);
    background-attachment: fixed;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(34, 211, 238, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(168, 85, 247, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    animation: backgroundShift 20s ease-in-out infinite;
}

@keyframes backgroundShift {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

/* ============================================
   Navigation Styles
   ============================================ */

.nav-link { 
    color: #d1d5db; 
    text-decoration: none; 
    font-weight: 500; 
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); 
    position: relative; 
    padding: 0.5rem 0;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #22d3ee, #a855f7, #22d3ee);
    background-size: 200% 100%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

.nav-link:hover { 
    color: #22d3ee; 
    transform: translateY(-2px);
}

.nav-link:hover::before { 
    width: 100%; 
    animation: gradientShift 2s ease infinite;
}

.nav-link.active { 
    color: #22d3ee; 
}

.nav-link.active::before { 
    width: 100%; 
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.nav-link-mobile { 
    color: #d1d5db; 
    text-decoration: none; 
    padding: 0.75rem 1rem; 
    transition: all 0.3s ease; 
    border-radius: 0.5rem;
    display: block;
}

.nav-link-mobile:hover { 
    color: #22d3ee; 
    background: rgba(34, 211, 238, 0.1);
    transform: translateX(4px);
}

/* ============================================
   Header & Glass Effects
   ============================================ */

header {
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    background: rgba(17, 24, 39, 0.75);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

header.scrolled {
    background: rgba(17, 24, 39, 0.95);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

/* ============================================
   Glass Card Effects
   ============================================ */

.glass-card {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.04) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.glass-card:hover::before {
    left: 100%;
}

.glass-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(34, 211, 238, 0.3);
    box-shadow: 
        0 20px 60px rgba(34, 211, 238, 0.2),
        0 8px 32px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.brand-badge {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.brand-badge:hover {
    transform: scale(1.05);
    border-color: rgba(34, 211, 238, 0.4);
    box-shadow: 0 6px 24px rgba(34, 211, 238, 0.3);
}

/* ============================================
   Button Styles
   ============================================ */

.btn-primary, .btn-secondary {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary::before, .btn-secondary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-primary:hover::before, .btn-secondary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover, .btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* ============================================
   FAQ & Troubleshooting
   ============================================ */

.faq-toggle, .troubleshooting-toggle { 
    background: none; 
    border: none; 
    cursor: pointer; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.faq-toggle:hover, .troubleshooting-toggle:hover { 
    background-color: rgba(75, 85, 99, 0.5);
}

.faq-toggle i, .troubleshooting-toggle i { 
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1); 
}

.faq-toggle.active i, .troubleshooting-toggle.active i { 
    transform: rotate(180deg); 
}

.faq-content, .troubleshooting-content { 
    max-height: 0; 
    overflow: hidden; 
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    padding: 0 24px;
}

.faq-content.show, .troubleshooting-content.show { 
    max-height: 1000px; 
    padding: 24px; 
    opacity: 1;
}

/* ============================================
   Stats Counter
   ============================================ */

.stats-counter { 
    font-size: 2.5rem; 
    font-weight: 700; 
    background: linear-gradient(135deg, #22d3ee 0%, #a855f7 50%, #22d3ee 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
    background-clip: text;
    animation: gradientShift 3s ease infinite;
    text-shadow: 0 0 30px rgba(34, 211, 238, 0.5);
}

/* ============================================
   Animations
   ============================================ */

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.8; 
        transform: scale(1.05);
    }
}

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

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(34, 211, 238, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(34, 211, 238, 0.6);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.8s ease-out;
}

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

.animate-slideInLeft {
    animation: slideInLeft 0.8s ease-out;
}

.animate-slideInRight {
    animation: slideInRight 0.8s ease-out;
}

.animate-scaleIn {
    animation: scaleIn 0.6s ease-out;
}

.animate-pulse { 
    animation: pulse 2s infinite; 
}

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

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

/* ============================================
   Section Styles
   ============================================ */

section {
    position: relative;
    overflow: hidden;
}

section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(168, 85, 247, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

section > * {
    position: relative;
    z-index: 1;
}

/* ============================================
   Card Hover Effects
   ============================================ */

.card-hover {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-12px) scale(1.03);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(34, 211, 238, 0.2);
}

/* ============================================
   Review Cards
   ============================================ */

.review-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.review-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.review-card:hover::after {
    opacity: 1;
}

.review-card:hover {
    transform: translateY(-8px);
    border-color: rgba(34, 211, 238, 0.3);
    box-shadow: 0 20px 40px rgba(34, 211, 238, 0.2);
}

/* ============================================
   Blog Cards
   ============================================ */

.blog-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.blog-card:hover::before {
    opacity: 1;
}

.blog-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
}

.blog-card img,
.blog-card .gradient-bg {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card:hover img,
.blog-card:hover .gradient-bg {
    transform: scale(1.1);
}

/* ============================================
   Scrollbar
   ============================================ */

::-webkit-scrollbar { 
    width: 10px; 
}

::-webkit-scrollbar-track { 
    background: #0f172a; 
    border-radius: 10px;
}

::-webkit-scrollbar-thumb { 
    background: linear-gradient(180deg, #22d3ee, #a855f7);
    border-radius: 10px;
    border: 2px solid #0f172a;
}

::-webkit-scrollbar-thumb:hover { 
    background: linear-gradient(180deg, #06b6d4, #9333ea);
}

/* ============================================
   Focus Styles
   ============================================ */

button:focus, 
a:focus, 
input:focus, 
textarea:focus, 
select:focus { 
    outline: 2px solid #22d3ee; 
    outline-offset: 4px;
    border-radius: 4px;
}

/* ============================================
   Mobile Menu
   ============================================ */

#mobile-menu { 
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); 
    max-height: 0; 
    overflow: hidden;
    opacity: 0;
}

#mobile-menu.show { 
    max-height: 500px; 
    opacity: 1;
}

/* ============================================
   Back to Top Button
   ============================================ */

.back-to-top {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(34, 211, 238, 0.4);
}

.back-to-top:hover {
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 8px 30px rgba(34, 211, 238, 0.6);
}

/* ============================================
   Loading States
   ============================================ */

.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* ============================================
   Gradient Text
   ============================================ */

.gradient-text {
    background: linear-gradient(135deg, #22d3ee 0%, #a855f7 50%, #ec4899 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease infinite;
}

/* ============================================
   Code Block Styling
   ============================================ */

pre {
    background: rgba(0, 0, 0, 0.3);
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
}

code {
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
}

/* ============================================
   Responsive Improvements
   ============================================ */

@media (max-width: 768px) {
    .glass-card:hover {
        transform: translateY(-4px) scale(1.01);
    }
    
    .card-hover:hover {
        transform: translateY(-6px) scale(1.01);
    }
}

/* ============================================
   Particle Effects (Optional)
   ============================================ */

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(34, 211, 238, 0.5);
    border-radius: 50%;
    pointer-events: none;
    animation: particleFloat 10s infinite;
}

@keyframes particleFloat {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(50px);
        opacity: 0;
    }
}

/* ============================================
   Smooth Transitions
   ============================================ */

* {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* ============================================
   Utility Classes
   ============================================ */

.text-shadow {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.text-shadow-lg {
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
}

.shadow-glow {
    box-shadow: 0 0 30px rgba(34, 211, 238, 0.3);
}

.shadow-glow-lg {
    box-shadow: 0 0 60px rgba(34, 211, 238, 0.5);
}

.border-glow {
    border: 1px solid rgba(34, 211, 238, 0.3);
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.2);
}

/* ============================================
   Enhanced Button Styles
   ============================================ */

.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-primary:hover::after {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(34, 211, 238, 0.3);
}

.btn-secondary {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-secondary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-secondary:hover::after {
    width: 300px;
    height: 300px;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(34, 211, 238, 0.5);
}

/* ============================================
   Enhanced Section Transitions
   ============================================ */

section {
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
}

section:nth-child(1) { animation-delay: 0s; }
section:nth-child(2) { animation-delay: 0.1s; }
section:nth-child(3) { animation-delay: 0.2s; }
section:nth-child(4) { animation-delay: 0.3s; }
section:nth-child(5) { animation-delay: 0.4s; }
section:nth-child(6) { animation-delay: 0.5s; }
section:nth-child(7) { animation-delay: 0.6s; }

/* ============================================
   Enhanced Hover Effects
   ============================================ */

a, button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

a:hover, button:hover {
    transform: translateY(-1px);
}

/* ============================================
   Loading Animation
   ============================================ */

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.loading-shimmer {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.1) 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* ============================================
   Enhanced Gradient Backgrounds
   ============================================ */

.gradient-bg {
    position: relative;
    overflow: hidden;
}

.gradient-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

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

/* ============================================
   Tabs System
   ============================================ */

.tab-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #9ca3af;
    cursor: pointer;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.2), transparent);
    transition: left 0.5s ease;
}

.tab-btn:hover::before {
    left: 100%;
}

.tab-btn:hover {
    border-color: rgba(34, 211, 238, 0.3);
    color: #22d3ee;
    box-shadow: 0 4px 20px rgba(34, 211, 238, 0.2);
}

.tab-btn.active {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.2) 0%, rgba(168, 85, 247, 0.2) 100%);
    border-color: rgba(34, 211, 238, 0.5);
    color: #22d3ee;
    box-shadow: 
        0 4px 20px rgba(34, 211, 238, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.tab-btn.active i {
    animation: pulse 2s infinite;
}

.tab-content {
    display: none;
    animation: fadeInUp 0.5s ease-out;
}

.tab-content.active {
    display: block;
}

/* Tab Content Specific Styles */
.tab-content-container {
    min-height: 400px;
}

.tab-content kbd {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 4px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.875rem;
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.tab-content code {
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-size: 0.875em;
}

/* Responsive Tabs */
@media (max-width: 768px) {
    .tab-btn {
        font-size: 0.875rem;
        padding: 0.75rem 1rem;
    }
    
    .tab-btn i {
        display: none;
    }
}

/* Copy Code Button */
.copy-code-btn {
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10;
}

pre:hover .copy-code-btn {
    opacity: 1;
}

.copy-code-btn:hover {
    transform: scale(1.05);
}

.copy-code-btn:active {
    transform: scale(0.95);
}

/* Screen Reader Only */
.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;
}
