@import url('https://fonts.googleapis.com/css2?family=Overpass:ital,wght@0,100..900;1,100..900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Petal canvas styling */
#petal-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0; /* Changed from 1 to 0 to put it behind everything */
}

/* Adjust main content to ensure proper layering */
body {
    font-family: 'Overpass', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #121212;
    color: #FFFFFF;
    line-height: 1.6;
    position: relative;
    z-index: 1; /* Add z-index to body */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2; /* Ensure container is above petals */
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Header */
header {
    background-color: #121212;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 100; /* Highest z-index for sticky header */
}

header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo h1 {
    color: #FFFFFF;
    font-weight: 700;
    font-size: 1.5rem;
}

nav ul {
    display: flex;
}

nav ul li {
    margin-right: 30px;
}

nav ul li a {
    color: #BBBBBB;
    font-weight: 600;
    transition: color 0.3s;
    padding: 12px 0;
    font-size: 1.1rem;
}

nav ul li a:hover,
nav ul li a.active {
    color: #E5A8B7; /* Pink color for hover */
}

.search-bar {
    display: flex;
    background: #351D23; /* Pink-tinted dark background */
    border-radius: 5px;
    overflow: hidden;
    max-width: 300px;
}

.search-bar input {
    background: #351D23; /* Pink-tinted dark background */
    border: none;
    padding: 12px 15px;
    color: #FFFFFF;
    outline: none;
    flex-grow: 1;
    font-size: 1rem;
    font-family: 'Overpass', Tahoma, Geneva, Verdana, sans-serif !important;
}

.search-bar button {
    background: #E5A8B7; /* Your pink color as button */
    border: none;
    color: white;
    padding: 0 20px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.search-bar button:hover {
    background: #D192A3; /* Slightly darker pink on hover */
}

.user-profile i {
    font-size: 28px;
    color: #FFFFFF;
    cursor: pointer;
    transition: color 0.3s;
}

.user-profile i:hover {
    color: #E5A8B7;
}

/* Hero Section and Features */
.hero-section {
    background: #1E1E1E;
    padding: 50px 0;
    text-align: center;
    border-radius: 12px;
    border: 1px solid #F0C1D3; /* Light pink border */
    margin: 20px auto;
    max-width: 1240px;
    position: relative;
    z-index: 2; /* Ensure it's above petals */
}

.hero-section h1 {
    font-size: 2rem;
    color: #FFFFFF;
    margin-bottom: 15px;
    margin-top: 40px;
    font-weight: 700;
}

.hero-section p {
    font-size: 1.1rem;
    color: #FFFFFF;
    max-width: 600px;
    margin: 0 auto 50px;
    line-height: 1.6;
}

.features-grid {
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto 50px;
}

.feature-item {
    display: flex;
    text-align: left;
    gap: 20px;
}

.feature-icon {
    flex-shrink: 0;
    width: 110px;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon img {
    width: 100%;
}

.feature-content h3 {
    color: #FFFFFF;
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.feature-content p {
    color: #FFFFFF;
    font-size: 0.95rem;
    text-align: left;
    margin: 0;
}

/* Main Content */
main {
    padding: 0 0 30px;
    position: relative;
    z-index: 2;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-top: 40px;
}

.section-header h2 {
    font-size: 1.5rem;
    color: #FFFFFF;
}

.filter-controls select {
    background: #351D23; /* Pink-tinted dark background */
    color: #FFFFFF;
    border: 1px solid #E5A8B7; /* Your pink color as border */
    padding: 8px 12px;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

/* Manga Grid - Shared with both pages */
.manga-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 25px;
    position: relative;
    z-index: 2; /* Ensure manga cards are above petals */
}

.manga-card {
    background: #2C1D21; /* Dark pink-tinted background */
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    position: relative;
    z-index: 3; /* Ensure individual cards are above petals */
}

.manga-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid #E5A8B7; /* Pink border on hover */
}

.manga-cover {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2/3;
}

.manga-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.manga-card:hover .manga-cover img {
    transform: scale(1.05);
}

.manga-info {
    padding: 12px;
}

.manga-title {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 5px;
}

.manga-details {
    display: flex;
    font-size: 0.8rem;
    color: #FFFFFF;
    justify-content: space-between;
}

.manga-score {
    display: flex;
    align-items: center;
}

.manga-score i {
    color: #FFCC00;
    margin-right: 4px;
}

/* Rating Overlay */
.manga-rating {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(18, 18, 18, 0.8);
    color: #FFFFFF;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
}

.manga-rating i {
    color: #FFCC00;
    margin-right: 4px;
    font-size: 0.7rem;
}

/* Loading Spinner */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
}

.spinner {
    border: 4px solid rgba(229, 168, 183, 0.2); /* Pink loading spinner */
    border-top: 4px solid #E5A8B7;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

#load-more {
    background: #E5A8B7; /* Pink button */
    color: #121212;
    border: none;
    padding: 10px 25px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

#load-more:hover {
    background: #D192A3; /* Darker pink on hover */
}

/* Footer */
footer {
    background: #2C1D21; /* Pink-tinted dark background */
    border-top: 1px solid #E5A8B7; /* Pink border */
    padding: 20px 0;
    margin-top: 30px;
    position: relative;
    z-index: 2;
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

footer p {
    color: #FFFFFF;
    font-size: 0.9rem;
}

.social-links a {
    margin-left: 15px;
    color: #FFFFFF;
    font-size: 1.2rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: #E5A8B7; /* Pink hover for social links */
}

/* Media Queries */
@media (max-width: 768px) {
    header .container {
        flex-wrap: wrap;
    }

    .container .logo,
    .user-profile {
        display: none;
    }
    
    nav {
        order: 3;
        width: 100%;
        margin-top: 15px;
        padding: 0px 40px;
    }
    
    nav ul {
        justify-content: space-between;
    }
    
    nav ul li {
        margin-right: 0;
    }
    
    .search-bar {
        margin-left: auto;
        margin-right: 15px;
        margin-bottom: 15px;
    }
    
    .manga-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .hero-section h1 {
        font-size: 1.8rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
}