:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --background-color: #ecf0f1;
    --post-background: #ffffff;
    --text-color: #34495e;
    --tag-color: #e74c3c;
}

body {
    font-family: 'Jost', sans-serif;
    line-height: 1.8;
    color: var(--text-color);
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: var(--background-color);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

header {
    background: linear-gradient(to right, #96caec, #2980b9);
    color: #fff;
    text-align: center;
    padding: 1rem 1rem;
    margin-bottom: 1rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    max-width: 1150px;
}

.header-content {
    position: relative;
    z-index: 1;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    z-index: 0;
}

h1 {
    margin: 0;
    font-size: 2.5rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 2px 2px rgba(0, 0, 0, 0.3);
    margin-bottom: 0.5rem;
}

header p {
    margin: 0;
    margin-bottom: 0.5rem;
}

nav {
    margin-top: 1.0rem;
}

button {
    background-color: var(--secondary-color);
    border: none;
    color: white;
    padding: 12px 24px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 30px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

button:hover {
    background-color: #34495e;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

#posts {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 20px;
}

.post {
    background-color: var(--post-background);
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    padding: 25px;
    width: calc(33.333% - 20px);
    box-sizing: border-box;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.post:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.post h2 {
    margin-top: 0;
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 10px;
    line-height: 1.2;
}

.post p {
    margin-bottom: 15px;
    color: var(--text-color);
}

.post img {
    max-width: 100%;
    height: auto;
    margin-bottom: 15px;
    border-radius: 5px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background-color: #e74c3c;
    color: white;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.tag:hover {
    background-color: #c0392b;
}

.post-content {
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.5;
    text-align: left;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.pagination button {
    margin: 0 5px;
    font-size: 14px;
    background-color: var(--secondary-color);
}

.highlight-date {
    background-color: #e74c3c;
    color: #fff !important;
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 3px;
}

#datacloneButton {
    background-color: #3498db;
    color: white;
    padding: 12px 24px;
    font-size: 16px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#datacloneButton:hover {
    background-color: #2980b9;
}

.floating-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #2980b9;
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.floating-button:hover {
    background-color: #0056b3;
    transform: scale(1.1);
}

#searchInput {
    width: 80%;
    max-width: 400px;
    padding: 10px;
    margin: 1px auto;
    border: 2px solid var(--secondary-color);
    border-radius: 30px;
    font-size: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    font-family: 'Jost', sans-serif;
}

#searchInput:focus {
    border-color: var(--primary-color);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    outline: none;
}

#searchInput::placeholder {
    color: #aaa;
    font-style: italic;
}

.pagination button.active-page {
    background-color: #2980b9;
    color: white;
    font-weight: bold;
}

.active-category {
    background-color: #e74c3c;
    color: white;
}

.tag.active-tag {
    background-color: #2980b9;
}

.pagination-ellipsis {
    margin: 0 5px;
}

#full-post-view {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(236, 240, 241, 0.95);
    z-index: 1002;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
}

.full-post-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.full-post-container h1 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 10px;
}

.full-post-container p {
    text-align: justify;
    margin: 10px 0;
}

.full-post-container img {
    max-width: 50%;
    height: auto;
    margin: 15px auto;
    display: block;
    border-radius: 5px;
}

.full-post-container .tag {
     background-color: #e74c3c;
     padding: 3px 7px;
     margin-right: 5px;
     font-size: 14px;
}

#close-post-btn {
    position: fixed;
    top: 20px;
    right: 30px;
    font-size: 40px;
    font-weight: bold;
    color: var(--secondary-color);
    cursor: pointer;
    z-index: 1003;
}

#close-post-btn:hover {
    color: var(--primary-color);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #ffffff;
    margin: 10% auto;
    padding: 30px;
    border: none;
    width: 90%;
    max-width: 500px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    color: #888;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
}

.modal-content h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 24px;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
}

.modal-content ul {
    list-style-type: none;
    padding-left: 0;
}

.modal-content li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.modal-content li::before {
    content: '•';
    color: #007bff;
    font-size: 20px;
    position: absolute;
    left: 0;
}

.modal-content h3 {
    color: #333;
    margin-top: 30px;
    font-size: 20px;
}

.modal-content p {
    margin: 5px 0;
    color: #666;
}

.iframe-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
}

.iframe-modal iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: none;
}

.iframe-close-btn {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 2001;
}

.iframe-close-btn:hover {
    color: #bbb;
}

.iframe-loading {
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 24px;
}

@media (max-width: 1024px) {
    .post {
        width: calc(50% - 20px);
    }
}

@media (max-width: 600px) {
    .post {
        width: calc(100% - 20px);
    }
    header {
        padding: 1.0rem;
    }
    h1 {
        font-size: 2rem;
    }
    .full-post-container h1 {
        font-size: 1.5rem;
    }
    button {
        padding: 10px 20px;
        font-size: 14px;
    }
}