@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&family=Roboto:wght@300;400;500;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ff7d00;
    --primary-light: #ff9a33;
    --primary-dark: #e66d00;
    --dark-bg: #121212;
    --darker-bg: #0a0a0a;
    --light-text: #f5f5f5;
    --gray-text: #a0a0a0;
    --card-bg: #1e1e1e;
    --success-color: #4caf50;
    --danger-color: #f44336;
    --warning-color: #ff9800;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(to bottom, #151515, #0a0a0a);
    color: var(--light-text);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

.plain-link {
    color: var(--primary-light);
    text-decoration: none;
    transition: color 0.3s;
    /* Added for long URLs */
    word-break: break-all;
    /* Adjust max-width if needed based on label width */
    /* max-width: calc(100% - 100px);  */
}

.plain-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

ul {
    list-style: none;
}

/* Navigation Bar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: linear-gradient(to right, var(--darker-bg), #131313);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.logo a {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(255, 125, 0, 0.3);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links li a {
    color: var(--light-text);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links li a:hover {
    color: var(--primary-color);
}

/* Dropdown Menu */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--card-bg);
    min-width: 180px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    z-index: 1;
    border-radius: 4px;
    overflow: hidden;
}

.dropdown-content a {
    color: var(--light-text);
    padding: 12px 16px;
    display: block;
    transition: background 0.3s;
}

.dropdown-content a:hover {
    background-color: var(--darker-bg);
    color: var(--primary-color);
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown .fa-caret-down {
    margin-left: 5px;
}

/* Search Bar */
.search-bar {
    display: flex;
    align-items: center;
}

.search-bar input {
    padding: 8px 12px;
    border: none;
    border-radius: 20px 0 0 20px;
    background-color: #2a2a2a;
    color: var(--light-text);
    width: 200px;
}

.search-bar button {
    padding: 8px 12px;
    border: none;
    border-radius: 0 20px 20px 0;
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
    transition: background 0.3s;
}

.search-bar button:hover {
    background-color: var(--primary-dark);
}

/* Stats Section */
.stats-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap; /* Added for responsiveness */
    background: linear-gradient(to right, #1a1a1a, #222);
    margin: 2rem 5%;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    gap: 1rem; /* Added gap for wrapped items */
}

.stats-card {
    text-align: center;
    padding: 0 1rem;
    flex: 1; /* Allow cards to grow */
    min-width: 150px; /* Ensure cards don't get too small */
}

.stats-card h3 {
    font-size: 1rem;
    color: var(--gray-text);
    margin-bottom: 0.5rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.online {
    color: var(--success-color);
}

.offline {
    color: var(--danger-color);
}

/* Hide noscript content when JS is enabled */
.stat-number noscript {
    display: none;
}

/* Ad Banner */
.ad-banner {
    margin: 0 5% 2rem; /* Added bottom margin */
    text-align: center;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: transform 0.3s;
}

.ad-banner:hover {
    transform: translateY(-2px);
}

.ad-banner img {
    width: 50%;
    height: auto;
    max-height: 109px;
    object-fit: cover;
    display: block; /* Prevents bottom space */
    margin-left: auto;
    margin-right: auto;
}

/* Category Filters */
.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 1.5rem 0;
}

.filter-btn {
    background-color: #2a2a2a;
    color: var(--light-text);
    border: none;
    border-radius: 20px;
    padding: 8px 15px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn:hover {
    background-color: #3a3a3a;
}

.filter-btn.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 0 10px rgba(255, 125, 0, 0.3);
}

/* Main Content */
.main-container {
    margin: 2rem 5%;
}

.main-container h1 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 2rem;
    font-weight: 600;
    border-bottom: 2px solid var(--primary-dark);
    padding-bottom: 0.5rem;
    text-shadow: 0 0 15px rgba(255, 125, 0, 0.2);
}

/* Websites List */
.websites-list {
    display: grid;
    /* Changed: Set to 2 equal-width columns */
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem; /* Reduced gap slightly */
}

.website-card {
    background: linear-gradient(to bottom, #222, #1a1a1a);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    /* Added: Ensure cards stretch vertically if content differs */
    display: flex;
    flex-direction: column;
}

.website-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

.website-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.2);
}

.website-logo-link {
    display: block;
    cursor: pointer;
}

.website-logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1a1a1a;
    transition: transform 0.3s;
    flex-shrink: 0; /* Prevent logo from shrinking */
}

.website-logo:hover {
    transform: scale(1.1);
}

.website-logo img {
    max-width: 80%;
    max-height: 80%;
}

.website-title {
    flex: 1;
    min-width: 0; /* Allow title to shrink if needed */
}

.website-title h2 {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
    /* Prevent long titles from breaking layout */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.website-title h2 a {
    color: var(--light-text);
    transition: color 0.3s;
}

.website-title h2 a:hover {
    color: var(--primary-color);
}

.status {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status.online {
    background-color: rgba(76, 175, 80, 0.2);
    color: var(--success-color);
}

.status.offline {
    background-color: rgba(244, 67, 54, 0.2);
    color: var(--danger-color);
}

.website-details {
    padding: 1rem;
    /* Added: Ensure details section pushes footer down */
    flex-grow: 1;
}

.detail {
    display: flex;
    /* Changed: Align items start */
    align-items: flex-start;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    /* Added: Allow wrapping if needed */
    flex-wrap: wrap;
    gap: 0.5rem; /* Gap between label and value */
}

.label {
    color: var(--gray-text);
    /* Added: Flex alignment for icon */
    display: flex;
    align-items: center;
    /* Adjust width as needed */
    min-width: 80px;
    flex-shrink: 0; /* Prevent label from shrinking */
}

/* Added: Icon styling */
.label i {
    margin-right: 0.5rem;
    color: var(--primary-color);
    width: 16px; /* Fixed width for alignment */
    text-align: center;
}

.website-uptime {
    padding: 0 1rem 1rem;
    margin-top: auto; /* Push uptime bar to bottom */
}

.uptime-bar {
    height: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.uptime-fill {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 4px;
    transition: background-color 0.3s; /* Smooth transition */
}

.offline-site .uptime-fill {
    background-color: var(--danger-color);
}

.offline-site {
    opacity: 0.8;
}

/* Style for copy button (if you add it later) */
.copy-link-btn {
    background-color: var(--primary-color);
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    transition: background 0.3s;
    margin-left: 0.5rem;
    font-size: 0.8rem;
}

.copy-link-btn:hover {
    background-color: var(--primary-dark);
}

.copy-link-btn.copied {
    background-color: var(--success-color);
}

/* No Results Message */
.no-results {
    text-align: center;
    padding: 3rem 0;
    color: var(--gray-text);
    /* Ensure it spans both columns if grid is active */
    grid-column: 1 / -1;
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

/* Load More Button */
.load-more {
    text-align: center;
    margin: 2rem 0;
    /* Ensure it spans both columns */
    grid-column: 1 / -1;
}

#load-more-btn {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
}

#load-more-btn:hover {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 0 15px rgba(255, 125, 0, 0.4);
}

/* Info Section */
.info-section {
    margin: 3rem 0;
    background: linear-gradient(to right, #1c1c1c, #252525);
    border-radius: 8px;
    padding: 3rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.info-content {
    max-width: 700px;
    margin: 0 auto;
}

.info-section h3 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.info-section p {
    color: var(--light-text);
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* Footer */
.footer {
    background: linear-gradient(to bottom, #131313, #090909);
    color: var(--light-text);
    padding: 2rem 5%;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section {
    padding: 0 1rem;
}

.footer-section h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.footer-section p {
    color: var(--gray-text);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--gray-text);
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: none;
    border-radius: 4px;
    background-color: #2a2a2a;
    color: var(--light-text);
}

.contact-form textarea {
    height: 100px;
    resize: none;
}

.contact-form button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.contact-form button:hover {
    background-color: var(--primary-dark);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #2a2a2a;
    color: var(--light-text);
    transition: all 0.3s;
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid #2a2a2a;
    color: var(--gray-text);
    font-size: 0.9rem;
}

/* Animation for counting */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.counting {
    animation: countUp 0.5s ease-out forwards;
}

/* Responsive Design */
@media screen and (max-width: 992px) {
     /* Adjust grid to 1 column on medium screens and below */
    .websites-list {
        grid-template-columns: 1fr;
    }
    /* Ensure messages span full width when 1 column */
    .no-results, .load-more {
        grid-column: 1 / -1;
    }
}


@media screen and (max-width: 768px) {
    .navbar {
        flex-direction: column;
        padding: 1rem 2%;
    }

    .logo {
        margin-bottom: 1rem;
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
        margin-bottom: 1rem;
        align-items: center; /* Center items */
    }

    .nav-links li {
        width: 100%;
        max-width: 200px; /* Limit width */
        text-align: center;
        padding: 0.5rem 0;
    }

    .dropdown-content {
        width: 100%;
        position: static;
        box-shadow: none;
        background-color: #2a2a2a; /* Match filter buttons */
    }
     .dropdown:hover .dropdown-content {
        display: none; /* Prevent hover opening on mobile */
    }
    .dropdown.active .dropdown-content { /* Add class via JS if needed for tap */
        display: block;
    }

    .search-bar {
        width: 100%;
        justify-content: center; /* Center search bar */
    }

    .search-bar input {
        width: calc(100% - 100px); /* Adjust width */
        max-width: 300px;
    }
    .search-bar button {
         width: 50px;
    }

    .stats-container {
        flex-direction: column;
        gap: 1.5rem; /* Increase gap */
        margin: 1.5rem 2%;
        padding: 1rem;
    }
    .stats-card {
        min-width: unset; /* Remove min-width */
    }

    /* Websites list is already 1 column from previous breakpoint */

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .info-section {
        padding: 2rem 1rem;
        margin: 2rem 0;
    }

    .info-section h3 {
        font-size: 1.5rem;
    }

    .info-section p {
        font-size: 1rem;
    }

     .main-container {
        margin: 1.5rem 2%;
    }

    .category-filters {
        justify-content: center;
    }
}

/* Stats Section */
.stats-section {
    background: linear-gradient(to right, #1a1a1a, #222);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.stats-section h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 6px;
    padding: 1.25rem;
    text-align: center;
    border-left: 3px solid var(--primary-color);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--gray-text);
    font-size: 0.9rem;
}

.stat-note {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--gray-text);
    font-style: italic;
}

/* FAQ Section */
.faq-section {
    margin: 3rem 0;
}

.faq-section h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.faq-container {
    border-radius: 8px;
    overflow: hidden;
}

.faq-item {
    margin-bottom: 0.5rem;
    background: var(--card-bg);
    border-radius: 6px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 1rem 1.5rem;
    text-align: left;
    background: linear-gradient(to right, #222, #1c1c1c);
    border: none;
    color: var(--light-text);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
}

.faq-question:hover {
    background: linear-gradient(to right, #252525, #1f1f1f);
}

.faq-question i {
    transition: transform 0.3s;
}

.faq-answer {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    background: var(--darker-bg);
    transition: max-height 0.3s ease-out, padding 0.3s ease;
}

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

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer p,
.faq-answer ol,
.faq-answer ul {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.faq-answer ol,
.faq-answer ul {
    padding-left: 1.5rem;
}

.faq-answer li {
    margin-bottom: 0.5rem;
}

.faq-answer strong {
    color: var(--primary-color);
}

/* Security Tip */
.security-tip {
    background: rgba(255, 152, 0, 0.1);
    border-left: 3px solid var(--warning-color);
    padding: 0.75rem 1rem;
    margin-top: 1rem;
    border-radius: 0 4px 4px 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.security-tip i {
    color: var(--warning-color);
    font-size: 1.1rem;
}

/* Features Section Enhancements */
.feature-row:last-child {
    margin-bottom: 0;
}

/* Related Sites Enhancements */
.related-sites-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.related-site-card {
    background: linear-gradient(to bottom, #222, #1a1a1a);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s;
    text-align: center;
    padding: 1.5rem;
}

.related-site-card:hover {
    transform: translateY(-5px);
}

.related-site-card img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: var(--darker-bg);
    padding: 0.5rem;
}

.related-site-card h3 {
    font-size: 1.1rem;
    color: var(--light-text);
}

/* Responsive Adjustments */
@media screen and (max-width: 992px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .related-sites-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .related-sites-grid {
        grid-template-columns: 1fr;
    }

    .faq-question {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }

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