/* CSS Variables for Theming */
:root {
    --bg-color: #f8f9fa;
    --text-color: #333;
    --navbar-bg: linear-gradient(135deg, #1a2a6c, #2c3e50);
    --navbar-text: white;
    --card-bg: white;
    --card-shadow: 0 5px 15px rgba(0,0,0,0.08);
    --hero-bg: linear-gradient(135deg, #1a2a6c, #2c3e50);
    --hero-text: white;
    --category-bg: linear-gradient(135deg, #28a745, #20c997);
    --category-text: white;
    --button-bg: linear-gradient(135deg, #007bff, #0056b3);
    --button-text: white;
    --footer-bg: linear-gradient(135deg, #1a2a6c, #2c3e50);
    --footer-text: white;
    --link-color: #1a2a6c;
    --link-hover: #e94560;
    --border-color: #ddd;
    --input-bg: white;
    --input-border: #ddd;
    --pricing-free: #28a745;
    --pricing-premium: #dc3545;
    --pricing-freemium: #ffc107;
    --pricing-freemium-text: black;
    --transition-speed: 0.3s;
}

[data-theme="dark"] {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --navbar-bg: linear-gradient(135deg, #1a1a2e, #16213e);
    --navbar-text: white;
    --card-bg: #1e1e1e;
    --card-shadow: 0 5px 15px rgba(0,0,0,0.3);
    --hero-bg: linear-gradient(135deg, #1a1a2e, #16213e);
    --hero-text: white;
    --category-bg: linear-gradient(135deg, #0f3460, #16213e);
    --category-text: white;
    --button-bg: linear-gradient(135deg, #0f3460, #16213e);
    --button-text: white;
    --footer-bg: linear-gradient(135deg, #0f0f0f, #1a1a1a);
    --footer-text: #e0e0e0;
    --link-color: #bb86fc;
    --link-hover: #03dac6;
    --border-color: #333;
    --input-bg: #2a2a2a;
    --input-border: #444;
    --pricing-free: #0f9d58;
    --pricing-premium: #cf6679;
    --pricing-freemium: #f4b400;
    --pricing-freemium-text: black;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar Styles */
nav {
    background: var(--navbar-bg);
    color: var(--navbar-text);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background var(--transition-speed) ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background-color: #e94560;
    border-radius: 8px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-links a {
    margin-left: 20px;
    color: var(--navbar-text);
    font-weight: 500;
    transition: color var(--transition-speed) ease;
    position: relative;
}

.nav-links a:hover {
    color: #e94560;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #e94560;
    transition: width var(--transition-speed) ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 3px 0;
    transition: var(--transition-speed);
}

/* Hero Section */
.hero {
    background: var(--hero-bg);
    color: var(--hero-text);
    padding: 60px 0;
    text-align: center;
    transition: background var(--transition-speed) ease;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
    opacity: 0.9;
}

/* Categories */
.categories {
    padding: 40px 0;
    background-color: var(--bg-color);
    transition: background-color var(--transition-speed) ease;
}

.categories h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--link-color);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    max-width: 1000px;
    margin: 0 auto;
}

.categories a {
    padding: 15px 20px;
    background: var(--category-bg);
    color: var(--category-text);
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition-speed) ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-align: center;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.categories a i {
    font-size: 16px;
}

.categories a:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.categories a::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;
}

.categories a:hover::before {
    left: 100%;
}

/* Category specific colors */
.category-link[data-category="Productivity"] { background: linear-gradient(135deg, #007bff, #0056b3); }
.category-link[data-category="Marketing"] { background: linear-gradient(135deg, #fd7e14, #e55a00); }
.category-link[data-category="Design"] { background: linear-gradient(135deg, #6f42c1, #5a32a3); }
.category-link[data-category="AI Art"] { background: linear-gradient(135deg, #e94560, #c13651); }
.category-link[data-category="Web Development"] { background: linear-gradient(135deg, #20c997, #1ea080); }
.category-link[data-category="Writing"] { background: linear-gradient(135deg, #17a2b8, #138496); }
.category-link[data-category="Education"] { background: linear-gradient(135deg, #28a745, #20c997); }
.category-link[data-category="Data Analysis"] { background: linear-gradient(135deg, #6c757d, #495057); }
.category-link[data-category="Automation"] { background: linear-gradient(135deg, #6610f2, #520dc2); }
.category-link[data-category="Cybersecurity"] { background: linear-gradient(135deg, #dc3545, #c82333); }

/* View All Categories special styling */
.category-link.view-all {
    background: linear-gradient(135deg, #1a2a6c, #2c3e50) !important;
    border: 2px solid #e94560;
    font-weight: 600;
}

.category-link.view-all:hover {
    background: linear-gradient(135deg, #e94560, #c13651) !important;
    border-color: #1a2a6c;
}

/* Search & Filters */
.search-section {
    padding: 40px 0;
    background-color: var(--card-bg);
    transition: background-color var(--transition-speed) ease;
}

.search-container {
    max-width: 800px;
    margin: 0 auto;
}

form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-bottom: 10px;
}

form input, form select, form button {
    padding: 12px 15px;
    font-size: 15px;
    border-radius: 8px;
    border: 1px solid var(--input-border);
    background-color: var(--input-bg);
    color: var(--text-color);
    transition: all var(--transition-speed) ease;
}

form input {
    flex: 1;
    min-width: 250px;
}

form button {
    background: var(--button-bg);
    color: var(--button-text);
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all var(--transition-speed) ease;
}

form button:hover {
    transform: translateY(-2px);
}

/* Tools Grid */
.tools-section {
    padding: 40px 0 60px;
}

.tools-section h2 {
    text-align: center;
    margin-bottom: 40px;
    color: var(--link-color);
    font-size: 2.2rem;
}

.tools-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    justify-content: center;
}

.tool-box {
    width: 280px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    transition: all var(--transition-speed) ease;
    background-color: var(--card-bg);
}

.tool-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.15);
}

.tool-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background-color: var(--bg-color);
    display: block;
    transition: transform var(--transition-speed) ease;
}

.tool-image-fallback {
    width: 100%;
    height: 180px;
    background-color: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    padding: 10px;
}

.tool-box:hover .tool-image {
    transform: scale(1.05);
}

.tool-box a img {
    display: block;
    width: 100%;
    height: 100%;
}

.tool-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.tool-name {
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 1.2rem;
    color: var(--link-color);
}

.tool-description {
    font-size: 14px;
    margin-bottom: 15px;
    color: var(--text-color);
    flex-grow: 1;
}

.tool-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 13px;
}

.tool-tags {
    font-size: 12px;
    color: var(--text-color);
    margin-bottom: 15px;
}

.tool-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tool-actions button, .tool-actions a {
    padding: 10px 15px;
    font-size: 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    color: white;
    font-weight: 500;
    transition: all var(--transition-speed) ease;
}

.tool-actions a {
    background: var(--button-bg);
}

.tool-actions a:hover {
    opacity: 0.9;
}

.tool-actions button {
    background: var(--button-bg);
}

.tool-actions button:hover {
    opacity: 0.9;
}

.pricing-label {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    color: white;
    font-weight: 600;
}

.Free { background-color: var(--pricing-free); }
.Premium { background-color: var(--pricing-premium); }
.Freemium { 
    background-color: var(--pricing-freemium); 
    color: var(--pricing-freemium-text); 
}

/* Pagination */
.pagination {
    text-align: center;
    margin-top: 40px;
}

.pagination a, .pagination span {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 4px;
    border-radius: 4px;
    background-color: var(--card-bg);
    color: var(--link-color);
    border: 1px solid var(--border-color);
    transition: all var(--transition-speed) ease;
}

.pagination a:hover {
    background-color: #e94560;
    color: white;
    border-color: #e94560;
}

/* How It Works Section */
.how-it-works {
    padding: 80px 0;
    background-color: var(--card-bg);
}

.how-it-works h2 {
    text-align: center;
    margin-bottom: 50px;
    color: var(--link-color);
    font-size: 2.5rem;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.step {
    text-align: center;
    padding: 30px;
}

.step-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #e94560, #c13651);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.step-icon i {
    font-size: 2rem;
    color: white;
}

.step h3 {
    color: var(--link-color);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.step p {
    color: var(--text-color);
    line-height: 1.6;
}

/* About Section */
.about {
    padding: 80px 0;
    background: var(--bg-color);
}

.about h2 {
    color: var(--link-color);
    margin-bottom: 30px;
    font-size: 2.5rem;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.feature {
    margin-bottom: 25px;
}

.feature h4 {
    color: var(--link-color);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.feature h4 i {
    color: #28a745;
    margin-right: 10px;
}

.feature p {
    color: var(--text-color);
    margin-left: 30px;
}

.stats-card {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
}

.stats-card h3 {
    color: var(--link-color);
    margin-bottom: 20px;
}

.stats-card p {
    color: var(--text-color);
    margin-bottom: 30px;
}

.stats-numbers {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #e94560;
}

.stat-label {
    color: var(--text-color);
    font-size: 0.9rem;
}

.submit-tool-btn {
    display: inline-block;
    padding: 15px 30px;
    background: linear-gradient(135deg, #e94560, #c13651);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.submit-tool-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(233, 69, 96, 0.4);
}

/* Achievements Section */
.achievements {
    padding: 60px 0;
    background-color: var(--bg-color);
}

.achievements h2 {
    text-align: center;
    color: var(--link-color);
    margin-bottom: 40px;
}

.achievements-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.achievement-box {
    flex: 1 1 220px;
    max-width: 250px;
    background: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.achievement-box h3 {
    font-size: 2rem;
    color: #e94560;
}

.achievement-box p {
    color: var(--text-color);
}

/* Featured Tools Section */
.featured-tools {
    padding: 80px 0;
    background: linear-gradient(135deg, #1a2a6c, #2c3e50);
    color: white;
}

.featured-tools h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.5rem;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.featured-card {
    background: rgba(255,255,255,0.1);
    padding: 30px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.featured-card h4 {
    color: #e94560;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.featured-card h4 i {
    margin-right: 8px;
}

.featured-card h3 {
    margin-bottom: 10px;
}

.featured-card p {
    opacity: 0.9;
    margin-bottom: 15px;
}

.featured-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rating {
    font-weight: bold;
}

/* FAQ Section */
.faq {
    padding: 80px 0;
    background-color: var(--card-bg);
}

.faq h2 {
    text-align: center;
    color: var(--link-color);
    margin-bottom: 50px;
    font-size: 2.5rem;
}

.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}

.faq-item h4 {
    cursor: pointer;
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.faq-item h4 i {
    float: right;
    color: #e94560;
}

.faq-answer {
    padding: 20px;
    display: none;
    color: var(--text-color);
    line-height: 1.6;
}

/* Footer */
.footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-column h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-column p {
    margin-bottom: 15px;
    opacity: 0.8;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 10px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.1);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: #e94560;
    transform: translateY(-3px);
}

.newsletter-form {
    display: flex;
    margin-top: 15px;
}

.newsletter-form input {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 6px 0 0 6px;
    background-color: var(--input-bg);
    color: var(--text-color);
}

.newsletter-form button {
    padding: 12px 15px;
    background-color: #e94560;
    color: white;
    border: none;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.newsletter-form button:hover {
    background-color: #d63447;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 14px;
    opacity: 0.8;
}

.footer-bottom a {
    color: var(--footer-text);
    text-decoration: underline;
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--button-bg);
    color: var(--button-text);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: all var(--transition-speed) ease;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--navbar-bg);
        width: 100%;
        text-align: center;
        transition: var(--transition-speed);
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 20px 0;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links li {
        margin: 15px 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .tool-box {
        width: 100%;
        max-width: 350px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .faq-item h4 {
        font-size: 1rem;
        padding: 15px;
    }
    
    .faq-answer {
        padding: 15px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}