/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

header h1 {
    background: linear-gradient(45deg, #3498db, #2ecc71);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.8rem;
    font-weight: 700;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

nav ul li a {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background: linear-gradient(45deg, #3498db, #2ecc71);
    transition: all 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%;
    left: 0;
}

nav ul li a:hover {
    color: #3498db;
    transform: translateY(-2px);
}

.search-bar {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 25px;
    padding: 0.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.search-bar input {
    border: none;
    outline: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    width: 250px;
    font-size: 0.9rem;
}

.search-bar button {
    background: linear-gradient(45deg, #3498db, #2ecc71);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 0.5rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.search-bar button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

/* Ad banners */
.ad-banner-top, .ad-banner-footer, .ad-banner-inline {
    text-align: center;
    padding: 15px;
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    border-radius: 10px;
    margin: 20px 0;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.ad-banner-inline {
    margin: 30px 0;
}

/* Hero section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1.5" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.1;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn-primary {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    border: 2px solid transparent;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
}

.btn-secondary {
    background: linear-gradient(45deg, #2ecc71, #27ae60);
    color: white;
    border: 2px solid transparent;
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(46, 204, 113, 0.4);
}

/* Featured tools and categories */
.featured-tools, .categories {
    padding: 5rem 0;
}

.featured-tools h3, .categories h3 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    position: relative;
}

.featured-tools h3::after, .categories h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(45deg, #3498db, #2ecc71);
    border-radius: 2px;
}

.tools-grid, .categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.tool-card, .category-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.tool-card::before, .category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(45deg, #3498db, #2ecc71);
}

.tool-card:hover, .category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.tool-card h4, .category-card h4 {
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 1.3rem;
    font-weight: 600;
}

.tool-card p, .category-card p {
    color: #7f8c8d;
    margin-bottom: 1.5rem;
}

.category-card {
    text-decoration: none;
    color: inherit;
}

/* Tool page styles */
.tool-page {
    padding: 3rem 0;
    background: white;
    margin: 2rem 0;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.tool-page h1 {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 2.5rem;
    background: linear-gradient(45deg, #3498db, #2ecc71);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tool-page > .container > p {
    text-align: center;
    font-size: 1.2rem;
    color: #7f8c8d;
    margin-bottom: 3rem;
}

.tool-ui {
    max-width: 800px;
    margin: 0 auto 3rem;
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid #e9ecef;
}

.upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    padding: 3rem 2rem;
    text-align: center;
    background: white;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 2rem;
}

.upload-area:hover {
    border-color: #3498db;
    background: #f8f9ff;
}

.upload-area p {
    margin-bottom: 1rem;
    color: #6c757d;
    font-size: 1.1rem;
}

.results {
    margin: 3rem 0;
}

.result-item {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 1rem;
    border: 1px solid #e9ecef;
}

.use-another-tool {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
    margin: 3rem 0;
    text-align: center;
}

.use-another-tool h3 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.other-tools {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.faq {
    margin-top: 3rem;
}

.faq h3 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.faq-item {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 1rem;
    border: 1px solid #e9ecef;
}

.faq-item h4 {
    color: #3498db;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 3rem 0 2rem;
    text-align: center;
    margin-top: 4rem;
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

footer p {
    opacity: 0.8;
}

footer ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

footer ul li a {
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    opacity: 0.8;
}

footer ul li a:hover {
    opacity: 1;
    transform: translateY(-2px);
}

/* Responsive design */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    nav ul {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .search-bar input {
        width: 200px;
    }

    .hero h2 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .tools-grid, .categories-grid {
        grid-template-columns: 1fr;
    }

    .tool-page h1 {
        font-size: 2rem;
    }

    .tool-ui {
        padding: 1.5rem;
    }

    .upload-area {
        padding: 2rem 1rem;
    }

    .other-tools {
        flex-direction: column;
        align-items: center;
    }

    footer .container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    footer ul {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 3rem 0;
    }

    .hero h2 {
        font-size: 1.8rem;
    }

    .search-bar input {
        width: 150px;
    }

    .btn-primary, .btn-secondary {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
}

/* Progress indicator */
.progress {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 1000;
    text-align: center;
}

/* Highlight for drag and drop */
.highlight {
    border-color: #3498db !important;
    background: #f8f9ff !important;
}
