:root {
    --bg-primary: #ffffff;
    --bg-secondary: #837c7c;
    --bg-card: #e26a6a;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --accent-yellow: #f5c518;
    --accent-blue: #3498db;
    --accent-red: #e74c3c;
    --border-color: #333333;
}

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

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

a {
    text-decoration: none;
    color: inherit;
}

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

.header {
    background-color: var(--bg-secondary);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

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

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--accent-yellow);
}

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

.nav a {
    color: var(--text-secondary);
    transition: color 0.3s;
}

.nav a:hover {
    color: var(--accent-yellow);
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border-radius: 20px;
    padding: 5px 15px;
}

.search-box input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 5px 10px;
    outline: none;
    width: 200px;
}

.search-box button {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
    padding: 30px 0;
}

.movie-card {
    background: var(--bg-card);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.movie-poster {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
}

.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s, filter 0.3s;
}

.movie-card:hover .movie-poster img {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.quality-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent-yellow);
    color: #000;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: bold;
    border-radius: 4px;
    text-transform: uppercase;
}

.movie-info {
    padding: 15px;
}

.movie-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-category {
    font-size: 12px;
    color: var(--accent-blue);
}

.single-post {
    padding: 40px 0;
}

.single-post .thumbnail {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 30px;
}

.single-post h1 {
    font-size: 32px;
    margin-bottom: 20px;
    color: var(--accent-yellow);
}

.post-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.post-meta span {
    color: var(--text-secondary);
}

.post-content {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.post-content iframe {
    width: 100%;
    height: 450px;
    border: none;
    border-radius: 10px;
    margin: 20px 0;
}

.download-section {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 10px;
}

.download-section h3 {
    margin-bottom: 20px;
    color: var(--accent-yellow);
}

.download-btn {
    display: inline-block;
    background: var(--accent-red);
    color: #fff;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: bold;
    transition: background 0.3s;
}

.download-btn:hover {
    background: #c0392b;
}

.admin-header {
    background: var(--bg-secondary);
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h1 {
    color: var(--accent-yellow);
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: opacity 0.3s;
    display: inline-block;
}

.btn:hover {
    opacity: 0.8;
}

.btn-primary {
    background: var(--accent-blue);
    color: #fff;
}

.btn-danger {
    background: var(--accent-red);
    color: #fff;
}

.btn-success {
    background: #27ae60;
    color: #fff;
}

.admin-table {
    width: 100%;
    background: var(--bg-secondary);
    border-radius: 10px;
    overflow: hidden;
}

.admin-table th,
.admin-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    background: var(--bg-card);
    color: var(--accent-yellow);
}

.admin-table tr:hover {
    background: var(--bg-card);
}

.editor-form {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: 10px;
}

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

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-primary);
    font-size: 14px;
}

.form-group textarea {
    min-height: 300px;
    font-family: 'Courier New', monospace;
    resize: vertical;
}

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

.preview-section {
    margin-top: 30px;
}

.preview-toggle {
    background: var(--accent-blue);
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 20px;
}

.preview-frame {
    width: 100%;
    min-height: 400px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 20px;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: 10px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
}

.footer {
    background: var(--bg-secondary);
    padding: 30px 0;
    text-align: center;
    margin-top: 50px;
    border-top: 1px solid var(--border-color);
}

.footer p {
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .nav {
        display: none;
    }
    
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .search-box {
        display: none;
    }
}