body {
    font-family: sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background: #f4f4f4;
    color: #333;
}

header {
    background: #333;
    color: #fff;
    padding: 1rem 0;
    position: relative;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    margin: 0;
}

.search-container {
    position: relative;
    flex-grow: 1;
    margin: 0 2rem 0 8rem;
}

nav {
    display: flex;
    align-items: center;
}

nav a {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    margin: 0 0.5rem;
    border-radius: 5px;
    transition: background 0.2s;
    box-sizing: border-box;
}

header nav a:hover {
    background: #555;
}

header nav a.buy-me-coffee {
    background: #FF813F !important;
    background-image: linear-gradient(135deg, #FF813F 0%, #FF6B35 100%) !important;
    color: #fff !important;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 0.5rem;
    transition: all 0.2s ease;
    border: none;
}

header nav a.buy-me-coffee:hover {
    background: #FF6B35 !important;
    background-image: linear-gradient(135deg, #FF6B35 0%, #FF5130 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 107, 53, 0.3);
}

header nav a.buy-me-coffee i {
    font-size: 1.1rem;
}

#search-bar {
    width: 100%;
    padding: 1rem 2.5rem;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 1rem;
    box-sizing: border-box;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
}

.clear-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #888;
}

main {
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

#tool-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.tool-category {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    padding: 1.5rem;
    border-radius: 8px;
}

#tool-list h2 {
    grid-column: 1 / -1;
    border-bottom: 2px solid #333;
    padding-bottom: 0.5rem;
}

.two-column h2 {
    grid-column: auto;
}

#tool-list ul {
    list-style: none;
    padding: 0;
}

#tool-list li:not(.separator) {
    padding: 0;
}

#tool-list li a {
    text-decoration: none;
    color: #333;
    background: transparent;
    display: block;
    transition: color 0.2s ease;
    padding: 0.4rem 0;
}

#tool-list li:hover a {
    text-decoration: none;
}

.tool-link-title {
    transition: color 0.2s ease;
}

#tool-list li:hover .tool-link-title {
    color: #007bff;
    text-decoration: underline;
}

.tool-description-sm {
    font-size: 0.9rem;
    color: #6c757d;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out, margin 0.3s ease-out;
}

#tool-list li:not(.separator):hover .tool-description-sm {
    max-height: 5em; /* Provide enough space for the description to appear */
    opacity: 1;
    margin: 0.2rem 0 0;
}

.separator {
    height: 1px;
    background-color: #e9ecef;
    margin: 0.8rem 0;
}

footer {
    text-align: center;
    padding: 1rem 0;
    background: #333;
    color: #fff;
    position: relative;
    bottom: 0;
    width: 100%;
}

/* Tool Page Specific Styles */
.tool-container {
    background: #fff;
    padding: 2rem;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    max-width: 800px;
    margin: 2rem auto;
}

.tool-container h2 {
    border-bottom: 2px solid #333;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.tool-container ul {
    list-style: none;
    padding-left: 0;
}

.tool-container ul li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.faq-section {
    margin-top: 2rem;
    border-top: 1px solid #e9ecef;
    padding-top: 1.5rem;
}

.faq-section h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.inline-link {
    color: #0056b3;
    text-decoration: underline;
}

.inline-link:hover {
    color: #007bff;
}

footer a {
    color: #fff;
    text-decoration: underline;
}

footer a:hover {
    color: #eee;
}

/* Category Tab Navigation */
.category-nav {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 0 1rem;
}

.category-nav > ul {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    max-width: 800px;
}

.category-tab {
    position: relative;
}

.category-tab > a {
    display: block;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: #333;
    font-weight: bold;
    border-bottom: 3px solid transparent;
    transition: color 0.2s, border-bottom-color 0.2s;
    text-align: center;
}

.category-tab:hover > a,
.category-tab.active > a {
    color: #007bff;
    border-bottom-color: #007bff;
}

.tool-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0 0 5px 5px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
    min-width: 300px;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transform: translate(-50%, -10px);
    transition: all 0.2s ease-in-out;
}

.category-tab:hover .tool-dropdown {
    visibility: visible;
    opacity: 1;
    transform: translate(-50%, 0);
}

.tool-dropdown li a {
    display: block;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s;
}

.tool-dropdown li a:hover {
    background-color: #f1f3f5;
}

.tool-dropdown li {
    border-bottom: 1px solid #e9ecef;
}

.tool-dropdown li:last-child {
    border-bottom: none;
}

.tool-dropdown .tool-name,
.tool-dropdown .tool-description {
    display: block;
    white-space: normal;
}

.tool-dropdown .tool-name {
    font-weight: bold;
}

.tool-dropdown .tool-description {
    font-size: 0.85rem;
    color: #6c757d;
}

.main-content-area {
    flex-grow: 1;
}

textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-bottom: 1rem;
    box-sizing: border-box;
}

.tool-actions {
    margin-bottom: 1rem;
}

.tool-actions button {
    padding: 0.8rem 1.2rem;
    border: none;
    background: #333;
    color: #fff;
    border-radius: 5px;
    cursor: pointer;
    margin-right: 0.5rem;
    transition: background 0.2s;
}

.tool-actions button:hover {
    background: #555;
}

/* Diff Tool Specific Styles */
.diff-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.diff-container textarea {
    width: 50%;
}

#output {
    border: 1px solid #ccc;
    padding: 0.5rem;
    border-radius: 5px;
    min-height: 100px;
    white-space: pre-wrap;
    background: #fff;
}

.diff-added {
    background-color: #d4edda;
    color: #155724;
    text-decoration: none;
}

.diff-removed {
    background-color: #f8d7da;
    color: #721c24;
    text-decoration: line-through;
}

/* Contact Form Styles */
#contact-form input,
#contact-form textarea {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    border-radius: 5px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

#contact-form button {
    width: 100%;
    padding: 0.8rem 1.2rem;
    border: none;
    background: #333;
    color: #fff;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s;
}

#contact-form button:hover {
    background: #555;
}

#search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 5px 5px;
    z-index: 10;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

#search-results a {
    display: block;
    padding: 0.8rem 1rem;
    color: #333;
    text-decoration: none;
}

#search-results a:hover,
#search-results a.active {
    background: #f4f4f4;
}

.search-no-results {
    padding: 0.4rem;
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

.search-no-results-text {
    padding: 0.8rem 1rem 0.4rem;
}

.search-no-results-link {
    display: inline-block;
    margin: 0;
    padding: 2rem 1.2rem;
    color: #007bff;
    text-decoration: underline;
}

.search-no-results-link:hover {
    text-decoration: none;
}

.tool-name {
    font-weight: bold;
}

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

/* Homepage & All Tools Page Layouts */
.homepage-main,
.all-tools-main {
    display: flex;
    justify-content: space-between;
    padding: 2rem;
    gap: 2rem;
}

.all-tools-main > #tool-list {
    flex-grow: 1;
}

.homepage-main {
    min-height: calc(100vh - 150px); /* Adjust based on footer/header height */
}

.central-content {
    flex-grow: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 2rem;
}

.central-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.central-content p {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin-bottom: 2rem;
}

.selling-points {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 1rem 0 2.5rem 0;
    flex-wrap: wrap;
}

.selling-point {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    transition: all 0.3s ease;
}

.selling-point i {
    font-size: 1.2rem;
    color: #007bff;
}

.selling-point:hover {
    background: #fff;
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.15);
}

.button {
    display: inline-block;
    padding: 12px 24px;
    font-size: 1.1rem;
    font-weight: bold;
    color: #fff;
    background-color: #007bff;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.button:hover {
    background-color: #0056b3;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .search-container {
        margin: 0;
        width: 100%;
        order: 2;
    }

    header h1 {
        order: 1;
    }

    nav {
        order: 3;
        width: 100%;
        justify-content: flex-start;
    }

    #tool-list,
    .two-column {
        grid-template-columns: 1fr;
    }

    .homepage-main,
    .all-tools-main {
        flex-direction: column;
        align-items: center;
        min-height: auto;
    }

    .central-content,
    .all-tools-main #tool-list {
        order: 1;
        padding: 0;
    }

    .right-ad {
        order: 3;
    }

    .selling-points {
        gap: 1rem;
        margin: 1.5rem 0;
    }

    .selling-point {
        font-size: 0.9rem;
        padding: 0.6rem 1.2rem;
    }

    .selling-point i {
        font-size: 1rem;
    }
}

/* Popular Tools Section on Homepage */
.popular-tools-section {
    margin-top: 3rem;
    text-align: center;
    width: 100%;
}

.popular-tools-section h3 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: #333;
}

.tool-card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    justify-content: center;
}

.tool-card {
    background-color: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: left;
    text-decoration: none;
    color: #333;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0,0,0,0.15);
    margin-bottom: 0;
}

.tool-card h4 {
    font-size: 1.2rem;
    color: #0056b3;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.tool-card p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
    margin-bottom: 0;
}

.tool-card-user-count {
    font-size: 0.9rem;
    font-style: italic;
    color: #666;
    margin-top: auto;
    padding-top: 1rem;
    text-align: left;
}

/* FAQ Section on Homepage */
.faq-section-homepage {
    margin-top: 4rem;
    width: 100%;
    max-width: 900px;
    text-align: left;
}

.faq-section-homepage > h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #333;
    text-align: center;
}

.faq-category {
    margin-bottom: 2.5rem;
}

.faq-category > h4 {
    font-size: 1.4rem;
    color: #007bff;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

.faq-item {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.faq-question {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    padding: 1.2rem 1.5rem;
    cursor: pointer;
    position: relative;
    padding-right: 3rem;
}

.faq-question::after {
    content: '+';
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: #007bff;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question::after {
    transform: translateY(-50%) rotate(45deg);
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    color: #666;
    line-height: 1.7;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 1.5rem 1.5rem 1.5rem;
}

.faq-answer a {
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
}

.faq-answer a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .faq-section-homepage {
        margin-top: 3rem;
    }

    .faq-section-homepage > h3 {
        font-size: 1.6rem;
        margin-bottom: 1.5rem;
    }

    .faq-category > h4 {
        font-size: 1.2rem;
    }

    .faq-question {
        font-size: 1rem;
        padding: 1rem 1.2rem;
        padding-right: 2.5rem;
    }

    .faq-answer {
        padding: 0 1.2rem;
        font-size: 0.95rem;
    }

    .faq-item.active .faq-answer {
        padding: 0 1.2rem 1.2rem 1.2rem;
    }
} 