html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Inter', sans-serif;
    background: #ffffff;
    background-image: url('TU_IMAGEN_AQUI'); /* Reemplaza con tu imagen */
    background-size: cover;
    background-position: 50% 30%;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: #333;
    overflow-x: hidden;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

.header {
    background: #4a90e2;
    color: white;
    padding: 15px 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    width: 100%;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 1px;
}

.header .logo {
    width: 40px;
    height: 40px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #4a90e2;
    font-weight: bold;
}

.header .back-button {
    color: white;
    text-decoration: none;
    font-size: 16px;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.header .back-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Estilos para la página principal (imageboard) */
.upload-form {
    padding: 20px;
    text-align: center;
}

.upload-form h2 {
    font-size: 18px;
    margin-bottom: 10px;
}

.upload-form form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.upload-form input[type="text"],
.upload-form input[type="file"] {
    padding: 5px;
    font-size: 14px;
}

.upload-form button {
    background: #4a90e2;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.upload-form button:hover {
    background: #357abd;
}

.imageboard {
    padding: 40px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.floating-image {
    display: block;
    text-decoration: none;
    width: 310px;
    height: 310px;
    text-align: center;
}

.imageboard .image-wrapper {
    width: 300px !important;
    height: 300px !important;
    overflow: hidden;
    border-radius: 12px;
    transition: width 0.3s ease, height 0.3s ease;
    display: inline-block;
    position: relative;
}

.imageboard .image-wrapper img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    border-radius: 12px;
    display: block;
    transition: width 0.3s ease, height 0.3s ease;
}

.imageboard .image-wrapper:hover {
    width: 310px !important;
    height: 310px !important;
}

.imageboard .image-wrapper:hover img {
    width: 100% !important;
    height: 100% !important;
}

.imageboard .image-title {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    font-size: 16px;
    padding: 5px 10px;
    border-radius: 0 0 12px 12px;
    text-align: center;
    transition: background 0.3s ease;
}

.imageboard .image-wrapper:hover .image-title {
    background: rgba(0, 0, 0, 0.8);
}

/* Estilos para la página del post */
.post-container {
    max-width: 900px;
    width: 90%;
    display: flex;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.post-image-section {
    flex: 1;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 20px 0 0 20px;
}

.post-image-section .image-wrapper {
    position: relative;
    width: 310px;
    height: auto;
}

.post-image-section .main-image {
    width: 300px;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
    transition: width 0.3s ease;
    display: block;
}

.post-image-section .image-wrapper:hover .main-image {
    width: 310px;
}

.post-image-section .image-hover {
    position: absolute;
    top: -50px;
    right: 250px;
    opacity: 0;
    transition: opacity 0.3s ease;
    width: 150px;
    height: 100px;
    border-radius: 8px;
    z-index: 1000;
    background-image: url('https://static.vecteezy.com/system/resources/thumbnails/045/323/190/small/cartoon-speech-bubble-png.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.post-image-section .main-image:hover ~ .image-hover {
    opacity: 1;
}

.post-image-section .hover-text {
    color: #000;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    word-wrap: break-word;
    /* Eliminamos el fondo blanco y los estilos de globo, ya que la imagen del globo ahora es el fondo */
}

.post-text-section {
    flex: 2;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 0 20px 20px 0;
    overflow: hidden;
}

.post-title {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #222;
}

.post-content {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

.post-content p {
    margin: 0 0 10px;
}

@import url('https://fonts.googleapis.com/css2family=Inter:wght@400;500;600&display=swap');