/* Main Styles */

/* Header */
.site-header {
    background: var(--primary-gradient);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 100;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

#menu-toggle {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

#menu-toggle svg {
    width: 2rem;
    height: 2rem;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
}

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

#dark-mode-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: white;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.2s;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

#dark-mode-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Side Drawer */
.side-drawer {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100%;
    background: var(--card-light);
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

body.dark-mode .side-drawer {
    background: var(--card-dark);
}

.side-drawer.open {
    transform: translateX(300px);
}

.drawer-header {
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
}

body.dark-mode .drawer-header {
    border-color: #374151;
}

.drawer-title {
    font-weight: 700;
    font-size: 1.25rem;
}

#close-drawer {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-light);
}

body.dark-mode #close-drawer {
    color: var(--text-dark);
}

#close-drawer svg {
    width: 1.5rem;
    height: 1.5rem;
}

.drawer-nav {
    padding: 1rem;
    overflow-y: auto;
}

.mobile-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu li {
    border-bottom: 1px solid #f3f4f6;
}

body.dark-mode .mobile-menu li {
    border-color: #374151;
}

.mobile-menu li a {
    display: block;
    padding: 1rem 0;
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
}

body.dark-mode .mobile-menu li a {
    color: var(--text-dark);
}

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
}

.drawer-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* Hero Section */
.hero-section {
    padding: 3rem 0;
    text-align: center;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    color: #6b7280;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

body.dark-mode .hero-desc {
    color: #9ca3af;
}

.input-wrapper textarea {
    width: 100%;
    max-width: 800px;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    font-size: 1.25rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s;
    background-color: var(--card-light);
    color: var(--text-light);
}

body.dark-mode .input-wrapper textarea {
    background-color: var(--card-dark);
    border-color: #374151;
    color: var(--text-dark);
}

.input-wrapper textarea:focus {
    outline: none;
    border-color: #8b5cf6;
}

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

.result-card {
    background: var(--card-light);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

body.dark-mode .result-card {
    background: var(--card-dark);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.card-label {
    font-size: 0.875rem;
    color: #9ca3af;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.card-preview {
    font-size: 1.125rem;
    word-break: break-word;
    min-height: 1.5rem;
}

.copy-feedback {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(139, 92, 246, 0.9);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.result-card.copied .copy-feedback {
    opacity: 1;
}

/* Footer */
.site-footer {
    background: white;
    border-top: 1px solid #e5e7eb;
    padding: 2rem 0;
    margin-top: auto;
}

body.dark-mode .site-footer {
    background: #1f2937;
    border-color: #374151;
}

.footer-links {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.footer-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
    padding: 0;
    margin: 0;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-menu li a {
    color: #6b7280;
    text-decoration: none;
}

body.dark-mode .footer-menu li a {
    color: #9ca3af;
}

.copyright {
    text-align: center;
    color: #9ca3af;
    font-size: 0.875rem;
}

/* Content Wrapper & Layout */
.content-wrapper {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
    align-items: flex-start;
}

.site-main {
    flex: 1;
}

#secondary.widget-area {
    width: 300px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .content-wrapper {
        flex-direction: column;
    }

    #secondary.widget-area {
        width: 100%;
    }
}

/* Blog Posts */
.blog-post-card {
    background: var(--card-light);
    border-radius: 0.75rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

body.dark-mode .blog-post-card {
    background: var(--card-dark);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.entry-header {
    margin-bottom: 1rem;
}

.entry-title {
    font-size: 1.75rem;
    margin: 0 0 0.5rem 0;
    font-weight: 700;
}

.entry-title a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s;
}

.entry-title a:hover {
    color: #8b5cf6;
}

body.dark-mode .entry-title a {
    color: var(--text-dark);
}

body.dark-mode .entry-title a:hover {
    color: #a78bfa;
}

.entry-meta {
    font-size: 0.875rem;
    color: #6b7280;
}

body.dark-mode .entry-meta {
    color: #9ca3af;
}

.entry-summary,
.entry-content {
    line-height: 1.6;
}

/* Sidebar & Widgets */
.widget {
    background: var(--card-light);
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

body.dark-mode .widget {
    background: var(--card-dark);
}

.widget-title {
    font-size: 1.25rem;
    margin-top: 0;
    margin-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.5rem;
}

body.dark-mode .widget-title {
    border-color: #374151;
}

.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f6;
}

body.dark-mode .widget ul li {
    border-color: #374151;
}

.widget a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s;
}

.widget a:hover {
    color: #8b5cf6;
}

body.dark-mode .widget a {
    color: var(--text-dark);
}

/* Pagination */
.pagination,
.nav-links {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.pagination .page-numbers,
.nav-links a,
.nav-links span {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    background: var(--card-light);
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.2s;
}

body.dark-mode .pagination .page-numbers,
body.dark-mode .nav-links a,
body.dark-mode .nav-links span {
    background: var(--card-dark);
    color: var(--text-dark);
}

.pagination .current,
.nav-links .current {
    background: #8b5cf6;
    color: white;
}

body.dark-mode .pagination .current {
    background: #7c3aed;
}

/* Comments */
.comments-area {
    margin-top: 3rem;
    background: var(--card-light);
    padding: 2rem;
    border-radius: 0.75rem;
}

body.dark-mode .comments-area {
    background: var(--card-dark);
}

.comment-list {
    list-style: none;
    padding: 0;
}

.comment-body {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1.5rem;
}

/* Buttons */
.button,
input[type="submit"] {
    display: inline-block;
    background: #8b5cf6;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.button:hover,
input[type="submit"]:hover {
    background: #7c3aed;
}

/* Search Form */
.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-field {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    background: var(--bg-light);
    color: var(--text-light);
}

body.dark-mode .search-field {
    background: var(--bg-dark);
    border-color: #374151;
    color: var(--text-dark);
}