/* Base Styles & Variables */
:root {
    --primary-color: #2ecc71;
    --primary-dark: #27ae60;
    --text-color: #2c3e50;
    --light-gray: #ecf0f1;
    --medium-gray: #bdc3c7;
    --white: #ffffff;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --transition: all 0.3s ease;
    --bg-color: #f9f9f9;
    --card-bg: #ffffff;
    --footer-bg: #2c3e50;
    --header-bg: var(--primary-color);
    --filter-bg: var(--white);
}

/* Dark Theme Variables */
[data-theme="dark"] {
    --text-color: #f0f0f0;
    --light-gray: #444;
    --medium-gray: #666;
    --bg-color: #1a1a1a;
    --card-bg: #2d2d2d;
    --footer-bg: #1a1a1a;
    --header-bg: #1a3e1a;
    --filter-bg: #333;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.main-header {
    background-color: var(--primary-color);
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-bottom: 2rem;
}

.main-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.tagline {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Page Intro */
.page-intro {
    text-align: center;
    margin-bottom: 2.5rem;
}

.page-intro h2 {
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

.page-intro p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

/* Filters */
.filters-container {
    background: var(--filter-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
    transition: var(--transition);
}

.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

.filter-group {
    margin-bottom: 0;
}

.filter-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.filter-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background-color: var(--white);
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(46, 204, 113, 0.2);
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    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: var(--transition);
}

.theme-toggle:hover {
    transform: scale(1.1);
}

.theme-toggle i {
    font-size: 1.5rem;
}

/* Website Cards */
.websites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.website-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

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

.card-header {
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid var(--light-gray);
    display: flex;
    align-items: center;
}

.site-logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 1rem;
    overflow: hidden;
    background-color: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.site-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.site-logo .logo-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: bold;
    background-color: var(--light-gray);
}

.site-info {
    flex: 1;
}

.site-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
    color: var(--text-color);
}

.rating {
    display: flex;
    align-items: center;
    color: #f39c12;
    font-size: 0.9rem;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.rating i {
    margin-right: 0.2rem;
    font-size: 0.8em;
}

.rating-value {
    margin-left: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.review-count {
    color: var(--medium-gray);
    font-size: 0.9em;
    font-weight: normal;
}

.card-body {
    padding: 1.25rem 1.5rem;
    flex: 1;
}

.detail-row {
    display: flex;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.detail-label {
    font-weight: 500;
    color: #7f8c8d;
    min-width: 110px;
}

.detail-value {
    flex: 1;
    color: var(--text-color);
}

.verdict {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--light-gray);
    font-style: italic;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.card-footer {
    padding: 0 1.5rem 1.5rem;
}

.btn-join {
    display: block;
    width: 100%;
    padding: 0.75rem;
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-join:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

/* Trustpilot Link */
.trustpilot-link {
    color: #00b67a;
    margin-left: 5px;
    text-decoration: none;
    transition: opacity 0.2s;
}

.trustpilot-link:hover {
    opacity: 0.8;
}

/* Footer */
.main-footer {
    background-color: var(--footer-bg);
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 3rem;
}

.main-footer p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .filters {
        grid-template-columns: 1fr;
    }
    
    .websites-grid {
        grid-template-columns: 1fr;
    }
    
    .main-header h1 {
        font-size: 2rem;
    }
    
    .tagline {
        font-size: 1rem;
    }
}

/* Loading State */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--medium-gray);
}

/* No Results */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 0;
    color: var(--medium-gray);
}
