/* Updated styles for Bad News Bears with dreamy background & refined pink theme */

/* Import Comic Sans font */
@import url("https://fonts.cdnfonts.com/css/comic-sans");

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

body {
    font-family: "Comic Sans MS", "Comic Sans", cursive;
    line-height: 1.6;
    color: #333; /* Darker text for better contrast */
    /* Soft gradient matching dreamy background */
    background: linear-gradient(135deg, #f8cdda 0%, #d4e4f7 100%); 
    background-attachment: fixed;
    position: relative;
}

/* Dreamy Cloud Background Overlay */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("../images/dreamy-background.png"); /* New dreamy background */
    background-size: cover;
    background-position: center;
    opacity: 0.75; /* Adjusted opacity */
    z-index: -1;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header */
header {
    background-color: rgba(255, 255, 255, 0.88); /* Slightly more opaque */
    box-shadow: 0 4px 8px rgba(100, 80, 120, 0.1);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(6px);
    /* Updated border color - main pink */
    border-bottom: 3px solid #FF80BF; 
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    height: 60px;
    margin-right: 1rem;
}

header h1 {
    /* Main pink header color */
    color: #FF80BF; 
    font-size: 1.8rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* Navigation */
nav ul {
    display: flex;
    list-style: none;
}

nav li {
    margin-left: 1.5rem;
    position: relative;
}

nav li.active::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    /* Main pink active link color */
    background-color: #FF80BF; 
    border-radius: 3px;
}

nav a {
    /* Main pink link color */
    color: #FF80BF; 
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

nav a:hover {
    /* Darker pink hover color */
    color: #E64A8D; 
}

/* Search Container */
.search-container {
    display: flex;
    margin-left: auto;
}

.search-container input {
    padding: 0.5rem;
    /* Lighter pink border color */
    border: 2px solid #FFB3DE; 
    border-radius: 5px 0 0 5px;
    font-family: "Comic Sans MS", cursive, sans-serif;
}

.search-container button {
    /* Main pink button color */
    background-color: #FF80BF; 
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-container button:hover {
    /* Darker pink button hover color */
    background-color: #E64A8D; 
}

/* Main Content */
main {
    padding: 2rem 0;
}

/* Featured Section */
.featured {
    margin-bottom: 3rem;
}

.featured-header {
    text-align: center;
    margin-bottom: 2rem;
}

.featured-header h2 {
    /* Main pink heading color */
    color: #FF80BF; 
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(100, 80, 120, 0.1);
}

.featured-header p {
    max-width: 800px;
    margin: 0 auto;
    /* Improved tagline readability: white with shadow */
    color: white; 
    font-size: 1.1rem;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6); 
}

.featured-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.featured-article {
    background-color: rgba(255, 255, 255, 0.9); /* Slightly more opaque cards */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(100, 80, 120, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-article:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(100, 80, 120, 0.15);
}

.featured-image {
    height: 300px;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.featured-article:hover .featured-image img {
    transform: scale(1.05);
}

.featured-info {
    padding: 1.5rem;
}

.featured-info h3 {
    /* Main pink heading color */
    color: #FF80BF; 
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.amount {
    /* Darker pink amount colors */
    background-color: #FFECF1; 
    color: #E64A8D; 
    padding: 0.3rem 0.6rem;
    border-radius: 5px;
    font-weight: bold;
    font-size: 0.9rem;
}

.date {
    /* Lavender date colors from background */
    background-color: #E9D8FD; 
    color: #8646d1; 
    padding: 0.3rem 0.6rem;
    border-radius: 5px;
    font-size: 0.9rem;
}

.tag {
    padding: 0.3rem 0.6rem;
    border-radius: 5px;
    color: white;
    font-size: 0.9rem;
}

.read-more {
    display: inline-block;
    /* Main pink button color */
    background-color: #FF80BF; 
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    text-decoration: none;
    margin-top: 1rem;
    transition: background-color 0.3s ease;
}

.read-more:hover {
    /* Darker pink button hover color */
    background-color: #E64A8D; 
}

/* Recent Articles */
.recent-articles {
    margin-bottom: 3rem;
}

.recent-articles h2 {
    /* Main pink heading color */
    color: #FF80BF; 
    font-size: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(100, 80, 120, 0.1);
}

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

.article-card {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(100, 80, 120, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(100, 80, 120, 0.15);
}

.article-image {
    height: 200px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover .article-image img {
    transform: scale(1.05);
}

.article-info {
    padding: 1.5rem;
}

.article-info h3 {
    /* Main pink heading color */
    color: #FF80BF; 
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

/* Leaderboard Preview */
.leaderboard-preview {
    margin-bottom: 3rem;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 4px 8px rgba(100, 80, 120, 0.1);
}

.leaderboard-preview h2 {
    /* Main pink heading color */
    color: #FF80BF; 
    font-size: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(100, 80, 120, 0.1);
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.leaderboard-table th,
.leaderboard-table td {
    padding: 1rem;
    text-align: left;
}

.leaderboard-table th {
    /* Lavender table header color */
    background-color: #e6dcf7; 
    color: #594a66; /* Darker purple text for contrast */
    font-weight: bold;
}

.leaderboard-table tr:nth-child(even) {
    /* Lighter pink even row color */
    background-color: rgba(255, 224, 237, 0.4); 
}

.leaderboard-table tr:hover {
    /* Slightly darker pink row hover color */
    background-color: rgba(255, 204, 227, 0.5); 
}

.view-all {
    display: block;
    width: fit-content;
    margin: 0 auto;
    /* Main pink button color */
    background-color: #FF80BF; 
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.view-all:hover {
    /* Darker pink button hover color */
    background-color: #E64A8D; 
}

/* Newsletter */
.newsletter {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 8px rgba(100, 80, 120, 0.1);
    margin-bottom: 3rem;
}

.newsletter h2 {
    /* Main pink heading color */
    color: #FF80BF; 
    font-size: 2rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(100, 80, 120, 0.1);
}

.newsletter p {
    max-width: 600px;
    margin: 0 auto 1.5rem;
    color: #333;
}

.newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 0.8rem;
    /* Lighter pink border color */
    border: 2px solid #FFB3DE; 
    border-radius: 5px 0 0 5px;
    font-family: "Comic Sans MS", cursive, sans-serif;
}

.newsletter-form button {
    /* Main pink button color */
    background-color: #FF80BF; 
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    font-family: "Comic Sans MS", cursive, sans-serif;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.newsletter-form button:hover {
    /* Darker pink button hover color */
    background-color: #E64A8D; 
}

/* Footer */
footer {
    background-color: rgba(255, 255, 255, 0.88);
    padding: 3rem 2rem 1rem;
    box-shadow: 0 -4px 8px rgba(100, 80, 120, 0.1);
    backdrop-filter: blur(6px);
    /* Main pink border color */
    border-top: 3px solid #FF80BF; 
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    gap: 2rem;
}

.footer-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-logo img {
    height: 50px;
    margin-bottom: 1rem;
}

.footer-logo p {
    /* Main pink logo text color */
    color: #FF80BF; 
    font-weight: bold;
}

.footer-links h4,
.footer-social h4 {
    /* Main pink heading color */
    color: #FF80BF; 
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

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

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

.footer-links a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    /* Main pink link hover color */
    color: #FF80BF; 
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    /* Main pink icon background */
    background-color: #FF80BF; 
    color: white;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.social-icons a:hover {
    /* Darker pink icon hover background */
    background-color: #E64A8D; 
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    /* Lighter pink border color */
    border-top: 1px solid #FFB3DE; 
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    color: #333;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.pagination a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0 0.5rem;
    background-color: white;
    /* Main pink pagination color */
    color: #FF80BF; 
    border-radius: 50%;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(100, 80, 120, 0.1);
    transition: all 0.3s ease;
}

.pagination a.active {
    /* Main pink active pagination color */
    background-color: #FF80BF; 
    color: white;
}

.pagination a:hover {
    /* Lighter pink pagination hover color */
    background-color: #FFB3DE; 
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(100, 80, 120, 0.15);
}

.pagination a.next {
    width: auto;
    padding: 0 1rem;
    border-radius: 20px;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .featured-content {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .footer-links, .footer-social {
        width: 100%;
    }
    
    .social-icons {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 1rem;
    }
    
    .logo-container {
        margin-bottom: 1rem;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        margin-bottom: 1rem;
    }
    
    nav li {
        margin: 0.5rem;
    }
    
    .search-container {
        width: 100%;
        margin-left: 0;
    }
    
    .search-container input {
        flex: 1;
    }
}

/* Tag Colors (keeping these as they are distinct) */
.access-control {
    background-color: #f97316;
}

.smart-contract {
    background-color: #10b981;
}

.social-engineering {
    background-color: #8b5cf6;
}

.rug-pull {
    background-color: #ef4444;
}

.flash-loan {
    background-color: #f97316;
}

.bridge {
    background-color: #8b5cf6;
}
