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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

.logo img {
    width: 164px;
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: scale(1.05);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #333;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-menu li {
    list-style: none;
    position: relative;
}

.dropdown {
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.dropdown:hover {
    background-color: #f0f9ff;
}

.dropdown span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.dropdown i {
    transition: transform 0.3s ease;
}

.dropdown.active i {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 0.5rem 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    padding: 0;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: #333;
    transition: background-color 0.3s ease;
}

.dropdown-menu a:hover {
    background-color: #f0f9ff;
}

.language-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.language-selector select {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 0.25rem 0.5rem;
    background: white;
    cursor: pointer;
}

.os-detection {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: slideInDown 0.6s ease-out;
}

.first {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin: 4rem 2rem;
    text-align: center;
}

.first span {
    font-size: 2.5rem;
    font-weight: 300;
    animation: fadeInUp 0.8s ease-out;
}

.first span b {
    color: #00b6d1;
    font-weight: 700;
}

section span img {
    width: 82px;
    margin: 0 1rem;
    animation: bounce 2s infinite;
}

.first p {
    font-size: 1.2rem;
    max-width: 600px;
    color: #666;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.btn {
    background: #00b6d1;
    padding: 1rem 1.5rem;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    margin: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.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;
}

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

.btn:hover {
    background: #0099b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 182, 209, 0.3);
}

.btn.main-cta {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-size: 1.1rem;
    padding: 1.2rem 2rem;
    animation: pulse 2s infinite;
}

.btn.secondary {
    background: transparent;
    border: 2px solid #00b6d1;
    color: #00b6d1;
}

.btn.secondary:hover {
    background: #00b6d1;
    color: white;
}

.btn a {
    text-decoration: none;
    color: inherit;
}

.blue {
    background-color: #007bff !important;
}

.blue:hover {
    background-color: #0056b3 !important;
}

.second { 
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.download {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.download img {
    width: 64px;
    height: 64px;
}

.download-info span:first-child {
    font-size: 1.5rem;
    font-weight: 600;
    display: block;
}

.download-stats {
    margin-left: auto;
    text-align: right;
}

.download-count {
    font-weight: 600;
    color: #28a745;
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-container {
    position: relative;
    flex: 1;
    max-width: 300px;
}

.search-container i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.search-container input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.search-container input:focus {
    outline: none;
    border-color: #00b6d1;
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
}

.toggle-btn {
    padding: 0.5rem;
    border: 2px solid #e9ecef;
    background: white;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-btn.active {
    background: #00b6d1;
    color: white;
    border-color: #00b6d1;
}

.item {
    padding: 1.5rem;
    background: #fff;
    border-radius: 12px;
    border: 2px solid #f1f3f4;
    font-size: 1rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.item:hover {
    border-color: #00b6d1;
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 182, 209, 0.15);
}

.item.recommended {
    border-color: #ffc107;
    background: linear-gradient(135deg, #fff3cd 0%, #fff 100%);
}

.item.featured {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: 3px solid #00b6d1;
    transform: scale(1.02);
    animation: featuredPulse 2s infinite;
}

.item.featured .item-lang {
    color: #fff;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.item.featured .btn.main-download {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    padding: 1.2rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    border: 2px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
}

.item.featured .btn.main-download:hover {
    background: linear-gradient(135deg, #218838 0%, #1e7e34 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
}

.item.featured .file-info {
    color: rgba(255,255,255,0.8);
    border-top-color: rgba(255,255,255,0.2);
}

.item-header {
    margin-bottom: 1rem;
}

.flag {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

.item-lang {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.recommended-badge {
    background: #ffc107;
    color: #212529;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.download-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.file-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #666;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.list .item {
    display: flex;
    align-items: center;
    text-align: left;
    padding: 1rem;
}

.list .item-header {
    flex: 1;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.list .download-buttons {
    flex-direction: row;
    margin-bottom: 0;
}

.list .file-info {
    flex-direction: column;
    margin-left: 1rem;
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.small {
    font-size: 0.9rem;
    color: #666;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 1rem;
}

.close:hover {
    color: #333;
}

.progress-container {
    margin: 1.5rem 0;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

.progress-text {
    font-weight: 600;
    color: #333;
}

/* Theme System */
[data-theme="dark"] {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

[data-theme="dark"] nav {
    background: #2d2d2d;
    color: #e0e0e0;
}

[data-theme="dark"] .item {
    background: #2d2d2d;
    border-color: #404040;
    color: #e0e0e0;
}

[data-theme="dark"] .btn {
    background: #0099b3;
}

[data-theme="dark"] .download {
    background: #2d2d2d;
}

[data-theme="dark"] .search-container input {
    background: #2d2d2d;
    border-color: #404040;
    color: #e0e0e0;
}

[data-theme="dark"] .modal-content {
    background: #2d2d2d;
    color: #e0e0e0;
}

.theme-toggle {
    background: none;
    border: 2px solid #e9ecef;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 1rem;
}

.theme-toggle:hover {
    border-color: #00b6d1;
    background: #f0f9ff;
}

[data-theme="dark"] .theme-toggle {
    border-color: #404040;
    color: #e0e0e0;
}

[data-theme="dark"] .theme-toggle:hover {
    border-color: #00b6d1;
    background: #1a1a1a;
}

/* Notification System */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3000;
    max-width: 350px;
}

.notification {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    border-left: 4px solid #00b6d1;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification-success {
    border-left-color: #28a745;
}

.notification-error {
    border-left-color: #dc3545;
}

.notification-warning {
    border-left-color: #ffc107;
}

.notification-info {
    border-left-color: #17a2b8;
}

.notification-close {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0.25rem;
    margin-left: auto;
}

.notification-close:hover {
    color: #333;
}

/* Keyboard Shortcuts Help */
.shortcuts-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.shortcut-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

kbd {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-family: monospace;
    font-size: 0.875rem;
    min-width: 80px;
    text-align: center;
}

[data-theme="dark"] kbd {
    background: #404040;
    border-color: #555;
    color: #e0e0e0;
}

/* Enhanced Download Items */
.popular-badge {
    background: linear-gradient(45deg, #ff6b6b, #ffa500);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: 0.5rem;
}

.download-info {
    font-size: 0.75rem;
    color: #666;
    margin-left: 0.5rem;
}

.popularity-bar {
    width: 100%;
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.popularity-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* Search Results Highlighting */
mark {
    background: #fff3cd;
    color: #856404;
    padding: 0.1rem 0.2rem;
    border-radius: 3px;
}

[data-theme="dark"] mark {
    background: #856404;
    color: #fff3cd;
}

.search-result {
    animation: searchHighlight 0.5s ease-out;
}

/* Enhanced Animations */
@keyframes searchHighlight {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 182, 209, 0.7);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 0 10px rgba(0, 182, 209, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 182, 209, 0);
    }
}

@keyframes counter-update {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
        color: #28a745;
    }
    100% {
        transform: scale(1);
    }
}

.fade-in-view {
    animation: fadeInUp 0.6s ease-out;
}

/* Performance Indicators */
.performance-indicator {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    z-index: 1000;
    display: none;
}

.performance-indicator.show {
    display: block;
    animation: fadeInUp 0.3s ease-out;
}

/* Mobile Enhancements */
@media (max-width: 768px) {
    .notification-container {
        left: 10px;
        right: 10px;
        max-width: none;
    }
    
    .notification {
        font-size: 0.9rem;
        padding: 0.75rem;
    }
    
    .theme-toggle {
        width: 35px;
        height: 35px;
        margin-left: 0.5rem;
    }
    
    .shortcuts-list {
        gap: 0.75rem;
    }
    
    .shortcut-item {
        flex-direction: column;
        gap: 0.25rem;
        text-align: center;
    }
    
    kbd {
        min-width: 60px;
        font-size: 0.75rem;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid currentColor;
    }
    
    .item {
        border-width: 3px;
    }
    
    .notification {
        border-width: 3px;
    }
}

/* Print Styles */
@media print {
    .notification-container,
    .theme-toggle,
    .mobile-menu-toggle,
    .modal {
        display: none !important;
    }
    
    .item {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

@keyframes featuredPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(0, 182, 209, 0.7);
    }
    50% {
        box-shadow: 0 0 0 20px rgba(0, 182, 209, 0);
    }
}

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

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

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