/* ========================================
   CSS Reset & Base Styles
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

a:hover {
    color: #e91e63;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   Header Styles
   ======================================== */

.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    gap: 20px;
}

.logo h1 {
    font-size: 28px;
    font-weight: 800;
    color: #e91e63;
    margin: 0;
}

.logo a {
    color: #e91e63;
}

.nav {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-weight: 500;
    color: #333;
    font-size: 15px;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #e91e63;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #e91e63;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.search-form {
    display: flex;
    align-items: center;
}

.search-input {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 14px;
    width: 200px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #e91e63;
    width: 250px;
}

.search-btn {
    padding: 10px 15px;
    background: #e91e63;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 10px;
}

.search-btn:hover {
    background: #c2185b;
}

.mobile-menu-btn {
    display: none;
}

.hamburger {
    width: 30px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
}

.hamburger span {
    display: block;
    height: 2px;
    width: 100%;
    background: #333;
    margin-bottom: 5px;
    transition: all 0.3s ease;
}

/* ========================================
   Mobile Menu
   ======================================== */

.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background: #fff;
    z-index: 1001;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-close {
    padding: 20px;
    text-align: right;
    border-bottom: 1px solid #e0e0e0;
}

.mobile-menu-close i {
    font-size: 24px;
    cursor: pointer;
}

.mobile-nav-list {
    padding: 30px 20px;
}

.mobile-nav-link {
    display: block;
    padding: 15px 0;
    font-size: 18px;
    font-weight: 500;
    border-bottom: 1px solid #e0e0e0;
}

.mobile-nav-link:hover {
    color: #e91e63;
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 80px 0;
    text-align: center;
    color: #fff;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.9;
}

.hero-search {
    max-width: 500px;
    margin: 0 auto;
}

.hero-search-input {
    width: 100%;
    padding: 15px 20px;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.hero-search-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #667eea;
    font-size: 20px;
    cursor: pointer;
}

/* ========================================
   Section Styles
   ======================================== */

.section {
    padding: 60px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    color: #333;
}

.view-all {
    color: #e91e63;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.view-all:hover {
    gap: 10px;
}

/* ========================================
   Comic Grid
   ======================================== */

.comic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
}

.comic-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.comic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.comic-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2/3;
}

.comic-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.comic-card:hover .comic-image img {
    transform: scale(1.05);
}

.comic-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.comic-card:hover .comic-overlay {
    opacity: 1;
}

.read-btn {
    padding: 10px 30px;
    background: #e91e63;
    color: #fff;
    border-radius: 25px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.read-btn:hover {
    background: #c2185b;
    transform: scale(1.05);
}

.comic-info {
    padding: 15px;
}

.comic-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.comic-title a {
    color: #333;
}

.comic-title a:hover {
    color: #e91e63;
}

.comic-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #666;
}

.comic-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.comic-meta i {
    color: #e91e63;
}

.no-comics {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #666;
}

/* ========================================
   Genre Grid
   ======================================== */

.genre-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.genre-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-align: center;
}

.genre-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    color: #e91e63;
}

.genre-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 5px;
}

.genre-count {
    font-size: 12px;
    color: #666;
}

.no-genres {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #666;
}

/* ========================================
   Footer
   ======================================== */

.footer {
    background: #222;
    color: #fff;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #e91e63;
}

.footer-text {
    color: #aaa;
    line-height: 1.8;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 40px;
    height: 40px;
    background: #333;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: #e91e63;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-link {
    color: #aaa;
    font-size: 14px;
}

.footer-link:hover {
    color: #e91e63;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #aaa;
    font-size: 14px;
}

.footer-contact i {
    color: #e91e63;
}

.footer-contact a {
    color: #aaa;
}

.footer-contact a:hover {
    color: #e91e63;
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid #333;
    text-align: center;
}

.footer-bottom-text {
    color: #666;
    font-size: 14px;
}

/* ========================================
   Responsive Design
   ======================================== */

/* Large tablets and small desktops */
@media (max-width: 1024px) {
    .container {
        padding: 0 25px;
    }
    
    .comic-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 25px;
    }
    
    .genre-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

@media (max-width: 992px) {
    .hero-title {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .section {
        padding: 50px 0;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .comic-grid {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
        gap: 20px;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
        padding: 12px 0;
    }
    
    .logo {
        flex: 1;
    }
    
    .logo h1 {
        font-size: 22px !important;
    }
    
    .logo img {
        height: 38px !important;
        width: 38px !important;
    }
    
    .nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .search-form {
        display: none;
    }
    
    .hero {
        padding: 60px 0;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .section {
        padding: 40px 0;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .section-header {
        margin-bottom: 30px;
    }
    
    .comic-grid {
        grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
        gap: 15px;
    }
    
    .comic-info {
        padding: 12px;
    }
    
    .comic-title {
        font-size: 14px;
    }
    
    .comic-meta {
        font-size: 12px;
    }
    
    .genre-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 12px;
    }
    
    .genre-item {
        padding: 15px;
    }
    
    .page-header {
        padding: 40px 0;
    }
    
    .page-title {
        font-size: 28px;
    }
    
    .page-subtitle {
        font-size: 16px;
    }
    
    .footer {
        padding: 40px 0 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 15px;
    }
    
    .header-inner {
        padding: 10px 0;
    }
    
    .logo h1 {
        font-size: 18px !important;
    }
    
    .logo img {
        height: 35px !important;
        width: 35px !important;
    }
    
    .hero {
        padding: 50px 0;
    }
    
    .hero-title {
        font-size: 24px;
        margin-bottom: 15px;
    }
    
    .hero-subtitle {
        font-size: 14px;
        margin-bottom: 30px;
    }
    
    .hero-search-input {
        padding: 12px 18px;
        font-size: 14px;
    }
    
    .section {
        padding: 35px 0;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .section-header {
        margin-bottom: 25px;
    }
    
    .view-all {
        font-size: 14px;
    }
    
    .comic-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .comic-info {
        padding: 10px;
    }
    
    .comic-title {
        font-size: 13px;
        margin-bottom: 8px;
    }
    
    .comic-meta {
        font-size: 11px;
        flex-direction: column;
        gap: 5px;
    }
    
    .read-btn {
        padding: 8px 20px;
        font-size: 12px;
    }
    
    .genre-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .genre-item {
        padding: 12px;
    }
    
    .genre-name {
        font-size: 13px;
    }
    
    .genre-count {
        font-size: 11px;
    }
    
    .page-header {
        padding: 35px 0;
    }
    
    .page-title {
        font-size: 22px;
    }
    
    .page-subtitle {
        font-size: 14px;
    }
    
    .pagination {
        gap: 10px;
        margin-top: 30px;
    }
    
    .pagination-link,
    .pagination-current {
        padding: 8px 15px;
        font-size: 14px;
    }
    
    .comic-details-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .comic-details-image {
        max-width: 220px;
        margin: 0 auto;
    }
    
    .comic-details-title {
        font-size: 22px;
    }
    
    .comic-details-actions {
        flex-direction: column;
    }
    
    .read-btn,
    .bookmark-btn {
        width: 100%;
        justify-content: center;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .contact-title {
        font-size: 22px;
    }
    
    .footer {
        padding: 35px 0 15px;
    }
    
    .footer-title {
        font-size: 18px;
    }
}

/* Extra small devices */
@media (max-width: 375px) {
    .logo h1 {
        font-size: 16px !important;
    }
    
    .logo img {
        height: 32px !important;
        width: 32px !important;
    }
    
    .hero-title {
        font-size: 20px;
    }
    
    .section-title {
        font-size: 18px;
    }
    
    .comic-grid {
        gap: 10px;
    }
    
    .comic-title {
        font-size: 12px;
    }
    
    .genre-grid {
        gap: 8px;
    }
}

/* ========================================
   Loading Animation
   ======================================== */

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e0e0e0;
    border-top-color: #e91e63;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   Utility Classes
   ======================================== */

.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mt-40 {
    margin-top: 40px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-40 {
    margin-bottom: 40px;
}

/* ========================================
   Page Header
   ======================================== */

.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 50px 0;
    text-align: center;
    color: #fff;
}

.page-title {
    font-size: 40px;
    font-weight: 800;
    margin-bottom: 10px;
}

.page-subtitle {
    font-size: 18px;
    opacity: 0.9;
}

/* ========================================
   Pagination
   ======================================== */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.pagination-link {
    padding: 10px 20px;
    background: #e91e63;
    color: #fff;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pagination-link:hover {
    background: #c2185b;
    color: #fff;
    transform: translateY(-2px);
}

.pagination-current {
    padding: 10px 20px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    color: #333;
    font-weight: 500;
}

/* ========================================
   Comic Details Page
   ======================================== */

.comic-details-content {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
}

.comic-details-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.comic-details-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #333;
}

.comic-details-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.meta-label {
    font-weight: 600;
    color: #333;
}

.meta-value i {
    color: #e91e63;
}

.comic-details-genres {
    margin-bottom: 20px;
}

.genres-label {
    font-weight: 600;
    color: #333;
    margin-right: 10px;
}

.genres-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.genre-tag {
    padding: 5px 15px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 13px;
    color: #333;
    transition: all 0.3s ease;
}

.genre-tag:hover {
    background: #e91e63;
    color: #fff;
    border-color: #e91e63;
}

.comic-details-description {
    margin-bottom: 25px;
}

.comic-details-description h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.comic-details-description p {
    color: #555;
    line-height: 1.8;
}

.comic-details-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.bookmark-btn {
    padding: 12px 25px;
    background: #fff;
    color: #333;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.bookmark-btn:hover {
    border-color: #e91e63;
    color: #e91e63;
}

@media (max-width: 768px) {
    .comic-details-content {
        grid-template-columns: 1fr;
    }

    .comic-details-image {
        max-width: 250px;
        margin: 0 auto;
    }

    .page-title {
        font-size: 28px;
    }
}

/* ========================================
   Contact Page
   ======================================== */

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.contact-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #333;
}

.contact-text {
    color: #666;
    line-height: 1.8;
    margin-bottom: 30px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.contact-item i {
    font-size: 20px;
    color: #e91e63;
    margin-top: 3px;
    width: 25px;
    text-align: center;
}

.contact-item-info h4 {
    font-weight: 600;
    margin-bottom: 3px;
    color: #333;
}

.contact-item-info span,
.contact-item-info a {
    color: #666;
    font-size: 14px;
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #e91e63;
}

.contact-form textarea {
    resize: vertical;
    min-height: 150px;
}

.submit-btn {
    padding: 14px 35px;
    background: #e91e63;
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background: #c2185b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(233, 30, 99, 0.4);
}

.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@media (max-width: 768px) {
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}
