* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #667eea;
    --text-color: #333;
    --text-light: #666;
    --light-bg: #f5f5f5;
    --white: #ffffff;
    --border: #ddd;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background: var(--light-bg);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: white;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    display: block;
}

@media (max-width: 768px) {
    header {
        display: none !important;
    }
}

@media (min-width: 769px) {
    header {
        display: block !important;
    }
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
}

.logo img {
    height: 40px;
    width: auto;
}

.logo .logo-text {
    display: none;
}

@media (min-width: 769px) {
    .logo .logo-text {
        display: inline;
    }
}

.nav-links {
    display: flex;
    gap: 20px;
    list-style: none;
    align-items: center;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
    padding: 8px;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu-content {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    max-width: 85%;
    height: 100%;
    background: white;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    padding: 20px;
    overflow-y: auto;
    z-index: 1001;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-menu-links a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.2s;
}

.mobile-menu-links a:hover {
    background: var(--light-bg);
}

.mobile-menu-links a i {
    font-size: 1.3rem;
    width: 24px;
    text-align: center;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 5px;
    transition: background 0.2s;
}

.nav-links a:hover {
    background: var(--light-bg);
}

.admin-link {
    background: var(--primary-color);
    color: white !important;
    padding: 8px 16px;
    border-radius: 5px;
}

.admin-link:hover {
    background: #5568d3;
}

/* Hero Section */
.hero {
    background: var(--primary-color);
    color: white;
    padding: 80px 0;
    text-align: center;
}

@media (max-width: 768px) {
    .hero {
        padding: 60px 20px;
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Categories */
.categories {
    padding: 60px 0;
    background: white;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
    color: var(--text-color);
    font-weight: 600;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.category-card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: border-color 0.2s;
}

.category-card:hover {
    border-color: var(--primary-color);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.category-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-color);
}

.category-card p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Content Section */
.content-section {
    padding: 60px 0;
    background: var(--light-bg);
}

.content-section:nth-child(even) {
    background: white;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.content-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: border-color 0.2s;
}

.content-item:hover {
    border-color: var(--primary-color);
}

.content-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.content-item-body {
    padding: 20px;
}

.content-item h4 {
    margin-bottom: 10px;
    color: var(--text-color);
    font-weight: 600;
    font-size: 1.1rem;
}

.content-item p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.content-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-light);
    font-size: 0.85rem;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-color);
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    transition: background 0.2s;
}

.btn:hover {
    background: #5568d3;
}

.btn-outline {
    background: white;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal.active[style*="z-index: 9999"] {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal.active[style*="z-index: 9999"] .modal-content {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 2px solid var(--primary-color);
}

.modal > div {
    background: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-light);
    padding: 5px;
}

.close-btn:hover {
    color: var(--text-color);
}

.video-player {
    width: 100%;
    height: 500px;
    border-radius: 5px;
    border: none;
}

/* Loading */
.loading {
    text-align: center;
    padding: 60px;
    font-size: 1.1rem;
    color: var(--text-light);
}

.loading::before {
    content: '';
    width: 50px;
    height: 50px;
    border: 4px solid var(--light-bg);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: block;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-light);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    display: block;
    color: var(--text-light);
    opacity: 0.5;
}

.empty-state p {
    font-size: 1.1rem;
}

/* Status Badges */
.status-live {
    background: #e74c3c;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    display: inline-block;
    font-size: 0.85rem;
}

.status-soon {
    background: #f39c12;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    display: inline-block;
    font-size: 0.85rem;
}

.status-scheduled {
    background: #3498db;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    display: inline-block;
    font-size: 0.85rem;
}

.status-done {
    background: #95a5a6;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    display: inline-block;
    font-size: 0.85rem;
    opacity: 0.7;
}

.content-item .btn {
    margin-top: 15px;
    width: 100%;
    font-size: 0.9rem;
}

/* Footer */
footer {
    background: var(--text-color);
    color: white;
    text-align: center;
    padding: 40px 0;
    margin-top: 60px;
}

footer p {
    margin: 8px 0;
    opacity: 0.9;
}

/* Bottom Navigation Bar for Mobile */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--border);
    z-index: 999;
    padding: 10px 0;
}

@media (max-width: 768px) {
    .bottom-nav {
        display: block;
    }
}

@media (min-width: 769px) {
    .bottom-nav {
        display: none !important;
    }
}

.bottom-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 500px;
    margin: 0 auto;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.7rem;
    padding: 8px 16px;
    border-radius: 5px;
    transition: color 0.2s;
    min-width: 60px;
}

.bottom-nav-item i {
    font-size: 1.4rem;
}

.bottom-nav-item.active {
    color: var(--primary-color);
}

.bottom-nav-item span {
    font-weight: 500;
    font-size: 0.65rem;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        background: var(--light-bg);
    }
    
    .container {
        padding: 0 16px;
        padding-bottom: 90px;
    }

    .hero {
        padding: 60px 20px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }

    .mobile-menu-btn {
        display: block;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .category-card {
        padding: 25px 20px;
    }

    .category-icon {
        font-size: 2.5rem;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .content-section {
        padding: 40px 0;
        padding-bottom: 100px;
    }

    .modal > div {
        width: 95%;
        padding: 20px;
        max-height: 95vh;
    }

    .video-player {
        height: 280px;
    }

    .content-item-body {
        padding: 15px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    footer {
        padding: 30px 20px;
        padding-bottom: 100px;
    }
    
    .categories {
        padding: 40px 0;
        border-radius: 20px 20px 0 0;
        margin-top: -20px;
    }
    
    .content-section {
        padding: 40px 0;
        border-radius: 20px 20px 0 0;
    }

    /* Subscription Section Mobile Styles */
    #subscriptions .container > div:first-child {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 15px;
    }

    #subscriptions .container > div:first-child > div {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    #subscriptions select {
        width: 100% !important;
        font-size: 0.9rem !important;
    }

    #subscriptions .btn {
        width: 100% !important;
        padding: 12px !important;
    }

    /* Subscription Cards Mobile */
    #subscriptions .content-item {
        margin-bottom: 15px;
    }

    #subscriptions .content-item img {
        height: 180px !important;
    }

    #subscriptions .content-item h3 {
        font-size: 1.1rem !important;
        margin-bottom: 10px;
    }

    #subscriptions .content-item p {
        font-size: 0.9rem !important;
        line-height: 1.5;
    }

    /* Subscription Price Display Mobile */
    #subscriptions .content-item > div:last-of-type {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
        padding: 12px !important;
    }

    #subscriptions .content-item > div:last-of-type > span:first-child {
        font-size: 1rem !important;
    }

    #subscriptions .content-item > div:last-of-type > span:last-child {
        font-size: 0.85rem !important;
    }

    /* Category Badges Mobile */
    #subscriptions .content-item > div:nth-last-child(2) {
        flex-wrap: wrap;
        gap: 8px;
    }

    #subscriptions .content-item > div:nth-last-child(2) > span {
        font-size: 0.75rem !important;
        padding: 3px 8px !important;
    }

    /* Featured/Owned Badges Mobile */
    #subscriptions .content-item > div[style*="position: absolute"] {
        font-size: 0.65rem !important;
        padding: 3px 8px !important;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 0.9rem;
    }

    .logo img {
        height: 32px;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .category-card {
        padding: 20px 15px;
    }

    .category-icon {
        font-size: 2rem;
    }

    .modal > div {
        width: 100%;
        border-radius: 0;
        padding: 16px;
    }

    .video-player {
        height: 220px;
    }

    .content-item img {
        height: 180px;
    }

    /* Subscription Section Extra Small Mobile */
    #subscriptions .section-title {
        font-size: 1.3rem !important;
    }

    #subscriptions .container > div:first-child {
        margin-bottom: 20px !important;
    }

    #subscriptions .content-item img {
        height: 150px !important;
    }

    #subscriptions .content-item h3 {
        font-size: 1rem !important;
    }

    #subscriptions .content-item p {
        font-size: 0.85rem !important;
    }

    #subscriptions .content-item > div:last-of-type > span:first-child {
        font-size: 0.95rem !important;
    }

    /* Subscription Modal Mobile */
    #subscriptions .modal > div {
        padding: 16px !important;
    }

    /* Category Group Headers Mobile */
    #subscriptions h3[style*="fontSize"] {
        font-size: 1.2rem !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 5px !important;
    }
}
