@import url('https://fonts.googleapis.com/css2?family=Arima+Madurai&display=swap');

:root {
    --primary-color: #ff0090;
    --secondary-color: #e6007a;
    --container-color: #ffffff94;
    --post-color: #ffffffbd;
    --small-color: #464646;
}

* {
    font-family: 'Roboto', sans-serif;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

nav {
    background-color: var(--primary-color);
    display: flex;
    position: fixed;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 20px;
    top: 0;
    z-index: 1000;
}

.nav-left, .nav-right {
    display: flex;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 20px 20px;
    display: inline-block;
}

nav a:hover {
    text-decoration: underline;
}

#search {
    padding: 8px 16px;
    width: 400px;
    border: none;
    font-size: 14px;
    outline: none;
}

body {
    background-image: url('../img/background.jpg');
    background-size: cover;
    background-attachment: fixed;
    padding-top: 60px;
}

.post-container, .waifu-container {
    max-width: 1200px;
    margin: auto;
    background-color: var(--container-color);
    padding: 20px;
    margin-top: 48px;
    margin-bottom: 24px;
}

.post-container h1 {
    margin-bottom: 6px;
}

.post {
    max-width: 800px;
    margin: auto;
    background-color: var(--post-color);
    padding: 20px;
    margin-bottom: 24px;
    white-space: normal;
    word-wrap: break-word;
    cursor: pointer;
}

.post h2, .post p {
    margin-bottom: 12px;
}

.post button {
    margin-top: 12px;
}

.post:last-child {
    margin-bottom: 0;
}

.waifu-container {
    margin-top: 12px;
}

.waifu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
}

.waifu {
    max-width: 800px;
    margin: auto;
    background-color: var(--post-color);
    padding: 20px;
    white-space: normal;
    word-wrap: break-word;
}

small {
    color: var(--small-color);
    font-size: 0.9em;
}

.trumbowyg-editor-box {
    background-color: white;
}

form {
    padding: 24px 48px;
}

form h1 {
    margin-bottom: 24px;
    color: white;
}

.inccorect {
    margin-bottom: 12px;
    color: white;
    width: 100%;
    text-align: center;
}

form input {
    width: 100%;
    margin-bottom: 24px;
    padding: 10px;
}

form select {
    width: 250px;
    margin-bottom: 24px;
    padding: 10px;
}

#note {
    height: 100px;
    margin-bottom: 24px;
    padding: 10px;
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
}

.trumbowyg-modal-button, .trumbowyg-modal-submit {
    padding: 0px;
}

.trumbowyg-input-row input {
    margin-bottom: 0px;
}

.trumbowyg-fontfamily-button, .trumbowyg-textual-button, .trumbowyg-open-dropdown {
    color: black;
}

.trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit {
    background-color: var(--primary-color) !important;
    transition: 0s;
}

.trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit:hover {
    background-color: var(--secondary-color) !important;
}

.trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset {
    transition: 0s;
}

.trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset:hover {
    background-color: #cfcfcf !important;
}

button:hover {
    background-color: var(--secondary-color);
}

.back {
    position: fixed;
    left: 24px;
    bottom: 24px;
}

.actions {
    max-width: 1200px;
    margin: auto;
}

.waifu-actions {
    display: flex;
    flex-direction: row;
    gap: 12px;
    margin-top: 12px;
}

.actions button {
    margin: 0px 0px 10px;
    float: left;
    clear: both;
}

.actions h1 {
    color: white;
    margin-top: 24px;
    margin-bottom: 36px;
    font-size: 48px;
}

.settings-container {
    max-width: 1200px;
    margin: 24px auto;
}

.settings-container h1 {
    margin-bottom: 36px;
    color: white;
    font-size: 48px;
}

.settings-container h2 {
    margin-bottom: 12px;
    color: white;
}

.current-background {
    width: 420px;
    height: 236px;
    object-fit: cover;
    display: block;
    box-shadow: 0px 0px 4px 0px #00000084;
}

.background-selector {
    position: relative;
    display: inline-block;
    margin-bottom: 18px;
}

.file-input-overlay {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

.login-container {
    max-width: 400px;
    margin: 150px auto;
}

.login-container h1 {
    color: white;
    text-align: center;
}

.login-container button {
    width: 100%;
    margin-top: 12px;
}

.admin-form {
    padding: 0px;
    margin-bottom: 36px;
}

.admin-form input[type="text"], .admin-form input[type="password"] {
    display: block;
    width: 400px;
}

.comments-container {
    display: block;
    max-width: 1300px;
    margin: auto;
}

.comments-container h1 {
    margin-top: 24px;
    margin-bottom: 12px;
    margin-left: 0px;
}

.comments-container input[type="text"] {
    display: block;
    width: 300px;
    margin-bottom: 24px;
    padding: 10px;
}

.comments-container textarea {
    display: block;
    width: 500px;
    height: 125px;
    margin-bottom: 24px;
    padding: 10px;
}

.comment {
    background-color: var(--post-color);
    padding: 20px;
    margin: 24px 0px;
}

.comment p {
    word-wrap: break-word;
}

.comment button {
    margin-top: 12px;
}

.infos {
    margin-bottom: 12px;
}

.notifications-container {
    max-width: 1200px;
    margin: 24px auto;
}

.notifications-container h1 {
    margin-bottom: 24px;
    color: white;
    font-size: 48px;
}

.notifications-container p {
    color: white;
}

.notifications-container button {
    margin-bottom: 24px;
}

.notification {
    background-color: var(--post-color);
    padding: 12px;
    margin-bottom: 12px;
}

.notification a {
    text-decoration: none;
    color: black;
}

.buttons {
    display: flex;
    flex-direction: row;
    gap: 24px;
}

.no-image {
    width: 100%;
    width: 225px;
    height: 325px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.waifu h2 {
    margin-bottom: 12px;
    text-align: center;
}

.waifu img {
    width: 100%;
    width: 225px;
    height: 325px;
    object-position: top;
    object-fit: cover;
}

.image-preview-container {
    position: relative;
    display: inline-block;
    margin-bottom: 24px;
}

.image-preview {
    width: 200px;
    height: 300px;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0px 0px 4px 0px #00000084;
    cursor: pointer;
    background: var(--container-color);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.image-preview.no-image {
    color: #464646;
    font-size: 14px;
    text-align: center;
}

.image-preview .placeholder-text {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #484848;
    font-size: 14px;
    text-align: center;
    pointer-events: none;
}

.image-preview-input {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

.waifu-detail-container {
    max-width: 1200px;
    margin: 24px auto;
    background-color: var(--container-color);
    padding: 20px;
}

.waifu-content {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 40px;
    align-items: start;
}

.waifu-image {
    top: 100px;
}

.waifu-image img {
    width: 100%;
    width: 400px;
    height: 650px;
    object-fit: cover;
    object-position: top;
}

.no-image-large {
    width: 100%;
    width: 400px;
    height: 650px;
    background: var(--post-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 18px;
}

.waifu-info {
    background-color: var(--post-color);
    padding: 30px;
}

.waifu-info h1 {
    color: black;
    font-size: 2.5em;
    padding-bottom: 12px;
}

.waifu-details {
    margin-bottom: 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.detail-item {
    margin-bottom: 12px;
    padding: 8px 0;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item strong {
    color: var(--primary-color);
    margin-right: 8px;
    min-width: 120px;
    display: inline-block;
}

@media (max-width: 768px) {
    .waifu-details {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

.personal-note {
    background: #f8f9fa;
    padding: 20px;
    border-left: 4px solid var(--primary-color);
}

.personal-note h3 {
    margin-bottom: 12px;
    color: var(--primary-color);
    font-size: 1.2em;
}

.menu {
    display: none;
    padding: 10px 0px 10px 20px;
}

.menu p {
    font-size: 48px;
    color: white;
    cursor: pointer;
}

.dropdown {
    display: none;
    position: fixed;
    top: 78px;
    right: 0px;
    background-color: var(--primary-color);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    min-width: 150px;
}

.dropdown a {
    display: block;
    padding: 12px 16px;
    color: white;
    text-decoration: none;
}

.dropdown a:last-child {
    border-bottom: none;
}

.dropdown a:hover {
    text-decoration: underline;
}

@media (max-width: 1250px) {
    .post-container, .waifu-container, .notification, .actions, .settings-container, .notifications-container, .waifu-detail-container {
        max-width: 90%;
    }
}

@media (max-width: 1050px) {
    body {
        padding-top: 80px;
    }

        .waifu-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .waifu-image {
        position: relative;
        top: auto;
    }
    
    .waifu-image img {
        max-width: 100%;
        margin: 0 auto;
        display: block;
    }

    .no-image-large {
        width: 100%;
    }
    
    .waifu-info {
        padding: 20px;
    }
    
    .waifu-info h1 {
        font-size: 2em;
    }
}

@media (max-width: 768px) {  
    .comments-container textarea {
        width: 100%;
    }

    .admin-form input[type="text"], .admin-form input[type="password"] {
        width: 90%;
    }

    .background-selector .current-background {
        width: 90%;
        height: auto;
    }

    .settings-container h1, .notifications-container h1 {
        font-size: 36px;
    }

    .actions h1 {
        font-size: 36px;
        margin-bottom: 24px;
    }

    #note {
        width: 90%;
    }

    .no-search {
        flex-direction: row-reverse;
    }

    .menu {
        display: flex;
    }

    .nav-left, .nav-right {
        display: none;
    }
}