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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Main container */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Fact of the day section */
#fact-of-the-day {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 3rem;
    margin-bottom: 3rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

#fact-of-the-day::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb, #f5576c);
}

#fact-of-the-day h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#fact h2 a {
    text-decoration: none;
    color: #333;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    display: block;
    transition: color 0.3s ease;
}

#fact h2 a:hover {
    color: #667eea;
}

#fact-text {
    font-size: 1.2rem;
    line-height: 1.8;
    margin: 1.5rem 0;
    color: #555;
}

#fact-tag a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    padding: 0.3rem 0.8rem;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 15px;
    transition: all 0.3s ease;
}

#fact-tag a:hover {
    background: #667eea;
    color: white;
}

.read-more {
    margin-top: 1.5rem;
}

.read-more a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    padding: 0.8rem 2rem;
    border: 2px solid #667eea;
    border-radius: 25px;
    transition: all 0.3s ease;
    display: inline-block;
}

.read-more a:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* Social share section */
#social-share {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

#social-share h3 {
    margin-bottom: 1rem;
    color: #333;
}

.share-icons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.share-icon:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.facebook { background: #3b5998; }
.twitter { background: #1da1f2; }
.linkedin { background: #0077b5; }
.messenger { background: #0084ff; }
.whatsapp { background: #25d366; }
.viber { background: #665cac; }
.sms { background: #34c759; }
.email { background: #ea4335; }
.copy { background: #6c757d; }

/* Archive section */
#fact-archive {
    margin-bottom: 3rem;
}

#fact-archive h2 {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 2rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.fact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.fact-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 280px;
    position: relative;
}

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

.fact-card h3 {
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.fact-card h3 a {
    text-decoration: none;
    color: #333;
    font-size: 1.3rem;
    line-height: 1.4;
    display: block;
    transition: color 0.3s ease;
}

.fact-card h3 a:hover {
    color: #667eea;
}

.fact-excerpt {
    flex-grow: 1;
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.fact-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.fact-tag a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.fact-tag a:hover {
    background: #667eea;
    color: white;
}

.fact-date {
    color: #999;
    font-size: 0.85rem;
}

.fact-card .read-more {
    margin-top: auto;
    text-align: center;
}

      #fact-text p {
    margin-bottom: 1.5rem !important;
    display: block !important;
}

#fact-text p:last-child {
    margin-bottom: 0 !important;
}

.fact-card .read-more a {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
}

/* Newsletter section */
#newsletter {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 3rem;
    margin-bottom: 3rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.newsletter-container {
    display: flex;
    align-items: center;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.newsletter-content {
    flex: 2;
}

.newsletter-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #333;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.newsletter-content p {
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.form-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

#newsletter-email {
    flex: 1;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

#newsletter-email:focus {
    outline: none;
    border-color: #667eea;
}

.subscribe-btn {
    padding: 1rem 2rem;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.subscribe-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

.form-check a {
    color: #667eea;
    text-decoration: none;
}

.newsletter-image {
    flex: 1;
    text-align: center;
}

.newsletter-image img {
    max-width: 150px;
    height: auto;
    border-radius: 15px;
}

/* Footer */
footer {
    background: rgba(255, 255, 255, 0.95);
    margin-top: 3rem;
    padding: 2rem 0;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.about-text {
    margin-bottom: 1.5rem;
}

.ftxt {
    color: #666;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

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

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-2px);
}

.copyright {
    border-top: 1px solid #eee;
    padding-top: 1rem;
    color: #999;
}

/* Responsive design */
@media (max-width: 768px) {
    main {
        padding: 1rem;
    }
    
    #fact-of-the-day {
        padding: 2rem 1.5rem;
    }
    
    #fact-of-the-day h1 {
        font-size: 2rem;
    }
    
    .fact-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .newsletter-container {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    
    .form-group {
        flex-direction: column;
    }
    
    .share-icons {
        gap: 0.8rem;
    }
    
    .share-icon {
        width: 40px;
        height: 40px;
    }
    
    nav ul {
        gap: 1rem;
        padding: 0.8rem 0;
    }
    
    .fact-meta {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .fact-card {
        padding: 1.5rem;
        min-height: 250px;
    }
    
    #newsletter {
        padding: 2rem 1.5rem;
    }
    
    .newsletter-content h2 {
        font-size: 1.5rem;
    }
}

/* Animation for page load */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fact-card {
    animation: fadeInUp 0.6s ease forwards;
}

.fact-card:nth-child(even) {
    animation-delay: 0.1s;
}

.fact-card:nth-child(odd) {
    animation-delay: 0.2s;
}

#newsletter input[type="email"]:focus {
    outline: none;
    border-color: #667eea;
}

#newsletter .subscribe-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

@media (max-width: 768px) {
    #newsletter .form-group {
        flex-direction: column;
    }
    
    #newsletter .form-group input,
    #newsletter .form-group button {
        width: 100%;
    }
    
    #newsletter {
        padding: 2rem 1.5rem !important;
        margin: 2rem 1rem !important;
    }
    
    #newsletter h2 {
        font-size: 1.5rem !important;
    }
    
    #newsletter .form-check {
        justify-content: flex-start !important;
        text-align: left;
    }
}

/* Smooth scrolling for the entire page */
html {
    scroll-behavior: smooth;
}

/* Pagination button hover effects */
.pagination-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* Offset for the anchor to account for header */
#archive-content {
    scroll-margin-top: 100px; /* Adjust based on your header height */
}

#how-it-works a:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

@media (max-width: 768px) {
    #how-it-works {
        padding: 2rem 1.5rem !important;
        margin: 2rem 1rem !important;
    }
    
    #how-it-works h2 {
        font-size: 2rem !important;
    }
    
    #how-it-works .grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
}

#category-grid a:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

@media (max-width: 768px) {
    #popular-categories {
        padding: 2rem 1.5rem !important;
        margin: 2rem 1rem !important;
    }
    
    #popular-categories h2 {
        font-size: 2rem !important;
    }
    
    #category-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
        gap: 1rem !important;
    }
    
    #category-grid a {
        padding: 1.5rem !important;
    }
}

@media (max-width: 768px) {
    #why-daily-facts {
        padding: 2rem 1.5rem !important;
        margin: 2rem 1rem !important;
    }
    
    #why-daily-facts h2 {
        font-size: 2rem !important;
    }
    
    #why-daily-facts .grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
}

/* Mobile responsive styles for hero section */
@media (max-width: 768px) {
    #hero-intro {
        padding: 2rem 1.5rem !important;
        margin: 1rem !important;
    }
    
    #hero-title {
        font-size: 2rem !important;
        line-height: 1.3 !important;
    }
    
    #hero-intro p {
        font-size: 1.1rem !important;
    }
    
    #hero-stats {
        gap: 1.5rem !important;
    }
}

@media (max-width: 480px) {
    #hero-intro {
        padding: 1.5rem 1rem !important;
    }
    
    #hero-title {
        font-size: 1.6rem !important;
        line-height: 1.4 !important;
    }
    
    #hero-intro p {
        font-size: 1rem !important;
        line-height: 1.5 !important;
    }
    
    #hero-stats {
        gap: 1rem !important;
    }
    
    #hero-stats > div {
        min-width: 80px;
    }
}