* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #c0392b;
    --secondary-color: #e74c3c;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --text-color: #34495e;
    --border-color: #bdc3c7;
}

body {
    font-family: 'Hind', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo h1 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.logo span {
    color: var(--warning-color);
}

.tagline {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Navigation */
.nav-menu ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: rgba(255,255,255,0.2);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.news-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.news-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

.video-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 5px;
    font-size: 0.75rem;
}

.news-content {
    padding: 1.5rem;
}

.news-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--dark-color);
    line-height: 1.4;
}

.news-excerpt {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.news-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    color: #888;
}

.news-meta i {
    margin-right: 0.25rem;
}

.category-tag {
    background: var(--primary-color);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.7rem;
}

/* News Actions */
.news-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 5px;
    transition: all 0.3s;
    color: var(--text-color);
}

.action-btn:hover {
    background: var(--light-color);
}

.like-btn.active i {
    color: var(--danger-color);
}

.read-more {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 5px;
}

.read-more:hover {
    background: var(--secondary-color);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.page-link {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-color);
    border-radius: 5px;
    transition: all 0.3s;
}

.page-link:hover,
.page-link.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 20px;
    width: 90%;
    max-width: 800px;
    border-radius: 10px;
    position: relative;
    max-height: 90%;
    overflow-y: auto;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
}

.close:hover {
    color: black;
}

/* Dashboard Styles */
.dashboard-header {
    background: linear-gradient(135deg, var(--dark-color), var(--primary-color));
    color: white;
    padding: 1rem 0;
}

.dashboard-nav {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.dashboard-nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.2);
    border-radius: 5px;
    transition: all 0.3s;
}

.dashboard-nav a:hover {
    background: rgba(255,255,255,0.3);
}

.btn-primary {
    background: var(--success-color) !important;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.stat-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

/* Chart Container */
.chart-container {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* News List */
.news-list-container {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.news-item {
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.news-item:last-child {
    border-bottom: none;
}

.news-info {
    flex: 1;
}

.news-info h4 {
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.news-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    margin: 0.5rem 0;
}

.earnings-info {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
}

.ad-impressions {
    color: var(--warning-color);
}

.revenue {
    color: var(--success-color);
    font-weight: bold;
}

.news-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-edit, .btn-view, .btn-delete {
    padding: 0.25rem 0.75rem;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.85rem;
}

.btn-edit {
    background: var(--warning-color);
    color: white;
}

.btn-view {
    background: var(--primary-color);
    color: white;
}

.btn-delete {
    background: var(--danger-color);
    color: white;
    border: none;
    cursor: pointer;
}

/* Upload Form Styles */
.upload-header {
    background: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.back-btn {
    color: var(--primary-color);
    text-decoration: none;
    margin-bottom: 1rem;
    display: inline-block;
}

.upload-main {
    padding: 2rem 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.required {
    color: var(--danger-color);
}

.form-group input[type="text"],
.form-group input[type="file"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: inherit;
}

.recorder-container {
    background: #000;
    border-radius: 10px;
    overflow: hidden;
}

.recorder-controls {
    padding: 1rem;
    display: flex;
    gap: 1rem;
}

.btn-record, .btn-stop {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
}

.btn-record {
    background: var(--danger-color);
    color: white;
}

.btn-stop {
    background: var(--dark-color);
    color: white;
}

.recording-active {
    background: var(--danger-color);
    color: white;
    padding: 0.5rem;
    text-align: center;
    animation: pulse 1s infinite;
}

.recording-complete {
    background: var(--success-color);
    color: white;
    padding: 0.5rem;
    text-align: center;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-submit, .btn-reset {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
}

.btn-submit {
    background: var(--success-color);
    color: white;
}

.btn-reset {
    background: var(--light-color);
    color: var(--text-color);
}

/* Alert Messages */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.alert.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 3rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
        position: absolute;
        top: 20px;
        right: 20px;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-color);
        padding: 1rem;
    }
    
    .nav-menu.active {
        display: block;
    }
    
    .nav-menu ul {
        flex-direction: column;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .news-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .form-actions {
        flex-direction: column;
    }
}