/* General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: linear-gradient(135deg, #4e54c8, #8f94fb);
    color: #fff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#blog-container {


    text-align: center;
    background: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: fadeIn 1s ease-in-out;
}

/* Header Titles */
#blog-container h1 {
    font-size: 2.8rem;
    color: #fff;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: 2px;
}
/* Blog Thumbnail Image */
.blog-thumbnail {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
  }
  
  .post-tile:hover .blog-thumbnail {
    transform: scale(1.1);
  }
  
#blog-container h2 {
    font-size: 1.5rem;
    font-weight: 400;
    color: #e3e3e3;
    margin-bottom: 20px;
}

/* Search Bar */
#search-bar {
    width: 60%;
    padding: 12px 20px;
    font-size: 1rem;
    border: none;
    border-radius: 50px;
    outline: none;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

#search-bar::placeholder {
    color: #ccc;
    font-style: italic;
}

#search-bar:focus {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

/* Loading Spinner */
#loading-spinner {
    width: 50px;
    height: 50px;
    border: 6px solid rgba(255, 255, 255, 0.3);
    border-top-color: #8d58f8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

.hidden {
    display: none;
}

/* Posts Container */
#post-tiles-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

/* Individual Post Tile */
.post-tile {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    width: 280px;
    padding: 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: left;
    overflow: hidden;
}

.post-tile h2 {
    font-size: 1.4rem;
    color: #fff;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
}

.post-tile p {
    color: #e0e0e0;
    margin-bottom: 10px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.post-tile:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(141, 88, 248, 0.5);
}

.post-tile:active {
    transform: scale(0.98);
}

/* Back Button */
button {
    background: linear-gradient(135deg, #8d58f8, #7d32ff);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: bold;
    margin-top: 10px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    outline: none;
}

button:hover {
    background: linear-gradient(135deg, #7d32ff, #8d58f8);
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(141, 88, 248, 0.5);
}

button:active {
    transform: scale(0.98);
}

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

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
