
/*
Theme Name: DND
Author: Your Name
Version: 1.0
Description: DND Name Generator Theme
*/

/* style.css */
/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #0f172a;
    color: #e2e8f0;
    line-height: 1.6;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header & Navigation */
header {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    padding: 1rem 0;
    border-bottom: 2px solid #334155;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #60a5fa;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo span {
    color: #c084fc;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.nav-links a {
    color: #cbd5e1;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    background-color: #334155;
    color: #60a5fa;
}

/* Main Content */
.container {
    padding: 2rem 0;
    flex: 1;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #60a5fa;
    text-align: center;
}

.page-subtitle {
    text-align: center;
    color: #94a3b8;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Generator Box */
.generator-box {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 2px solid #334155;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.generator-header {
    text-align: center;
    margin-bottom: 2rem;
}

.generator-header h2 {
    color: #c084fc;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.generator-header p {
    color: #94a3b8;
}

.controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

select, button {
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    border: 1px solid #475569;
    background-color: #1e293b;
    color: #e2e8f0;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

select {
    min-width: 200px;
}

button {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    border: none;
    font-weight: bold;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4);
}

.copy-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    margin-top: 1rem;
}

.result-box {
    background-color: #0f172a;
    border: 2px solid #334155;
    border-radius: 8px;
    padding: 1.5rem;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.generated-name {
    font-size: 2rem;
    color: #60a5fa;
    text-align: center;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.name-meaning {
    color: #94a3b8;
    font-style: italic;
    text-align: center;
    margin-bottom: 1rem;
}

/* Generator Cards */
.generators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 3rem 0;
}

.generator-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.generator-card:hover {
    transform: translateY(-5px);
    border-color: #60a5fa;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.card-title {
    color: #60a5fa;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.card-desc {
    color: #94a3b8;
    font-size: 0.9rem;
}

/* SEO Content */
.seo-content {
    background-color: #1e293b;
    padding: 2rem;
    border-radius: 10px;
    margin-top: 3rem;
    border-left: 4px solid #60a5fa;
}

.seo-content h2 {
    color: #c084fc;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.seo-content h3 {
    color: #60a5fa;
    margin: 1.5rem 0 1rem 0;
}

.seo-content p {
    margin-bottom: 1rem;
    color: #cbd5e1;
}

.seo-content ul {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.seo-content li {
    margin-bottom: 0.5rem;
    color: #cbd5e1;
}

/* Back Link */
.back-link {
    display: inline-block;
    margin-top: 2rem;
    color: #60a5fa;
    text-decoration: none;
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    border: 1px solid #334155;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.back-link:hover {
    background-color: #1e293b;
    border-color: #60a5fa;
}

/* Footer */
footer {
    margin-top: auto;
    padding: 2rem 0;
    border-top: 2px solid #334155;
    text-align: center;
    color: #94a3b8;
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.footer-links a {
    color: #60a5fa;
    text-decoration: none;
}

/* Copy Notification */
.copy-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #10b981;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 6px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: none;
}

/* Breadcrumb */
.breadcrumb {
    margin-bottom: 2rem;
    color: #94a3b8;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: #60a5fa;
    text-decoration: none;
}

.breadcrumb span {
    margin: 0 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        justify-content: center;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    select, button {
        width: 100%;
        max-width: 300px;
    }
    
    .generators-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .generated-name {
        font-size: 1.5rem;
    }
}

/* Ad Spaces */
.ad-space {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem auto;
    overflow: hidden;
}

.ad-leaderboard {
    width: 728px;
    height: 90px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 2px dashed #475569;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #94a3b8;
    font-size: 0.9rem;
}

.ad-square {
    width: 320px;
    height: 250px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 2px dashed #475569;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #94a3b8;
    font-size: 0.9rem;
}

.ad-label {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 0.7rem;
    color: #64748b;
    background: rgba(15, 23, 42, 0.8);
    padding: 2px 6px;
    border-radius: 3px;
}

/* For mobile responsiveness */
@media (max-width: 768px) {
    .ad-leaderboard {
        width: 100%;
        max-width: 728px;
        height: 90px;
    }
    
    .ad-square {
        width: 100%;
        max-width: 320px;
        height: 250px;
    }
}
/* style.css - Add Back to Top Button */

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: none;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    z-index: 1000;
    transition: all 0.3s ease;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
}

.back-to-top:active {
    transform: translateY(-1px);
}

/* Mobile responsiveness for back-to-top */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
}
// script.js - Add Back to Top functionality

// Back to Top functionality
function initBackToTop() {
    // Create button
    const backToTopBtn = document.createElement('button');
    backToTopBtn.className = 'back-to-top';
    backToTopBtn.innerHTML = '↑';
    backToTopBtn.title = 'Back to Top';
    document.body.appendChild(backToTopBtn);
    
    // Show/hide button based on scroll position
    window.addEventListener('scroll', function() {
        if (window.pageYOffset > 300) {
            backToTopBtn.style.display = 'flex';
        } else {
            backToTopBtn.style.display = 'none';
        }
    });
    
    // Scroll to top when clicked
    backToTopBtn.addEventListener('click', function() {
        window.scrollTo({
            top: 0,
            behavior: 'smooth'
        });
    });
}

// Update the DOMContentLoaded event listener to include back to top
document.addEventListener('DOMContentLoaded', () => {
    // Initialize generators grid if on homepage
    initGeneratorsGrid();
    
    // Initialize back to top button
    initBackToTop();
    
    // Initialize copy buttons
    document.querySelectorAll('.copy-btn').forEach(button => {
        button.addEventListener('click', function() {
            const nameElement = this.closest('.result-box').querySelector('.generated-name');
            if (nameElement) {
                copyToClipboard(nameElement.textContent);
            }
        });
    });
    
    // Generate initial name if there's a generate button
    const generateBtn = document.getElementById('generateBtn');
    if (generateBtn) {
        generateBtn.click();
    }
});