/* GPT OSS Website - Common Styles */

/* Font loading optimization - Google Fonts will be loaded via HTML link */

/* Font Awesome optimization - Use swap for icon fonts */
@font-face {
    font-family: 'Font Awesome 6 Free';
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/webfonts/fa-solid-900.woff2') format('woff2');
}

@font-face {
    font-family: 'Font Awesome 6 Free';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/webfonts/fa-regular-400.woff2') format('woff2');
}

/* System font stack fallback */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

/* CSS Variables for consistent theming */
:root {
    --primary-color: #3B82F6;
    --secondary-color: #8B5CF6;
    --gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --text-light: #9CA3AF;
    --bg-primary: #FFFFFF;
    --bg-secondary: #F9FAFB;
    --bg-accent: #F3F4F6;
    --border-color: #E5E7EB;
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --error-color: #EF4444;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Base animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px); 
    }
    50% { 
        transform: translateY(-10px); 
    }
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1); 
    }
    50% { 
        transform: scale(1.05); 
    }
}

@keyframes shimmer {
    0% { 
        background-position: 200% 0; 
    }
    100% { 
        background-position: -200% 0; 
    }
}

/* Animation classes */
.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-pulse-slow {
    animation: pulse 2s ease-in-out infinite;
}

.animate-pulse-gentle {
    animation: pulse 2s infinite;
}

/* Gradient text */
.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 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);
}

/* Loading animation */
.loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Code block styles */
.code-block {
    background-color: #1E1E1E;
    color: #D4D4D4;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    max-height: 400px;
    overflow-y: auto;
}

.code-block::-webkit-scrollbar {
    width: 8px;
}

.code-block::-webkit-scrollbar-track {
    background: #2D2D2D;
    border-radius: 4px;
}

.code-block::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

.code-block::-webkit-scrollbar-thumb:hover {
    background: #777;
}

.code-header {
    background-color: #2D2D2D;
    border-radius: 8px 8px 0 0;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #3D3D3D;
}

.code-header h3 {
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.copy-btn {
    background: none;
    border: none;
    color: #A0A0A0;
    cursor: pointer;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    color: #FFFFFF;
    background-color: #3D3D3D;
}

.copy-btn.copied {
    color: #4ADE80;
}

/* Window controls */
.window-controls {
    display: flex;
    gap: 6px;
}

.window-control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.window-control.close {
    background-color: #FF5F57;
}

.window-control.minimize {
    background-color: #FFBD2E;
}

.window-control.maximize {
    background-color: #28CA42;
}

/* Syntax highlighting colors */
.keyword { color: #569CD6; }
.string { color: #CE9178; }
.number { color: #B5CEA8; }
.comment { color: #6A9955; }
.function { color: #DCDCAA; }
.variable { color: #9CDCFE; }
.operator { color: #D4D4D4; }
.bracket { color: #D4D4D4; }

/* Mobile optimization */
@media (max-width: 768px) {
    .hero-text {
        font-size: 2.5rem !important;
    }
    
    .section-padding {
        padding: 3rem 0 !important;
    }
    
    .mobile-text-center {
        text-align: center !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #374151;
        --bg-secondary: #1f2937;
        --text-primary: #f9fafb;
        --text-secondary: #d1d5db;
    }
    
    .bg-gray-50 {
        background-color: var(--bg-secondary);
    }
    
    .text-gray-900 {
        color: var(--text-primary);
    }
    
    .text-gray-600 {
        color: var(--text-secondary);
    }
    
    .bg-white {
        background-color: var(--bg-primary);
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print-break-before {
        page-break-before: always;
    }
}