/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 100%);
    color: #e6e6e6;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
.header {
    background: linear-gradient(135deg, #0f3460 0%, #1a1a2e 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo span {
    color: #4cc9f0;
    margin-left: 5px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: #e6e6e6;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.3s;
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

.nav-menu a:hover {
    color: #4cc9f0;
    background: rgba(76, 201, 240, 0.1);
}

.admin-btn {
    background: linear-gradient(45deg, #4361ee, #4cc9f0);
    color: white !important;
    padding: 0.5rem 1.5rem !important;
    border-radius: 25px;
}

.admin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.4);
}

/* Hero Section */
.hero {
    padding: 5rem 0;
    text-align: center;
    background: linear-gradient(rgba(15, 52, 96, 0.8), rgba(26, 26, 46, 0.9)), url('https://images.unsplash.com/photo-1511512578047-dfb367046420?ixlib=rb-4.0.3&auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #4cc9f0, #4361ee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.2rem;
    color: #b8b8b8;
    max-width: 600px;
    margin: 0 auto;
}

/* Post Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.post-card {
    background: rgba(15, 52, 96, 0.3);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(76, 201, 240, 0.1);
}

.post-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    border-color: rgba(76, 201, 240, 0.3);
}

.post-image {
    height: 200px;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.post-card:hover .post-image img {
    transform: scale(1.05);
}

.post-content {
    padding: 1.5rem;
}

.post-content h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.post-content h3 a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s;
}

.post-content h3 a:hover {
    color: #4cc9f0;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #b8b8b8;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.post-content p {
    color: #000000;
    margin-bottom: 1.5rem;
}

.read-more {
    display: inline-block;
    color: #4cc9f0;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border: 2px solid #4cc9f0;
    border-radius: 25px;
    transition: all 0.3s;
}

.read-more:hover {
    background: #4cc9f0;
    color: #0f0f23;
}

/* Single Post */
.single-post {
    background: rgba(15, 52, 96, 0.2);
    border-radius: 15px;
    padding: 3rem;
    margin: 3rem auto;
    max-width: 800px;
    border: 1px solid rgba(76, 201, 240, 0.1);
}

.post-header {
    text-align: center;
    margin-bottom: 2rem;
}

.post-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: #fff;
}

.post-image-large {
    margin: 2rem 0;
    border-radius: 10px;
    overflow: hidden;
}

.post-image-large img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    margin: 2rem 0;
    color: #d1d1d1;
}

.post-details {
    background: rgba(15, 52, 96, 0.4);
    border-radius: 10px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.post-details h3 {
    color: #4cc9f0;
    margin-bottom: 1rem;
}

.post-details ul {
    list-style: none;
}

.post-details li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(76, 201, 240, 0.1);
}

.post-details li:last-child {
    border-bottom: none;
}

.back-link {
    text-align: center;
    margin-top: 2rem;
}

.back-link a {
    color: #4cc9f0;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.back-link a:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    background: #0a0a15;
    padding: 2rem 0;
    text-align: center;
    margin-top: 4rem;
    border-top: 1px solid rgba(76, 201, 240, 0.1);
}

.footer p {
    color: #b8b8b8;
}

/* Admin Styles */
.admin-body {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
}

.admin-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: rgba(15, 52, 96, 0.8);
    padding: 2rem 0;
    position: fixed;
    height: 100%;
}

.sidebar-header {
    padding: 0 1.5rem 2rem;
    border-bottom: 1px solid rgba(76, 201, 240, 0.2);
}

.sidebar-header h2 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.sidebar-header p {
    color: #b8b8b8;
    font-size: 0.9rem;
}

.sidebar-nav ul {
    list-style: none;
    padding: 1rem 0;
}

.sidebar-nav li {
    margin-bottom: 0.5rem;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: #b8b8b8;
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-nav a:hover,
.sidebar-nav li.active a {
    background: rgba(76, 201, 240, 0.1);
    color: #4cc9f0;
    border-left: 4px solid #4cc9f0;
}

.admin-main {
    flex: 1;
    margin-left: 250px;
    padding: 2rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(76, 201, 240, 0.1);
}

.admin-header h1 {
    color: #fff;
    font-size: 2rem;
}

.view-site {
    background: linear-gradient(45deg, #4361ee, #4cc9f0);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.view-site:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.4);
}

/* Dashboard Cards */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.card {
    background: rgba(15, 52, 96, 0.3);
    border-radius: 15px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s;
    border: 1px solid rgba(76, 201, 240, 0.1);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.card-content h3 {
    color: #b8b8b8;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.card-number {
    color: #4cc9f0;
    font-size: 2rem;
    font-weight: 700;
}

/* Admin Tables */
.recent-posts {
    background: rgba(15, 52, 96, 0.3);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid rgba(76, 201, 240, 0.1);
}

.recent-posts h2 {
    color: #fff;
    margin-bottom: 1.5rem;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table thead {
    background: rgba(76, 201, 240, 0.1);
}

.admin-table th {
    padding: 1rem;
    text-align: left;
    color: #4cc9f0;
    font-weight: 600;
    border-bottom: 2px solid rgba(76, 201, 240, 0.2);
}

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(76, 201, 240, 0.1);
    color: #d1d1d1;
}

.admin-table tr:hover {
    background: rgba(76, 201, 240, 0.05);
}

.btn-view {
    background: rgba(76, 201, 240, 0.1);
    color: #4cc9f0;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.btn-view:hover {
    background: rgba(76, 201, 240, 0.2);
}

.no-data {
    text-align: center;
    color: #b8b8b8;
    padding: 2rem;
}

/* Form Styles */
.post-form {
    background: rgba(15, 52, 96, 0.3);
    border-radius: 15px;
    padding: 2rem;
    border: 1px solid rgba(76, 201, 240, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: #e6e6e6;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #4cc9f0;
    box-shadow: 0 0 0 3px rgba(76, 201, 240, 0.2);
}

textarea.form-control {
    resize: vertical;
    min-height: 150px;
}

/* File Upload */
.file-upload {
    position: relative;
}

.file-input {
    position: absolute;
    left: -9999px;
}

.file-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(76, 201, 240, 0.1);
    color: #4cc9f0;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px dashed rgba(76, 201, 240, 0.3);
}

.file-label:hover {
    background: rgba(76, 201, 240, 0.2);
    border-color: #4cc9f0;
}

.file-name {
    margin-left: 1rem;
    color: #b8b8b8;
    font-size: 0.9rem;
}

/* Buttons */
.btn-submit {
    background: linear-gradient(45deg, #4361ee, #4cc9f0);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-submit:hover {
    background: linear-gradient(45deg, #3a56d4, #3db8d8);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.4);
}

/* Messages */
.message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 500;
}

.message.success {
    background: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.2);
}

.message.error {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .single-post {
        padding: 1.5rem;
        margin: 1.5rem auto;
    }
    
    .admin-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    
    .admin-main {
        margin-left: 0;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .admin-table {
        display: block;
        overflow-x: auto;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-card,
.single-post,
.card {
    animation: fadeIn 0.5s ease-out;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 52, 96, 0.3);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #4361ee, #4cc9f0);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #3a56d4, #3db8d8);
}