:root {
    --primary: #4f46e5;
    --primary-light: #6366f1;
    --primary-dark: #4338ca;
    --bg: #0f172a;
    --bg-secondary: #1e293b;
    --text: #f1f5f9;
    --text-secondary: #e2e8f0;
    --card-bg: #1e293b;
    --card-border: #475569;
    --shadow: rgba(0, 0, 0, 0.3);
    --transition: all 0.3s ease;
    --gradient: linear-gradient(135deg, var(--primary), var(--primary-light));
}

.light-theme {
    --bg: #ffffff;
    --bg-secondary: #f1f5f9;
    --text: #0f172a;
    --text-secondary: #475569;
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    --shadow: rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: var(--transition);
    min-height: 100vh;
    padding-bottom: 2rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

header {
    padding: 2rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.logo-text h1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-text p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.theme-switcher {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 50px;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}

.theme-switcher:hover {
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

.theme-icon {
    padding: 0.5rem;
    border-radius: 50%;
    background: var(--gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero {
    text-align: center;
    padding: 3rem 0;
    max-width: 800px;
    margin: 0 auto;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 6px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--text);
    border: 1px solid var(--card-border);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.section {
    margin: 4rem 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 600;
    position: relative;
    padding-bottom: 0.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--gradient);
    border-radius: 3px;
}

.view-all {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.view-all:hover {
    gap: 0.8rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: var(--transition);
    box-shadow: 0 4px 6px var(--shadow);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--shadow);
    border-color: var(--primary);
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.card-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.card-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.card-links {
    display: flex;
    gap: 0.8rem;
}

.card-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: var(--transition);
}

.card-link:hover {
    color: var(--primary-light);
    gap: 0.5rem;
}

.mod-badges {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.mod-badge {
    background: var(--bg-secondary);
    color: var(--text);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    text-decoration: none;
    transition: var(--transition);
}

.mod-badge:hover {
    background: var(--primary);
    color: white;
}

footer {
    margin-top: 6rem;
    padding-top: 2rem;
    border-top: 1px solid var(--card-border);
}

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

.footer-col h3 {
    font-size: 1.2rem;
    margin-bottom: 1.2rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--gradient);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a:hover {
    color: var(--primary);
    gap: 0.7rem;
}

.copyright {
    text-align: center;
    margin-top: 3rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--card-border);
}

/* Content page styles */
.content {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    border: 1px solid var(--card-border);
}

.content h2 {
    margin: 1.5rem 0 1rem;
    color: var(--primary-light);
}

.content h2:first-child {
    margin-top: 0;
}

.content p, .content ul {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.content ul {
    padding-left: 1.5rem;
}

.content a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

.content a:hover {
    color: var(--primary-light);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    color: var(--primary);
}

.no-data {
    background: rgba(99, 102, 241, 0.1);
    border-left: 4px solid var(--primary);
    padding: 1rem;
    margin: 1.5rem 0;
    border-radius: 4px;
}

/* Additional styles for the 404 page */
.giant-404 {
    font-size: 20vw;
    font-weight: 800;
    text-align: center;
    margin: 2rem 0;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    line-height: 1;
    text-shadow: 0 5px 15px rgba(99, 102, 241, 0.2);
    user-select: none;
}

.floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.error-message {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.interactive-element {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem auto;
    max-width: 600px;
    text-align: center;
    box-shadow: 0 4px 6px var(--shadow);
}

.interactive-element p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

#fun-button {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 6px rgba(99, 102, 241, 0.3);
}

#fun-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(99, 102, 241, 0.4);
}

#joke-container {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    display: none;
}

.search-suggestion {
    margin-top: 2rem;
    text-align: center;
    color: var(--text-secondary);
}

/* Responsive styles */
@media (max-width: 768px) {
    .hero h2 {
        font-size: 2rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .content {
        padding: 1.5rem;
    }
    
    .logo-img {
        width: 50px;
        height: 50px;
    }
    
    .logo-text h1 {
        font-size: 1.5rem;
    }
    
    .giant-404 {
        font-size: 25vw;
    }
    
    .error-message {
        font-size: 1rem;
    }
}

/* For content pages */
.content-container {
    max-width: 800px;
}