/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #707070;
    --accent: #4a9eff;
    --accent-hover: #3d8bdb;
    --border: #333333;
    --border-light: #404040;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navigation */
.navbar {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

/* Main content */
.main-content {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

/* Home split layout */
.home-split {
    display: flex;
    height: calc(100vh - 140px);
    gap: 0;
}

.home-half {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.home-photo {
    background-color: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.latest-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.home-photo:hover .photo-overlay {
    opacity: 1;
}

.home-photo:hover .latest-photo {
    transform: scale(1.05);
}

.overlay-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
}

.overlay-link:hover {
    text-decoration: underline;
}


.empty-content {
    text-align: center;
    color: var(--text-secondary);
}

.empty-content p {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.empty-content a {
    color: var(--accent);
    text-decoration: none;
}

.empty-content a:hover {
    text-decoration: underline;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--accent);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.btn:hover {
    background-color: var(--accent-hover);
}

.btn-secondary {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border);
}

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

/* Home sections */
.home-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.section {
    background-color: var(--bg-secondary);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.section h2 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.section a {
    color: var(--accent);
    text-decoration: none;
}

.section a:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    margin-top: auto;
}

/* Responsive design */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .main-content {
        padding: 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-links {
        flex-direction: column;
        align-items: center;
    }

    .home-sections {
        grid-template-columns: 1fr;
        margin-top: 2rem;
    }
}

/* Page headers */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Blog styles */
.blog-posts {
    max-width: 800px;
    margin: 0 auto;
}

.blog-post-preview {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: border-color 0.2s ease;
}

.blog-post-preview:hover {
    border-color: var(--border-light);
}

.blog-post-preview h2 {
    margin-bottom: 0.5rem;
}

.blog-post-preview h2 a {
    color: var(--text-primary);
    text-decoration: none;
}

.blog-post-preview h2 a:hover {
    color: var(--accent);
}

.post-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.post-excerpt {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.read-more {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.read-more:hover {
    text-decoration: underline;
}

/* Individual blog post */
.blog-post {
    max-width: 800px;
    margin: 0 auto;
}

.post-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.post-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.post-content {
    line-height: 1.8;
    margin-bottom: 3rem;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content a {
    color: var(--accent);
    text-decoration: none;
}

.post-content a:hover {
    text-decoration: underline;
}

.post-content pre {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.post-content code {
    background-color: var(--bg-tertiary);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9rem;
}

.post-content pre code {
    background: none;
    padding: 0;
}

.post-footer {
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.back-link {
    color: var(--accent);
    text-decoration: none;
}

.back-link:hover {
    text-decoration: underline;
}

/* Photo blog layout */
.photo-blog {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0;
}

.photo-post {
    margin-bottom: 4rem;
}

.photo-container {
    background-color: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    cursor: zoom-in;
}

.photo-full {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.photo-container:hover .photo-full {
    transform: scale(1.02);
}


/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    animation: zoomIn 0.3s ease;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: white;
    font-size: 3rem;
    font-weight: 300;
    cursor: pointer;
    z-index: 1001;
    transition: opacity 0.2s ease;
}

.lightbox-close:hover {
    opacity: 0.7;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Links page */
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.link-category h2 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.links-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.link-item {
    display: block;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    text-decoration: none;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.link-item:hover {
    border-color: var(--accent);
    background-color: var(--bg-tertiary);
}

.link-title {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.link-description {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Empty states */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-state h2 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2rem;
    }

    .post-header h1 {
        font-size: 2rem;
    }

    .blog-post-preview,
    .section {
        padding: 1.5rem;
    }

    .photo-blog {
        padding: 1rem 0;
    }

    .photo-post {
        margin-bottom: 2rem;
    }

    .lightbox-close {
        top: 15px;
        right: 20px;
        font-size: 2rem;
    }

    .links-grid {
        grid-template-columns: 1fr;
    }
}

/* Admin styles */
.admin-container {
    max-width: 1000px;
    margin: 0 auto;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.admin-header-actions {
    display: flex;
    gap: 1rem;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.admin-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
}

.admin-card h2 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.admin-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.admin-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.stats {
    display: flex;
    gap: 2rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 600;
    color: var(--accent);
}

.stat-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Login form */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.login-form {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 3rem;
    width: 100%;
    max-width: 400px;
}

.login-form h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
}

.btn-primary {
    width: 100%;
    background-color: var(--accent);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

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

.error-message {
    background-color: #dc3545;
    color: white;
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Admin content management */
.posts-list, .photos-grid {
    margin-top: 2rem;
}

.post-item {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.post-info h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.post-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.status {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status.published {
    background-color: #28a745;
    color: white;
}

.status.draft {
    background-color: #ffc107;
    color: #000;
}

.date {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.post-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

/* Post form */
.post-form {
    max-width: 800px;
    margin-top: 2rem;
}

.post-form textarea {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    resize: vertical;
}

.post-form textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.post-form small {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.post-form small a {
    color: var(--accent);
    text-decoration: none;
}

.post-form small a:hover {
    text-decoration: underline;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Photo management */
.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.photo-admin-item {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.photo-admin-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.photo-admin-info {
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.photo-date {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Upload form */
.upload-form {
    max-width: 600px;
    margin-top: 2rem;
}

.upload-form input[type="file"] {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--bg-secondary);
    border: 2px dashed var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    cursor: pointer;
}

.upload-form input[type="file"]:hover {
    border-color: var(--accent);
}

.upload-preview {
    margin-top: 2rem;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.preview-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border);
}

/* Admin settings */
.settings-form {
    max-width: 500px;
    margin-bottom: 3rem;
}

.settings-info {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
    max-width: 500px;
}

.settings-info h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.settings-info p {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.success-message {
    background-color: #28a745;
    color: white;
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    text-align: center;
}

@media (max-width: 768px) {
    .home-split {
        flex-direction: column;
        height: auto;
    }

    .home-half {
        min-height: 50vh;
    }


    .admin-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .admin-grid {
        grid-template-columns: 1fr;
    }

    .stats {
        justify-content: center;
    }

    .login-form {
        padding: 2rem;
        margin: 1rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 0.5rem;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .home-half {
        min-height: 40vh;
    }

    .section,
    .blog-post-preview {
        padding: 1.5rem;
    }


    .admin-actions {
        flex-direction: column;
    }
}

/* Cover Photos Styling */
.cover-photos-section {
    background-color: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
}

.cover-photos-section h2 {
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.photo-admin-item.cover-photo {
    position: relative;
    border: 2px solid var(--accent);
    box-shadow: 0 0 10px rgba(74, 158, 255, 0.3);
}

.cover-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background-color: var(--accent);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.photo-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

.success-message {
    background-color: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.3);
    color: #28a745;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.error-message {
    background-color: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #dc3545;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}