:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --secondary: #2d3436;
    --accent: #00b4d8;
    --light: #f8f9fa;
    --gray: #dfe6e9;
    --dark: #212529;
    --success: #2ecc71;
    --danger: #e74c3c;
    --danger-hover: #c0392b;
    --card-shadow: 0 10px 30px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e7f1 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-icon {
    width: 70px;
    height: 40px;
    background: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    font-weight: bold;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--secondary);
}

.logo-text span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: var(--secondary);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 5px 0;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    padding: 80px 0 5px;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--secondary);
    line-height: 1.2;
}

.hero h1 span {
    color: var(--primary);
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
    color: #555;
}

.search-container {
    max-width: 600px;
    margin: 0 auto 40px;
    position: relative;
}

.search-box {
    width: 100%;
    padding: 15px 20px;
    border-radius: 50px;
    border: 2px solid var(--gray);
    font-size: 16px;
    transition: var(--transition);
    padding-left: 50px;
}

.search-box:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #777;
}

/* Tools Grid */
.section-title {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 2.2rem;
    color: var(--secondary);
    margin-bottom: 10px;
}

.section-title p {
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.tool-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.tool-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.tool-icon {
    height: 120px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.tool-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.tool-content h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--secondary);
}

.tool-content p {
    color: #555;
    margin-bottom: 20px;
    flex-grow: 1;
}

.tool-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tool-tag {
    background: var(--gray);
    color: var(--secondary);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.tool-btn {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    text-align: center;
    transition: var(--transition);
    margin-top: auto;
}

.tool-btn:hover {
    background: var(--primary-dark);
}

/* Ad Containers */
.ad-container {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin: 40px 0;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.ad-label {
    display: inline-block;
    background: var(--gray);
    color: #666;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-bottom: 15px;
}

.ad-placeholder {
    height: 90px;
    background: linear-gradient(45deg, #f0f4ff, #e6f7ff);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-weight: 600;
    font-size: 1.2rem;
}

/* Footer */
footer {
    background: var(--secondary);
    color: white;
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--primary);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #ddd;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #aaa;
    font-size: 0.9rem;
}

/* Card */
.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    padding: 25px;
    margin-bottom: 25px;
    transition: transform 0.3s ease;
}
.card:hover {
    transform: translateY(-3px);
}
.card h2 {
    color: var(--dark);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .nav-links {
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero {
        padding: 50px 0 30px;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
}