/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: #4a8bc4;
}

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

/* Code block styling */
.code-block {
    background: linear-gradient(135deg, #0d1117 0%, #161b22 100%);
    border: 1px solid #2a2a2a;
    position: relative;
    overflow: hidden;
}

.code-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid #2a2a2a;
}

.code-block .dots {
    position: absolute;
    top: 12px;
    left: 15px;
    display: flex;
    gap: 6px;
}

.code-block .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.code-block .dot.red {
    background: #ff5f56;
}

.code-block .dot.yellow {
    background: #ffbd2e;
}

.code-block .dot.green {
    background: #27c93f;
}

.code-block pre {
    margin: 50px 15px 15px 15px !important;
    color: #e6edf3;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

/* Syntax highlighting */
.keyword {
    color: #ff79c6;
}

.string {
    color: #f1fa8c;
}

.function {
    color: #50fa7b;
}

.number {
    color: #bd93f9;
}

.comment {
    color: #6272a4;
    font-style: italic;
}

.operator {
    color: #ff79c6;
}

.variable {
    color: #8be9fd;
}

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

.hover-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(55, 118, 171, 0.2);
}

/* Gradient animations */
@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-animate {
    background: linear-gradient(-45deg, #3776ab, #ffd43b, #3776ab, #ffd43b);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
}

/* Pulse animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Loading animation */
.loading-dots {
    display: inline-flex;
    gap: 4px;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffd43b;
    animation: bounce 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

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

/* Copy button */
.copy-btn {
    opacity: 0;
    transition: opacity 0.2s;
}

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

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

/* Tab styles */
.tab-active {
    background: #3776ab;
    color: white;
}

/* Category badges */
.category-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-basic {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.category-intermediate {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.category-advanced {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Progress bar */
.progress-bar {
    height: 4px;
    background: #2a2a2a;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3776ab, #ffd43b);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Tooltip */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: #1a1a1a;
    border: 1px solid #3776ab;
    border-radius: 6px;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.tooltip:hover::after {
    opacity: 1;
}