/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6566fa;
    --secondary-color: #3498db;
    --accent-color: #0032a3;
    --dark-color: #001e3d;
    --light-color: #ecf0f1;
    --text-color: #333;
    --light-text: #f8f9fa;
    --success-color: #2ecc71;
    --border-radius: 5px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f8f9fa;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    color: var(--dark-color);
    position: relative;
}

.section-title:after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 10px auto 0;
    border-radius: 2px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-login, .btn-register {
    padding: 8px 15px;
    margin-right: 10px;
    font-size: 14px;
}

.btn-login {
    background-color: transparent;
    border: 1px solid var(--light-color);
    color: var(--light-color);
}

.btn-login:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.btn-register {
    background-color: var(--accent-color);
    color: white;
}

.btn-register:hover {
    background-color: #d35400;
}

/* Header */
header {
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
    color: white;
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 25px;
}

nav ul li a {
    position: relative;
    padding: 5px 0;
    font-weight: 500;
}

nav ul li a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

nav ul li a:hover:after {
    width: 100%;
}

.user-actions {
    display: flex;
    align-items: center;
}

#search-form {
    display: flex;
    margin-left: 15px;
}

#search-form input {
    padding: 8px 12px;
    border: none;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    width: 200px;
}

#search-form button {
    background-color: var(--accent-color);
    border: none;
    padding: 8px 12px;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    color: white;
    cursor: pointer;
}

/* Hero Section */
.hero {
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 100px 0;
    text-align: center;
}

.hero-content {
    max-width: 700px;
    margin: 0 auto;
}

.hero-content h2 {
    font-size: 42px;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero-content p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Featured Section */
.featured {
    padding: 80px 0;
    background-color: white;
}

.comic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.comic-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.comic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.comic-thumbnail {
    position: relative;
    height: 0;
    padding-top: 140%; /* Aspect ratio for the comic cover */
    overflow: hidden;
}

.comic-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comic-info {
    padding: 15px;
}

.comic-info h3 {
    font-size: 18px;
    margin-bottom: 8px;
    font-weight: 600;
}

.author {
    color: #666;
    font-size: 14px;
    margin-bottom: 8px;
}

.rating {
    color: var(--accent-color);
}

.rating span {
    color: var(--text-color);
    margin-left: 5px;
}

.date {
    font-size: 14px;
    color: #888;
}

.view-more {
    text-align: center;
    margin-top: 40px;
}

/* Rankings Section */
.rankings {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 10px 20px;
    margin: 0 5px;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    position: relative;
}

.tab-btn.active {
    color: var(--primary-color);
}

.tab-btn.active:after {
    content: '';
    position: absolute;
    bottom: -11px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.ranking-list {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    transition: var(--transition);
}

.ranking-item:last-child {
    border-bottom: none;
}

.ranking-item:hover {
    background-color: #f9f9f9;
}

.rank {
    font-size: 24px;
    font-weight: 700;
    width: 40px;
    color: var(--dark-color);
}

.ranking-item img {
    width: 60px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 20px;
}

.ranking-info h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.views {
    font-size: 14px;
    color: #666;
}

.loading {
    text-align: center;
    padding: 20px;
    font-size: 16px;
    color: #666;
}

/* Categories Section */
.categories {
    padding: 80px 0;
    background-color: white;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.category-card {
    background-color: #f5f5f5;
    border-radius: var(--border-radius);
    padding: 30px 15px;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--box-shadow);
}

.category-card:hover {
    transform: translateY(-5px);
    background-color: var(--primary-color);
    color: white;
}

.category-card i {
    font-size: 36px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.category-card:hover i {
    color: white;
}

.category-card h3 {
    font-size: 18px;
    font-weight: 600;
}

/* Latest Uploads Section */
.latest-uploads {
    padding: 80px 0;
    background-color: #f8f9fa;
}

/* CTA Section */
.cta {
    padding: 80px 0;
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/cta-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
}

.cta-content {
    max-width: 700px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 36px;
    margin-bottom: 20px;
    font-weight: 700;
}

.cta-content p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: 60px 0 20px;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-column h3 {
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-column p {
    margin-bottom: 20px;
    opacity: 0.8;
    font-size: 14px;
}

.social-links {
    display: flex;
    margin-top: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin-right: 10px;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary-color);
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    opacity: 0.8;
    transition: var(--transition);
}

.footer-column ul li a:hover {
    opacity: 1;
    color: var(--primary-color);
}

#subscribe-form {
    display: flex;
    margin-top: 15px;
}

#subscribe-form input {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}

#subscribe-form button {
    padding: 10px 15px;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-content h2 {
        font-size: 36px;
    }
    
    .cta-content h2 {
        font-size: 30px;
    }
}

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    nav ul {
        margin-bottom: 15px;
    }
    
    nav ul li {
        margin-left: 15px;
        margin-right: 15px;
    }
    
    .user-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .user-actions a {
        margin-bottom: 10px;
        width: 100%;
        text-align: center;
    }
    
    #search-form {
        width: 100%;
        margin-left: 0;
    }
    
    #search-form input {
        width: 100%;
    }
    
    .hero {
        padding: 60px 0;
    }
    
    .hero-content h2 {
        font-size: 28px;
    }
    
    .cta-content h2 {
        font-size: 24px;
    }
    
    .section-title {
        font-size: 24px;
    }
}

@media (max-width: 576px) {
    .comic-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-columns {
        grid-template-columns: 1fr;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero-content h2 {
        font-size: 24px;
    }
} 