* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #8a2be2;
    --secondary: #ff6b6b;
    --accent: #4ecdc4;
    --dark: #2d3047;
    --light: #f7f9fc;
    --gray: #e2e8f0;
}

body {
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
    min-height: 100vh;
    color: var(--light);
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    z-index: 2000;
    overflow-y: auto;
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
}

.sidebar-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.sidebar-content {
    padding: 20px 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid #f0f0f0;
}

.sidebar-link:hover {
    background: #f8f9fa;
    color: #667eea;
}

.sidebar-link i {
    margin-right: 12px;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.sidebar-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    z-index: 1001;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    font-size: 1.2rem;
    color: #333;
}

.sidebar-toggle:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
    padding: 20px 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.4rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 25px;
    color: #333;
    line-height: 1.6;
}

.modal-body h4 {
    color: #667eea;
    margin: 20px 0 10px 0;
    font-size: 1.1rem;
}

.modal-body p {
    margin-bottom: 15px;
}

.modal-body ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.modal-body li {
    margin-bottom: 8px;
}

/* Search section styles - Centered */
.search-section {
    background: rgba(255, 255, 255, 0.98);
    padding: 15px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80px;
}

.search-section.fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(8px);
    padding: 8px 15px;
    animation: slideDown 0.3s ease;
}

.search-container {
    max-width: 800px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.input-group {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
}

input {
    flex: 1;
    max-width: 400px;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    color: #333;
    text-align: center;
}

input:focus {
    outline: none;
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.25);
    transform: translateY(-2px);
    border-color: #667eea;
}

button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#generateBtn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    border-radius: 8px;
}

#generateBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Infinite Scroll Indicator */
#infiniteScrollIndicator {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 6px 12px;
    margin: 5px 0;
    border-radius: 6px;
    font-size: 11px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    animation: pulse 2s infinite;
    max-width: 350px;
    line-height: 1.3;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.01); }
    100% { transform: scale(1); }
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Main content starts after floating section */
.main-content {
    margin-top: 80px;
    width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 10;
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin: 15px auto;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    min-height: auto;
}

header {
    text-align: center;
    margin-bottom: 20px;
    padding-top: 0;
}

h1 {
    font-size: 2rem;
    margin-bottom: 8px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    background: linear-gradient(to right, #fdbb2d, #b21f1f, #1a2a6c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.5px;
}

.subtitle {
    font-size: 0.9rem;
    color: var(--light);
    opacity: 0.9;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.4;
}

/* Blog section - Moved to top and centered */
#blogSection {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px 20px;
    margin: 10px auto 20px auto;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    transition: all 0.4s ease-in-out;
    opacity: 1;
    max-height: 450px;
    overflow-y: auto;
    overflow-x: hidden;
    max-width: 1000px;
    width: 95%;
    text-align: center;
}

#blogSection.hidden {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    padding: 0 20px;
    margin: 0 auto;
}

.blog-section {
    font-size: 14px;
    line-height: 1.6;
    text-align: left;
}

.blog-section h2 {
    font-size: 1.8em;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    color: #ffd700;
}

.blog-section h3 {
    font-size: 1.2em;
    margin-bottom: 12px;
    color: #ffd700;
    text-align: left;
}

.blog-section h4 {
    font-size: 1.1em;
    margin: 12px 0 8px 0;
    color: #4ecdc4;
    text-align: left;
}

.blog-section p, .blog-section li {
    font-size: 13px;
    margin-bottom: 8px;
    text-align: left;
}

.blog-section ol, .blog-section ul {
    margin-left: 20px;
    margin-bottom: 12px;
    text-align: left;
}

.blog-section > div > div {
    padding: 15px;
    margin-bottom: 15px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    backdrop-filter: blur(5px);
    text-align: left;
}

/* Blog section grid layout adjustments */
.blog-section > div > div:last-child {
    grid-column: 1 / -1;
    text-align: center;
}

.blog-section > div > div:last-child > div {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.blog-section > div > div:last-child > div > div {
    text-align: center;
    min-width: 150px;
}

/* Custom scrollbar for blog section */
#blogSection::-webkit-scrollbar {
    width: 6px;
}

#blogSection::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

#blogSection::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

#blogSection::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Blog section grid improvements */
.blog-section > div {
    max-width: 1000px;
    margin: 0 auto;
}

.blog-section > div > div {
    padding: 15px;
}

/* Results section */
.results-section {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    padding-bottom: 50px;
}

.result-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    animation: fadeIn 0.5s ease;
    position: relative;
    z-index: 20;
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-name {
    font-size: 1.4em;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
    color: #333;
    word-break: break-word;
    padding: 10px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border: 1px solid #dee2e6;
    width: 100%;
    line-height: 1.4;
    min-height: auto;
    display: block;
}

.reaction-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
    justify-content: center;
}

.reaction-btn {
    padding: 8px 15px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.reaction-btn.active {
    background: #e3f2fd;
}

.reaction-btn.dislike-btn.active {
    background: #ffebee;
}

.like-count, .dislike-count {
    font-weight: bold;
    color: #333;
}

.action-container {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    width: 100%;
}

.copy-btn, .share-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    flex: 1;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 14px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.copy-btn {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}

.share-btn {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40,167,69,0.3);
}

.notification {
    position: fixed;
    top: 90px;
    right: 30px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1001;
    font-weight: 600;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    transform: translateX(400px);
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

footer {
    margin-top: 50px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    padding: 20px;
}

.loading {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.2rem;
}

/* Contact Form Styles */
.contact-form {
    width: 100%;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 10px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.form-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.contact-info {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.contact-info h4 {
    color: #667eea;
    margin-bottom: 10px;
}

.contact-info p {
    margin-bottom: 8px;
    color: #666;
}

.contact-info i {
    color: #667eea;
    margin-right: 8px;
    width: 16px;
}

/* Share Modal Styles */
.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1002;
}

.share-modal > div {
    background: white;
    padding: 20px;
    border-radius: 10px;
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.share-platforms {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 20px 0;
}

.share-platform-btn {
    padding: 10px;
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    font-size: 12px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}

.modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sidebar {
        width: 280px;
        left: -280px;
    }
    
    .search-section {
        padding: 12px 15px;
    }
    
    .search-section.fixed {
        padding: 8px 12px;
    }
    
    .input-group {
        flex-direction: column;
        gap: 10px;
    }
    
    input {
        max-width: 100%;
        text-align: center;
    }
    
    h1 {
        font-size: 1.6rem;
    }
    
    .results-section {
        grid-template-columns: 1fr;
    }
    
    .action-container {
        flex-direction: column;
    }
    
    #infiniteScrollIndicator {
        font-size: 10px;
        padding: 5px 10px;
        max-width: 300px;
    }
    
    #blogSection {
        max-height: 400px;
        padding: 20px 15px;
        margin: 8px auto 15px auto;
        width: 98%;
    }
    
    .blog-section h2 {
        font-size: 1.5em;
    }
    
    .blog-section h3 {
        font-size: 1.1em;
    }
    
    .blog-section > div > div {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .notification {
        top: 80px;
        right: 20px;
        padding: 12px 20px;
    }
    
    .sidebar-toggle {
        top: 15px;
        left: 15px;
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .search-section {
        padding: 10px 12px;
    }
    
    .search-section.fixed {
        padding: 6px 10px;
    }
    
    #infiniteScrollIndicator {
        font-size: 9px;
        padding: 4px 8px;
        max-width: 250px;
    }
    
    #blogSection {
        max-height: 350px;
        padding: 15px 12px;
        margin: 5px auto 12px auto;
    }
    
    .blog-section {
        font-size: 13px;
    }
    
    .blog-section h2 {
        font-size: 1.3em;
    }
    
    .blog-section > div > div {
        padding: 10px;
    }
    
    .notification {
        top: 70px;
        right: 15px;
        padding: 10px 18px;
        font-size: 0.9rem;
    }
    
    .sidebar-toggle {
        top: 10px;
        left: 10px;
        padding: 8px;
    }
    
    .modal-content {
        width: 95%;
    }
    
    .modal-body {
        padding: 20px;
    }
}

/* Loading indicator */
#loadingIndicator {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 1.1rem;
    display: none;
}

#loadingIndicator.show {
    display: block;
}
