:root {
    --primary-color: #3b82f6;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --dark-color: #1f2937;
    --light-color: #f3f4f6;
    --text-color: #374151;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text-color);
    background-color: #fafbfc;
    line-height: 1.6;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

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

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

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

.navbar-brand {
    display: flex;
    align-items: center;
    font-weight: bold;
    font-size: 20px;
    color: var(--dark-color);
}

.navbar-brand i {
    margin-right: 10px;
    color: var(--primary-color);
}

.navbar-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.navbar-menu a {
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

.navbar-menu a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.btn-login, .btn-admin {
    background: var(--primary-color);
    color: white !important;
    padding: 8px 16px;
    border-radius: 6px;
    transition: background 0.3s;
}

.btn-login:hover, .btn-admin:hover {
    background: #2563eb;
    text-decoration: none;
}

.btn-logout {
    background: var(--danger-color);
    color: white !important;
    padding: 8px 16px;
    border-radius: 6px;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--dark-color);
    margin: 5px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #8b5cf6 100%);
    color: white;
    padding: 80px 20px;
    text-align: center;
}

.hero-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.9;
}

.hero-search {
    display: flex;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
}

.search-btn {
    padding: 15px 30px;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.search-btn:hover {
    background: #059669;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}

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

.btn-primary:hover {
    background: #2563eb;
    text-decoration: none;
}

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

.btn-success:hover {
    background: #059669;
    text-decoration: none;
}

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

.btn-warning:hover {
    background: #d97706;
    text-decoration: none;
}

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

.btn-danger:hover {
    background: #dc2626;
    text-decoration: none;
}

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

.btn-download:hover {
    background: #2563eb;
}

.btn-paypal {
    background: #0070ba;
    color: white;
}

.btn-paypal:hover {
    background: #005ea6;
}

.btn-block {
    width: 100%;
}

.btn-large {
    padding: 16px 32px;
    font-size: 18px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 14px;
}

.btn-secondary {
    background: var(--border-color);
    color: var(--text-color);
}

.btn-secondary:hover {
    background: #d1d5db;
    text-decoration: none;
}

/* Projects Section */
.projects-section {
    padding: 80px 20px;
}

.projects-section h2 {
    font-size: 36px;
    margin-bottom: 40px;
    color: var(--dark-color);
}

.filters {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    color: var(--text-color);
}

.filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.filter-btn:hover {
    border-color: var(--primary-color);
}

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

.project-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.project-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--light-color);
}

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

.badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 12px;
}

.badge-free {
    background: var(--secondary-color);
    color: white;
}

.badge-paid {
    background: var(--warning-color);
    color: white;
}

.badge.large {
    padding: 10px 20px;
    font-size: 14px;
}

.project-content {
    padding: 20px;
}

.project-content h3 {
    margin-bottom: 10px;
    font-size: 18px;
    color: var(--dark-color);
}

.project-description {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.project-meta {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 12px;
    color: #9ca3af;
}

.project-meta i {
    margin-right: 5px;
}

.no-projects {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
    font-size: 18px;
}

/* Project Detail */
.breadcrumb {
    background: var(--light-color);
    padding: 15px 20px;
}

.breadcrumb a {
    color: var(--primary-color);
}

.project-detail {
    padding: 60px 20px;
}

.project-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.project-image-main {
    position: relative;
}

.project-image-main img {
    width: 100%;
    border-radius: 8px;
}

.project-info h1 {
    font-size: 36px;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.project-full-description {
    color: #6b7280;
    margin-bottom: 30px;
    line-height: 1.8;
}

.project-metadata {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 40px;
    padding: 20px;
    background: var(--light-color);
    border-radius: 6px;
}

.meta-item {
    display: flex;
    flex-direction: column;
}

.meta-item .label {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 5px;
}

.meta-item .value {
    color: #6b7280;
}

.downloads-section {
    margin: 40px 0;
}

.downloads-section h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.download-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.download-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--light-color);
    border-radius: 6px;
    border-left: 4px solid var(--primary-color);
}

.download-info {
    flex: 1;
}

.download-platform {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    margin-bottom: 5px;
}

.download-platform i {
    font-size: 24px;
    color: var(--primary-color);
}

.download-count {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #6b7280;
    font-size: 14px;
}

.download-count i {
    color: var(--secondary-color);
}

.purchase-section,
.support-section {
    background: var(--light-color);
    padding: 30px;
    border-radius: 8px;
    margin: 40px 0;
}

.purchase-section h3,
.support-section h3 {
    margin-bottom: 10px;
    color: var(--dark-color);
}

.purchase-section p,
.support-section p {
    margin-bottom: 20px;
    color: #6b7280;
}

.screenshots-section {
    margin-top: 60px;
}

.screenshots-section h2 {
    font-size: 28px;
    margin-bottom: 30px;
    color: var(--dark-color);
}

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

.screenshot-item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.screenshot-item img {
    width: 100%;
    display: block;
}

.screenshot-caption {
    padding: 12px;
    background: white;
    color: #6b7280;
    font-size: 14px;
}


/* Admin Styles */
.admin-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 0;
    min-height: 80vh;
}

.admin-sidebar {
    background: var(--dark-color);
    color: white;
    padding: 20px;
}

.admin-nav ul {
    list-style: none;
}

.admin-nav li {
    margin-bottom: 10px;
}

.admin-nav a {
    display: block;
    padding: 12px 16px;
    color: #d1d5db;
    border-radius: 6px;
    transition: all 0.3s;
}

.admin-nav a:hover,
.admin-nav a.active {
    background: var(--primary-color);
    color: white;
    text-decoration: none;
}

.admin-nav i {
    margin-right: 10px;
    width: 20px;
}

.admin-content {
    padding: 40px;
    background: white;
}

.admin-content h1 {
    margin-bottom: 30px;
    color: var(--dark-color);
}

.admin-content h2 {
    margin-top: 30px;
    margin-bottom: 20px;
    color: var(--dark-color);
    font-size: 22px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.stat-card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
    border-top: 4px solid var(--primary-color);
}

.stat-card i {
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.stat-card h3 {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark-color);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: var(--shadow);
    border-radius: 8px;
    overflow: hidden;
}

.admin-table thead {
    background: var(--light-color);
}

.admin-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--dark-color);
    border-bottom: 2px solid var(--border-color);
}

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

.admin-table tr:hover {
    background: var(--light-color);
}

.btn-small {
    display: inline-block;
    padding: 6px 12px;
    margin-right: 5px;
    border-radius: 4px;
    background: var(--primary-color);
    color: white;
    font-size: 12px;
    transition: background 0.3s;
}

.btn-small:hover {
    background: #2563eb;
    text-decoration: none;
}

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

.btn-small.btn-danger:hover {
    background: #dc2626;
}

/* Forms */
.admin-form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    max-width: 600px;
}

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

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

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

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #6b7280;
    font-size: 12px;
}

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

/* Login */
.admin-login {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    max-width: 400px;
    width: 100%;
}

.login-box h1 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--dark-color);
}

.login-box i {
    margin-right: 10px;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-color: var(--secondary-color);
}

.alert-danger {
    background: #fee2e2;
    color: #7f1d1d;
    border-color: var(--danger-color);
}

/* Payment Status */
.payment-status {
    padding: 80px 20px;
    text-align: center;
}

.status-message {
    background: white;
    padding: 60px;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    margin: 0 auto;
}

.status-message i {
    font-size: 64px;
    margin-bottom: 20px;
}

.status-message.success {
    border-top: 4px solid var(--secondary-color);
}

.status-message.success i {
    color: var(--secondary-color);
}

.status-message.cancelled {
    border-top: 4px solid var(--warning-color);
}

.status-message.cancelled i {
    color: var(--warning-color);
}

.status-message h1 {
    margin-bottom: 15px;
    color: var(--dark-color);
}

.status-message p {
    color: #6b7280;
    margin-bottom: 10px;
}

.status-message .btn {
    margin-top: 20px;
}

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

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

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

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

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

.footer-section a {
    color: #d1d5db;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
    text-decoration: none;
}

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

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

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

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #9ca3af;
}

/* Settings */
.settings-form {
    max-width: 100%;
}

.settings-section {
    margin-bottom: 40px;
}

.settings-info {
    background: var(--light-color);
    padding: 30px;
    border-radius: 8px;
    max-width: 600px;
}

.info-box p {
    margin-bottom: 10px;
}

.purchase-page {
    padding: 60px 20px;
}

.purchase-page h1 {
    margin-bottom: 40px;
    color: var(--dark-color);
}

.purchase-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 900px;
}

.purchase-details,
.payment-methods {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

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

.order-item img {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    object-fit: cover;
}

.item-details {
    flex: 1;
}

.item-details h3 {
    margin-bottom: 5px;
}

.item-details p {
    color: #6b7280;
    font-size: 14px;
}

.price {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 18px;
}

.order-total {
    display: flex;
    justify-content: space-between;
    padding: 20px;
    background: var(--light-color);
    border-radius: 6px;
    font-weight: 600;
    font-size: 18px;
    color: var(--dark-color);
}

.total-amount {
    color: var(--primary-color);
}

.payment-secure {
    text-align: center;
    color: #6b7280;
    margin-top: 20px;
    font-size: 14px;
}

.payment-secure i {
    margin-right: 5px;
    color: var(--secondary-color);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 36px;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .project-hero {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .navbar-menu {
        gap: 15px;
    }
    
    .admin-container {
        grid-template-columns: 1fr;
    }
    
    .admin-sidebar {
        display: none;
    }
    
    .purchase-container {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .download-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .hamburger {
        display: flex;
    }
    
    .navbar-menu {
        display: none;
    }
}

/* Image Gallery Lightbox */
.gallery-img {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-img:hover {
    transform: scale(1.03);
}

.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeInLightbox 0.3s ease;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeInLightbox {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    animation: zoomInImage 0.3s ease;
}

@keyframes zoomInImage {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.lightbox-caption {
    color: white;
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    transition: transform 0.2s ease;
    z-index: 10000;
    line-height: 1;
}

.lightbox-close:hover {
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 30px;
    cursor: pointer;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    transition: background 0.2s ease;
    user-select: none;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 20px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

/* Responsive gallery lightbox */
@media (max-width: 768px) {
    .lightbox-nav {
        font-size: 24px;
        padding: 8px 12px;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-image {
        max-height: 75vh;
    }
}
