/* Global Styles */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --dark-color: #1f2937;
    --light-color: #f3f4f6;
    --white: #ffffff;
    --text-dark: #111827;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--light-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-brand i {
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--primary-color);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

.btn-danger {
    background: var(--danger-color);
    color: var(--white);
}

.btn-info {
    background: #0ea5e9;
    color: var(--white);
}

.btn-info:hover {
    background: #0284c7;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-success {
    background: var(--success-color);
    color: var(--white);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-large {
    padding: 15px 30px;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.875rem;
}

/* Hero Section */
.hero {
    padding: 80px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: bold;
    line-height: 1.2;
    margin-bottom: 20px;
}

.gradient-text {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

.hero-stats {
    display: flex;
    gap: 30px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat i {
    font-size: 1.5rem;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.flipbook-demo {
    color: var(--white);
    opacity: 0.3;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* Features Section */
.features {
    padding: 80px 0;
    background: var(--white);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.section-header p {
    font-size: 1.2rem;
    color: var(--text-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    padding: 30px;
    background: var(--light-color);
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    color: var(--white);
    font-size: 2rem;
}

.feature-card h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.feature-card p {
    color: var(--text-light);
}

/* Pricing Section */
.pricing {
    padding: 80px 0;
    background: var(--light-color);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.pricing-card {
    background: var(--white);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.pricing-card.popular {
    border: 3px solid var(--primary-color);
    transform: scale(1.05);
}

.popular-badge {
    position: absolute;
    top: -15px;
    right: 20px;
    background: var(--primary-color);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: bold;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.pricing-card h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.price {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 20px 0;
}

.price .currency {
    font-size: 1.5rem;
}

.price .period {
    font-size: 1rem;
    color: var(--text-light);
}

.plan-description {
    color: var(--text-light);
    margin-bottom: 20px;
}

.features-list {
    list-style: none;
    margin: 30px 0;
    text-align: left;
}

.features-list li {
    padding: 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.features-list i {
    color: var(--success-color);
}

/* Top Viewed Flipbooks Section */
.top-flipbooks {
    padding: 80px 0;
    background: var(--bg-light);
}

.flipbooks-showcase-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.flipbook-showcase-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.flipbook-showcase-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.flipbook-showcase-image {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.flipbook-showcase-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.flipbook-placeholder {
    text-align: center;
    color: var(--text-light);
}

.flipbook-placeholder i {
    font-size: 3rem;
    margin-bottom: 10px;
    display: block;
}

.flipbook-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;
}

.flipbook-showcase-card:hover .flipbook-overlay {
    opacity: 1;
}

.flipbook-overlay span {
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 600;
    padding: 12px 24px;
    border: 2px solid var(--white);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.flipbook-showcase-card:hover .flipbook-overlay span {
    background: var(--white);
    color: var(--primary-color);
}

.flipbook-showcase-info {
    padding: 20px;
}

.flipbook-showcase-info h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--text-dark);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.flipbook-author {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.flipbook-stats {
    display: flex;
    gap: 15px;
    padding-top: 12px;
    border-top: 1px solid var(--bg-light);
    font-size: 0.85rem;
    color: var(--text-light);
}

.flipbook-stats span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Responsive for Top Flipbooks */
@media (max-width: 1024px) {
    .flipbooks-showcase-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .flipbooks-showcase-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .flipbook-showcase-image {
        height: 220px;
    }
}

@media (max-width: 480px) {
    .flipbooks-showcase-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .flipbook-showcase-image {
        height: 280px;
    }
    
    .top-flipbooks {
        padding: 60px 0;
    }
}

/* About Section */
.about {
    padding: 80px 0;
    background: var(--white);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-image {
    text-align: center;
    color: var(--primary-color);
    opacity: 0.2;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 20px;
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

.about-feature {
    display: flex;
    align-items: center;
    gap: 10px;
}

.about-feature i {
    color: var(--success-color);
    font-size: 1.2rem;
}

/* CTA Section */
.cta {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    text-align: center;
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.cta p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-section h4 {
    margin-bottom: 15px;
}

.footer-section p {
    opacity: 0.8;
}

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

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-section ul li a:hover {
    opacity: 1;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--white);
    text-decoration: none;
    transition: background 0.3s;
}

.social-links a:hover {
    background: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.8;
}

/* Auth Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.auth-box {
    background: var(--white);
    border-radius: 12px;
    padding: 40px;
    max-width: 500px;
    width: 100%;
    box-shadow: var(--shadow-lg);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--primary-color);
}

.auth-header p {
    color: var(--text-light);
}

.auth-form {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}

.form-group label i {
    margin-right: 5px;
    color: var(--primary-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background: var(--border-color);
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

.divider span {
    background: var(--white);
    padding: 0 10px;
    color: var(--text-light);
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
}

.auth-footer p {
    margin: 10px 0;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

/* Responsive Design */
/* Desktop (1200px+) - Base styles already set */

/* Tablet (768px - 1199px) */
@media (max-width: 1199px) {
    .container {
        max-width: 960px;
    }
    
    .stats-grid,
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pricing-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet Portrait (768px - 991px) */
@media (max-width: 991px) {
    .container {
        max-width: 720px;
    }
    
    .navbar .container {
        flex-wrap: wrap;
    }
    
    .hero-content,
    .about-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

/* Mobile (481px - 767px) */
@media (max-width: 767px) {
    .container {
        max-width: 100%;
        padding: 0 15px;
    }
    
    .navbar {
        padding: 0.75rem 0;
    }
    
    .nav-brand {
        font-size: 1.25rem;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        gap: 10px;
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }
    
    .hero {
        padding: 40px 0;
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .features-grid,
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .pricing-cards {
        grid-template-columns: 1fr;
    }
    
    .pricing-card.popular {
        transform: scale(1);
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .auth-card {
        padding: 30px 20px;
    }
    
    section {
        padding: 40px 0;
    }
}

/* Mobile Small (320px - 480px) */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }
    
    .nav-brand {
        font-size: 1.1rem;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .btn-large {
        padding: 12px 20px;
        font-size: 1rem;
    }
    
    .feature-card,
    .pricing-card {
        padding: 20px;
    }
    
    .pricing-price {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    .auth-card {
        padding: 20px 15px;
    }
    
    .form-group label {
        font-size: 0.9rem;
    }
    
    .form-control {
        padding: 10px;
        font-size: 0.95rem;
    }
}

/* Ensure images are responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Responsive tables */
@media (max-width: 767px) {
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}
