* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #0a1a5c;
    --secondary: #1c2e86;
    --accent: #2980b9;
    --light: #5fa8ff;
    --text: #ffffff;
    --overlay: rgba(10, 26, 92, 0.85);
    --glass: rgba(255, 255, 255, 0.1);
    --success: #2ecc71;
}

body {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 35%, var(--accent) 100%);
    background-attachment: fixed;
    color: var(--text);
    min-height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    position: relative;
    flex: 1;
}

/* Header Styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 15px 20px;
    background: var(--glass);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    font-size: 2.2rem;
    font-weight: 700;
    background: linear-gradient(90deg, var(--light), var(--text));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-img {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--light), var(--accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--primary);
    font-weight: bold;
}

.admin-login, .admin-logout {
    padding: 10px 20px;
    background: linear-gradient(90deg, var(--accent), var(--light));
    border: none;
    border-radius: 50px;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.admin-login:hover, .admin-logout:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Sidebar Styles */
.admin-sidebar {
    position: fixed;
    left: -300px;
    top: 0;
    height: 100vh;
    width: 300px;
    background: var(--primary);
    z-index: 1000;
    padding: 20px;
    transition: left 0.4s ease;
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
}

.admin-sidebar.active {
    left: 0;
}

.sidebar-toggle {
    position: fixed;
    left: 20px;
    top: 20px;
    z-index: 1001;
    background: var(--accent);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Gallery Styles */
.gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.3s ease;
    height: 220px;
}

.gallery-item:hover {
    transform: translateY(-8px);
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img,
.gallery-item:hover video {
    transform: scale(1.05);
}

.item-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--overlay);
    padding: 12px;
    backdrop-filter: blur(5px);
    font-size: 0.9rem;
}

.item-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
}

.action-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--overlay);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.action-btn:hover {
    background: var(--accent);
    transform: scale(1.1);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    margin: 5vh auto;
    background: var(--primary);
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-media {
    flex: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.modal-media img,
.modal-media video {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
}

.modal-info {
    padding: 20px;
    background: var(--overlay);
}

.modal-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 30px;
    color: var(--text);
    cursor: pointer;
    z-index: 2001;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

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

.login-form {
    position: relative;
    width: 90%;
    max-width: 450px;
    background: var(--primary);
    margin: 10vh auto;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;
    border: 2px solid var(--light);
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    font-size: 16px;
}

.form-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(90deg, var(--accent), var(--light));
    border: none;
    border-radius: 8px;
    color: var(--primary);
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.form-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
}

.form-footer a {
    color: var(--light);
    text-decoration: none;
}

/* Footer Styles */
footer {
    background: #000;
    color: white;
    padding: 30px 20px;
    margin-top: 50px;
    border-radius: 15px 15px 0 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.footer-logo {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--light), var(--accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--primary);
    font-weight: bold;
}

.footer-info {
    flex: 1;
    min-width: 300px;
}

.footer-info p {
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.5;
}

.footer-social {
    flex: 1;
    min-width: 200px;
}

.footer-social h3 {
    margin-bottom: 15px;
    color: var(--light);
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--glass);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-5px);
    background: var(--accent);
}

.footer-contact {
    flex: 1;
    min-width: 250px;
}

.footer-contact h3 {
    margin-bottom: 15px;
    color: var(--light);
}

.footer-contact p {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-contact i {
    color: var(--light);
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .gallery-item {
        height: 200px;
    }
    
    header {
        flex-direction: column;
        gap: 15px;
    }
    
    .modal-content {
        width: 95%;
        margin: 2vh auto;
    }
    
    .footer-content {
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    .gallery {
        grid-template-columns: 1fr;
    }
    
    .gallery-item {
        height: 250px;
    }
    
    .admin-sidebar {
        width: 85%;
        left: -85%;
    }
}

/* Additional Styles */
.likes-count {
    margin-left: 5px;
    font-weight: 600;
}

.admin-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.admin-btn {
    padding: 10px 15px;
    border-radius: 8px;
    border: none;
    background: var(--accent);
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s ease;
}

.admin-btn:hover {
    background: var(--light);
}

.upload-form {
    margin-top: 20px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 10px 20px;
    background: var(--glass);
    border: none;
    border-radius: 8px;
    color: var(--text);
    cursor: pointer;
}

.tab-btn.active {
    background: var(--accent);
}

.social-select {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.social-option {
    display: flex;
    align-items: center;
    gap: 5px;
}

.media-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin-bottom: 10px;
    background: var(--glass);
    border-radius: 8px;
}

.media-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.media-info {
    flex: 1;
    padding: 0 15px;
}

.media-actions {
    display: flex;
    gap: 10px;
}

.delete-btn {
    color: #e74c3c;
    cursor: pointer;
}

.edit-btn {
    color: #3498db;
    cursor: pointer;
}

.message {
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
    text-align: center;
}

.success {
    background-color: #2ecc71;
    color: white;
}

.error {
    background-color: #e74c3c;
    color: white;
}

/* Estilos para los likes - hacerlos más visibles */
.likes-count {
    display: inline-block !important;
    margin-left: 5px;
    font-weight: bold;
    font-size: 12px;
    color: white;
    background: rgba(0, 0, 0, 0.6);
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.action-btn .fa-heart {
    transition: all 0.3s ease;
}

.action-btn:hover .fa-heart {
    transform: scale(1.2);
}

/* Mejorar visibilidad de los botones de acción */
.item-actions {
    background: rgba(0, 0, 0, 0.7);
    border-radius: 20px;
    padding: 5px;
}

.action-btn {
    background: rgba(255, 255, 255, 0.9) !important;
    color: #333 !important;
}

.action-btn:hover {
    background: var(--accent) !important;
    color: white !important;
}


/* Mejoras para dispositivos móviles */
@media (max-width: 768px) {
    .gallery-item {
        height: 200px;
    }
    
    .gallery-item img,
    .gallery-item video {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .item-title {
        font-size: 0.8rem;
        padding: 8px;
    }
    
    .action-btn {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .gallery-item {
        height: 180px;
    }
    
    .container {
        padding: 10px;
    }
    
    header {
        padding: 10px;
        margin-bottom: 20px;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .logo-img {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
}

/* Placeholder para imágenes que no cargan */
.gallery-item img[src*="base64"] {
    background-color: #1c2e86;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mejorar la visualización de videos en móviles */
video {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}


/* Estilos para el botón de regresar */
.header-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
}

.return-btn {
    padding: 10px 15px;
    background: linear-gradient(90deg, var(--light), var(--accent));
    color: var(--primary);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.return-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    color: var(--primary);
}

/* Ajustes responsivos */
@media (max-width: 768px) {
    .header-buttons {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
    
    .return-btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}