* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: #fff;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #ffd700;
}

.menu-toggle {
    display: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 120px 0 80px;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: fadeInUp 0.6s ease;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Converter Box */
.converter-box {
    background: #fff;
    border-radius: 15px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 1s ease;
}

.converter-box h2 {
    color: #333;
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.upload-area {
    border: 2px dashed #ddd;
    border-radius: 10px;
    padding: 3rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #667eea;
    background-color: #f5f3ff;
}

.upload-area i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.upload-area p {
    color: #666;
    margin-bottom: 0.5rem;
}

.upload-area small {
    color: #999;
}

#fileInput {
    display: none;
}

.convert-btn {
    display: block;
    width: 100%;
    padding: 1rem;
    margin-top: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.convert-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.convert-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Features Section */
.features {
    padding: 60px 0;
    background: #fff;
}

.features h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: #333;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.feature-card i {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: #333;
}

.feature-card p {
    color: #666;
    font-size: 0.95rem;
}

/* Stats Section */
.stats {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 60px 0;
    color: #fff;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item {
    padding: 1rem;
}

.stat-item .number {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-item .label {
    opacity: 0.9;
}

/* Footer */
.footer {
    background: #2d3748;
    color: #fff;
    padding: 40px 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: #ffd700;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #ffd700;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #4a5568;
    color: #888;
}

/* News Page */
.news-header {
    padding: 100px 0 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.news-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.news-header p {
    opacity: 0.9;
}

.news-list {
    padding: 40px 0;
}

.news-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-card-content {
    padding: 1.5rem;
}

.news-card-content .category {
    display: inline-block;
    background: #667eea;
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.news-card-content h3 {
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.3rem;
}

.news-card-content p {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.7;
}

.news-card-content .meta {
    display: flex;
    justify-content: space-between;
    color: #999;
    font-size: 0.9rem;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.pagination a {
    display: inline-block;
    padding: 0.75rem 1.25rem;
    margin: 0 0.25rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-decoration: none;
    color: #667eea;
    transition: all 0.3s ease;
}

.pagination a:hover,
.pagination a.active {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

/* News Detail Page */
.news-detail {
    padding: 100px 0 40px;
}

.news-detail-header {
    margin-bottom: 2rem;
}

.news-detail-header .category {
    display: inline-block;
    background: #667eea;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.news-detail-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.news-detail-header .meta {
    display: flex;
    gap: 2rem;
    color: #999;
}

.news-detail-content {
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.news-detail-content img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.news-detail-content p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: #444;
}

.news-detail-content h2,
.news-detail-content h3 {
    margin: 2rem 0 1rem;
    color: #333;
}

/* Images Page */
.images-header {
    padding: 100px 0 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.images-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.images-header p {
    opacity: 0.9;
}

.images-grid {
    padding: 40px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.image-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/3;
}

.image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-card:hover img {
    transform: scale(1.1);
}

.image-card .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: #fff;
    padding: 1.5rem 1rem 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.image-card:hover .overlay {
    transform: translateY(0);
}

.image-card .overlay h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.image-card .overlay p {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Modal for Image Preview */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
}

.modal .close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
}

.modal .prev,
.modal .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    padding: 1rem;
    transition: background 0.3s ease;
}

.modal .prev:hover,
.modal .next:hover {
    background: rgba(255,255,255,0.2);
}

.modal .prev {
    left: 20px;
}

.modal .next {
    right: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        padding: 1rem;
        flex-direction: column;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 0.5rem 0;
    }

    .menu-toggle {
        display: block;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .converter-box {
        padding: 2rem 1rem;
    }

    .footer-content {
        text-align: center;
    }

    .news-detail-header h1 {
        font-size: 1.8rem;
    }

    .news-detail-header .meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .pagination a {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.6rem;
    }

    .upload-area {
        padding: 2rem 1rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-item .number {
        font-size: 2rem;
    }

    .images-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Success Message */
.success-message {
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    display: none;
}

.success-message.active {
    display: block;
}
