@import url('https://fonts.googleapis.com/css2?family=Elsie&display=swap');

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #001935;
    color: #fff;
    line-height: 1.6;
    padding-bottom: 60px;
    padding-top: 0;
}

body.logged-in {
    padding-top: 85px;
}

.header {
    background: #001935;
    padding: 10px 15px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    gap: 6px;
}

.header.visible {
    transform: translateY(0);
}

.header.always-visible {
    position: sticky;
    transform: translateY(0);
}

.header h1 {
    font-size: 24px;
    font-weight: bold;
    letter-spacing: -1px;
    align-self: center;
    font-family: 'Elsie', serif;
}

.user-info {
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    align-self: stretch;
    flex: none;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
}

.user-info > * {
    flex-shrink: 0;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    padding: 5px 10px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 12px;
}

.login-form {
    max-width: 400px;
    margin: 50px auto;
    padding: 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.login-form h2 {
    text-align: center;
    margin-bottom: 30px;
}

.container {
    max-width: 540px;
    margin: 0 auto;
    padding: 10px;
}

.post-types {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 10px 0;
}

.post-type-btn {
    flex-shrink: 0;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 20px;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.post-type-btn:active {
    transform: scale(0.95);
}

.post-type-btn.active {
    background: #00cf35;
}

.create-post {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    display: none;
}

.create-post.active {
    display: block;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    opacity: 0.8;
}

.form-group input[type="text"],
.form-group input[type="url"],
.form-group input[type="date"],
.form-group input[type="password"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
}

.form-group input[type="file"] {
    width: 100%;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
}

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

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.submit-btn {
    background: #00cf35;
    color: #000;
    border: none;
    padding: 12px 30px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
}

.submit-btn:active {
    transform: scale(0.98);
}

.post {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
}

.post-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
}

.post-content {
    margin-bottom: 15px;
}

.post-image {
    width: 100%;
    border-radius: 8px; /*put 0 if you want to remove rounded corners from images*/
    margin-bottom: 10px;
}

.post-video {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 10px;
    max-height: 500px;
}

.admin-notes {
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid #00cf35;
    padding: 10px;
    margin-top: 10px;
    font-size: 14px;
    opacity: 0.8;
}

.admin-notes-label {
    font-weight: bold;
    margin-bottom: 5px;
    color: #00cf35;
}

.quote {
    font-size: 24px;
    font-style: italic;
    margin-bottom: 10px;
    line-height: 1.3;
}

.quote-source {
    opacity: 0.7;
    font-size: 14px;
}

.link-preview {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    text-decoration: none;
    color: #fff;
    display: block;
}

.link-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.link-description {
    font-size: 14px;
    opacity: 0.8;
}

.link-url {
    font-size: 12px;
    opacity: 0.6;
    margin-top: 5px;
}

.post-footer {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
}

.post-date {
    font-size: 14px;
    opacity: 0.7;
    color: #00cf35;
}

.tags {
    font-size: 14px;
    opacity: 0.7;
    flex: 1;
}

.tag {
    color: #00cf35;
    margin-right: 10px;
    display: inline-block;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s;
}

.tag:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.pagination {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.page-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 20px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.page-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.page-btn.active {
    background: #00cf35;
    color: #000;
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tags-help {
    font-size: 12px;
    opacity: 0.6;
    margin-top: 5px;
}

.error {
    color: #ff6b6b;
    margin-bottom: 15px;
    text-align: center;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #001935;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

.modal-title {
    font-size: 20px;
    font-weight: bold;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    opacity: 1;
}

.edit-btn, .share-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    padding: 5px 10px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 12px;
    opacity: 0.7;
    transition: all 0.2s;
}

.edit-btn:hover, .share-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

.share-btn.copied {
    background: #00cf35;
    opacity: 1;
}

@media (max-width: 600px) {
    .container {
        padding: 5px;
    }

    .post {
        border-radius: 0;
        margin-bottom: 10px;
    }

    .header {
        gap: 10px;
    }

    .header h1 {
        flex-shrink: 0;
    }
}

/* Collection styles */
.form-group select {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
}

.form-group select option {
    background: #001935;
    color: #fff;
    padding: 8px;
}

.collection-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.collection-filter {
    margin-bottom: 20px;
}

.collection-filter select {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}

.collection-filter select option {
    background: #001935;
    color: #fff;
}

/* Collection tag hover effect */
.collection-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

/* Remove rounding corners from images 
.post .post-content .post-image {
    border-radius: 0 !important;
}

.post .post-content .post-video {
    border-radius: 0 !important;
}

*/
/* Filters Section */
.filters-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.filters-form {
    width: 100%;
}

.filter-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 15px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
}

.filter-group select,
.filter-group input[type="text"] {
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    transition: all 0.2s;
}

.filter-group select:focus,
.filter-group input[type="text"]:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: #00cf35;
    outline: none;
}

.filter-group select {
    cursor: pointer;
}

.filter-group select option {
    background: #001935;
    color: #fff;
}

.filter-actions {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.filter-btn {
    padding: 10px 20px;
    background: #00cf35;
    color: #000;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: #00a82a;
    transform: translateY(-1px);
}

.clear-btn {
    padding: 10px 20px;
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    border: 1px solid #dc3545;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-block;
}

.clear-btn:hover {
    background: rgba(220, 53, 69, 0.3);
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .filter-row {
        grid-template-columns: 1fr;
    }

    .filter-actions {
        flex-direction: column;
        width: 100%;
    }

    .filter-btn,
    .clear-btn {
        width: 100%;
        text-align: center;
    }
}

/* Filter Results */
.filter-results {
    background: rgba(0, 207, 53, 0.1);
    border: 1px solid rgba(0, 207, 53, 0.3);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
}

.filter-results p {
    margin: 0;
    font-size: 14px;
    color: #00cf35;
}

.filter-results strong {
    font-weight: 600;
}
