/* Custom styles for Lossless Scaling HTML Project */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* Import XG-pixo Font */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&display=swap');

/* CSS Variables for consistent theming */
:root {
    --primary-color: #F18607;
    --primary-dark: #DB880E;
    --secondary-color: #3b82f6;
    --accent-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-bg: #0f172a;
    --dark-surface: #1e293b;
    --dark-surface-light: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #475569;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --gradient-primary: linear-gradient(135deg, #F18607 0%, #DB880E 100%);
    --gradient-secondary: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    --gradient-accent: linear-gradient(135deg, #F18607 0%, #f59e0b 100%);
    --gradient-blue-yellow: linear-gradient(135deg, #3b82f6 0%, #F18607 50%, #DB880E 100%);
}

/* Base styles with improved typography */
* {
    box-sizing: border-box;
}

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

h1 {
    font-family: 'Orbitron', 'XG-pixo', Helvetica, Arial, Lucida, sans-serif !important;
    font-size: 3rem !important;
    font-weight: 800 !important;
    background: var(--gradient-blue-yellow);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem !important;
    line-height: 1.2 !important;
    text-transform: uppercase;
    letter-spacing: 2px;
}

h2 {
    font-family: 'Orbitron', 'XG-pixo', Helvetica, Arial, Lucida, sans-serif !important;
    font-size: 2rem !important;
    font-weight: 700 !important;
    color: var(--primary-color) !important;
    margin-bottom: 1rem !important;
    line-height: 1.3 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
}

h3 {
    font-family: 'Orbitron', 'XG-pixo', Helvetica, Arial, Lucida, sans-serif !important;
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    color: var(--primary-color) !important;
    margin-bottom: 0.75rem !important;
    text-transform: uppercase;
    letter-spacing: 1px;
}

p {
    color: var(--text-secondary) !important;
    margin-bottom: 1rem !important;
    line-height: 1.7 !important;
}

/* Enhanced animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px var(--primary-color);
    }
    50% {
        box-shadow: 0 0 20px var(--primary-color), 0 0 30px var(--primary-color), 0 0 40px var(--primary-dark);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

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

/* Enhanced button styles */
.download-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--gradient-primary);
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-family: 'Orbitron', 'XG-pixo', Helvetica, Arial, Lucida, sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(241, 134, 7, 0.3);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
}

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

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

.download-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(241, 134, 7, 0.4);
    animation: glow 2s infinite;
}

.download-btn:active {
    transform: translateY(-1px) scale(0.98);
}

/* Carousel custom styles */
.carousel-item {
    transition: opacity 0.7s ease-in-out;
}

/* Enhanced card styles */
.news-card, .download-card {
    position: relative;
    background: var(--dark-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.news-card::before, .download-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.news-card:hover::before, .download-card:hover::before {
    transform: scaleX(1);
}

.news-card:hover, .download-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: var(--primary-color);
}

/* Navigation enhancements */
.nav-link {
    position: relative;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 8px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    background: rgba(241, 134, 7, 0.1);
    color: var(--primary-color);
}

/* Enhanced mobile responsiveness */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    h1 {
        font-size: 2.5rem !important;
    }

    h2 {
        font-size: 1.75rem !important;
    }

    .carousel-container {
        height: 200px !important;
    }

    .download-btn {
        padding: 10px 20px;
        font-size: 0.875rem;
    }

    .news-card, .download-card {
        margin-bottom: 1rem;
    }

    .glass-effect {
        backdrop-filter: blur(10px);
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem !important;
    }

    h2 {
        font-size: 1.5rem !important;
    }

    .download-btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
}

/* Tablet optimizations */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }

    h1 {
        font-size: 2.75rem !important;
    }
}

/* Large screen optimizations */
@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }

    h1 {
        font-size: 3.5rem !important;
    }

    h2 {
        font-size: 2.25rem !important;
    }
}

/* Enhanced background and theme */
body {
    background: var(--dark-bg);
    background-image:
        radial-gradient(circle at 20% 80%, rgba(241, 134, 7, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(219, 136, 14, 0.15) 0%, transparent 50%);
    background-attachment: fixed;
    min-height: 100vh;
}

.dark-theme {
    background: var(--dark-bg);
    color: var(--text-primary);
}

/* Glass morphism effect */
.glass-effect {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Gradient text effects */
.gradient-text {
    background: var(--gradient-blue-yellow);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Orbitron', 'XG-pixo', Helvetica, Arial, Lucida, sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.gradient-text-secondary {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Orbitron', 'XG-pixo', Helvetica, Arial, Lucida, sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Badge styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-new {
    background: var(--gradient-primary);
    color: white;
    font-family: 'Orbitron', 'XG-pixo', Helvetica, Arial, Lucida, sans-serif;
    font-weight: 700;
}

.badge-update {
    background: var(--gradient-secondary);
    color: white;
    font-family: 'Orbitron', 'XG-pixo', Helvetica, Arial, Lucida, sans-serif;
    font-weight: 700;
}

.badge-feature {
    background: var(--gradient-accent);
    color: white;
    font-family: 'Orbitron', 'XG-pixo', Helvetica, Arial, Lucida, sans-serif;
    font-weight: 700;
}

.badge-community {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    font-family: 'Orbitron', 'XG-pixo', Helvetica, Arial, Lucida, sans-serif;
    font-weight: 700;
}

.badge-important {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    font-family: 'Orbitron', 'XG-pixo', Helvetica, Arial, Lucida, sans-serif;
    font-weight: 700;
}

/* Loading animation for download buttons */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.download-loading {
    animation: pulse 1s infinite;
}

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

::-webkit-scrollbar-track {
    background: #1f2937;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* Footer styles */
.footer-link {
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #10b981;
}

/* Newsletter form */
.newsletter-input {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.newsletter-input:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Version badge styles */
.version-badge {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Download animation */
.downloading-text {
    font-weight: bold;
    color: #10b981;
}

/* Image lazy loading */
.lazy-image {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lazy-image.loaded {
    opacity: 1;
}

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

/* Focus styles for better accessibility */
button:focus,
a:focus,
input:focus {
    outline: 2px solid #10b981;
    outline-offset: 2px;
}

/* Fixed download button styles */
.fixed-download-btn {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 50;
    animation: float 3s ease-in-out infinite;
}

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

.fixed-download-btn:hover {
    animation: none;
    transform: scale(1.1) translateY(-5px);
}

/* Mobile responsive for fixed button */
@media (max-width: 768px) {
    .fixed-download-btn {
        right: 1rem;
        bottom: 1rem;
        padding: 0.75rem 1rem;
    }

    .fixed-download-btn span {
        display: none;
    }

    .fixed-download-btn svg {
        margin-right: 0;
    }

    /* Mobile responsive for download buttons */
    .download-btn {
        padding: 10px 20px;
        font-size: 0.875rem;
        min-width: 140px;
    }

    .download-btn svg {
        width: 1rem;
        height: 1rem;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }
}
