/* Importar fuentes */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&family=Playfair+Display:wght@400;700&display=swap');

/* Estilos Generales */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #121212;
    color: #E0E0E0;
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: #F8F8F8;
    text-align: center;
}

/* Encabezado */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    background-color: #1E1E1E;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}

header .logo img {
    height: 80px;
    width: auto;
    display: block;
}

header nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 25px;
    align-items: center;
}

header nav a {
    text-decoration: none;
    color: #A0A0A0;
    font-weight: 400;
    transition: color 0.3s ease;
}

header nav a:hover {
    color: #F8F8F8;
}

.btn-login {
    background-color: transparent;
    border: 1px solid #A0A0A0;
    padding: 10px 20px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.btn-login:hover {
    background-color: #A0A0A0;
    color: #1E1E1E;
}

/* Sección de Venta Principal (Hero) */
.hero-sales {
    background: url('https://via.placeholder.com/1920x1080/0F0F0F/E0E0E0?text=Panel+de+Control+Minecraft') no-repeat center center/cover;
    height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-sales::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: -1;
}

.hero-content {
    max-width: 800px;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    font-weight: 300;
}

.btn-main {
    display: inline-block;
    padding: 15px 40px;
    background-color: #2ECC71;
    color: #121212;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.4);
}

.btn-main:hover {
    background-color: #27AE60;
    transform: translateY(-3px);
}

/* Sección de Características */
.features-section {
    padding: 80px 20px;
    text-align: center;
}

.features-section h3 {
    font-size: 2.5rem;
    margin-bottom: 50px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background-color: #1E1E1E;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid #333;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.feature-card p {
    color: #B0B0B0;
}

/* Sección de Precios */
.pricing-section {
    padding: 80px 20px;
    background-color: #171717;
    text-align: center;
}

.pricing-section h3 {
    font-size: 2.5rem;
    margin-bottom: 50px;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.pricing-card {
    background-color: #1E1E1E;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 2px solid transparent;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.pricing-card.highlighted {
    border-color: #2ECC71;
    transform: scale(1.05);
}

.pricing-card:hover {
    transform: translateY(-5px);
}

.pricing-card h4 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.price {
    font-size: 3rem;
    font-weight: 700;
    color: #2ECC71;
    margin: 0 0 20px;
}

.price span {
    font-size: 1rem;
    color: #B0B0B0;
    font-weight: 400;
}

.features-list {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
    text-align: left;
}

.features-list li {
    padding: 8px 0;
    border-bottom: 1px solid #333;
}

.features-list li:last-child {
    border-bottom: none;
}

.features-list li span {
    font-weight: 700;
    color: #F8F8F8;
}

.btn-buy {
    display: block;
    width: 100%;
    padding: 15px;
    background-color: #2ECC71;
    color: #121212;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 700;
    transition: background-color 0.3s ease;
}

.btn-buy:hover {
    background-color: #27AE60;
}

/* Sección de FAQ */
.faq-section {
    padding: 80px 20px;
    max-width: 900px;
    margin: 0 auto;
}

.faq-section h3 {
    font-size: 2.5rem;
    margin-bottom: 50px;
}

.faq-item {
    background-color: #1E1E1E;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.faq-item .question {
    font-weight: 700;
    font-size: 1.1rem;
    color: #F8F8F8;
}

.faq-item .answer {
    color: #B0B0B0;
}

/* Pie de Página */
footer {
    background-color: #0A0A0A;
    color: #777;
    padding: 20px 20px;
    text-align: center;
}

/* Estilos del Modal de Autenticación */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: #1E1E1E;
    color: #F8F8F8;
    margin: 10% auto;
    padding: 40px;
    border: 1px solid #333;
    width: 90%;
    max-width: 450px;
    border-radius: 10px;
    position: relative;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
    animation: slideInTop 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.close-btn {
    color: #888;
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-btn:hover,
.close-btn:focus {
    color: #F8F8F8;
    text-decoration: none;
}

.auth-form-container {
    height: auto;
}

.auth-form {
    display: none;
    flex-direction: column;
    gap: 20px;
    transition: transform 0.5s, opacity 0.5s;
}

.auth-form.active {
    display: flex;
    opacity: 1;
}

.auth-form h3 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 2rem;
    color: #F8F8F8;
}

.auth-form input {
    padding: 15px;
    border: 1px solid #444;
    background-color: #282828;
    color: #F8F8F8;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.auth-form input::placeholder {
    color: #888;
}

.auth-form input:focus {
    border-color: #2ECC71;
    box-shadow: 0 0 8px rgba(46, 204, 113, 0.3);
}

.auth-btn {
    padding: 15px;
    background-color: #2ECC71;
    color: #121212;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    font-size: 1.1rem;
}

.auth-btn:hover {
    background-color: #27AE60;
    transform: translateY(-2px);
}

.switch-form {
    text-align: center;
    font-size: 0.9em;
    color: #A0A0A0;
    margin-top: 15px;
}

.switch-form a {
    color: #2ECC71;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s ease;
}

.switch-form a:hover {
    text-decoration: underline;
}

.auth-message {
    text-align: center;
    font-weight: 700;
    margin-top: 20px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInTop {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Media Queries para diseño responsive */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
    }

    header nav ul {
        justify-content: center;
        margin-top: 15px;
        flex-wrap: wrap;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .pricing-card.highlighted {
        transform: scale(1.0);
    }
}

/* --- Nuevos Estilos para el Perfil de Usuario y Panel de Cuenta --- */

/* Estilo para el icono de usuario */
.user-profile-icon {
    font-size: 2.2em; /* Tamaño del icono */
    color: #2ECC71; /* Color verde vibrante */
    cursor: pointer;
    transition: color 0.3s ease, transform 0.2s ease;
    padding: 5px; /* Para un área de clic más cómoda */
    border-radius: 50%; /* Para que el fondo sea redondo al hacer hover */
}

.user-profile-icon:hover {
    color: #27AE60; /* Color ligeramente más oscuro al pasar el ratón */
    transform: scale(1.1); /* Efecto de crecimiento sutil */
    background-color: rgba(46, 204, 113, 0.1); /* Fondo sutil al hacer hover */
}

/* Contenido del Panel de Administración de Cuenta dentro del Modal */
.account-panel-content h3 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 2.2rem;
    color: #F8F8F8;
}

.account-panel-content p {
    text-align: center;
    font-size: 1.1em;
    margin-bottom: 30px;
    color: #D0D0D0;
}

.account-options {
    display: flex;
    flex-direction: column;
    gap: 15px; /* Espacio entre los botones de opción */
}

.account-option-btn {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background-color: #282828;
    color: #E0E0E0;
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-size: 1.05em;
    font-weight: 500;
}

.account-option-btn i {
    margin-right: 15px; /* Espacio entre el icono y el texto */
    font-size: 1.3em;
    color: #2ECC71; /* Color del icono */
}

.account-option-btn:hover {
    background-color: #333;
    color: #F8F8F8;
}

.account-option-btn.logout {
    background-color: #E74C3C; /* Color rojo para el botón de cerrar sesión */
    color: #F8F8F8;
    margin-top: 20px; /* Separación del resto de opciones */
}

.account-option-btn.logout i {
    color: #F8F8F8; /* Icono blanco para el botón de cerrar sesión */
}

.account-option-btn.logout:hover {
    background-color: #C0392B; /* Rojo más oscuro al pasar el ratón */
    transform: translateY(-2px);
}

/* Ajustes para el tamaño de las pantallas pequeñas */
@media (max-width: 600px) {
    .modal-content {
        margin: 5% auto;
        padding: 25px;
    }

    .account-panel-content h3 {
        font-size: 1.8rem;
    }

    .account-option-btn {
        padding: 12px 15px;
        font-size: 1em;
    }
}

/* --- Estilos para el Sistema de Tickets --- */
#tickets-modal .modal-content {
    max-width: 700px;
    height: auto;
    min-height: 500px;
    display: flex;
    flex-direction: column;
}

#tickets-list-container {
    padding: 20px;
}

#tickets-list-container h3 {
    margin-bottom: 20px;
}

#create-ticket-btn {
    width: auto;
    font-size: 1em;
    padding: 10px 20px;
    margin-bottom: 20px;
}

.ticket-item {
    background-color: #282828;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border-left: 5px solid #2ECC71;
}

.ticket-item:hover {
    background-color: #333;
}

.ticket-item p {
    margin: 0;
}

.ticket-item .ticket-status {
    font-weight: bold;
    color: #2ECC71;
    float: right;
}

.ticket-item.status-Resuelto .ticket-status {
    color: #f1c40f;
}

.ticket-item.status-Cerrado .ticket-status {
    color: #e74c3c;
}

/* Estilos del Chat del Ticket */
#ticket-chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 20px;
}

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

.ticket-header h3 {
    text-align: left;
    margin: 0;
    font-size: 1.5rem;
    flex-grow: 1;
}

.back-btn {
    background-color: #333;
    border: none;
    color: #F8F8F8;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.back-btn:hover {
    background-color: #555;
}

#ticket-chat-box {
    flex-grow: 1;
    overflow-y: auto;
    background-color: #282828;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.message-bubble {
    padding: 10px 15px;
    border-radius: 15px;
    max-width: 70%;
    margin-bottom: 10px;
}

/* Estilo para los mensajes que TÚ envías (usuario) */
.message-bubble.sent {
    background-color: #2ECC71; /* Un color para los mensajes del usuario */
    color: #121212;
    align-self: flex-end; /* Alineado a la derecha */
    border-bottom-right-radius: 5px;
}

/* Estilo para los mensajes que RECIBES (Soporte/Admin) */
.message-bubble.received {
    background-color: #333; /* Un color diferente para los mensajes recibidos */
    color: #F8F8F8;
    align-self: flex-start; /* Alineado a la izquierda */
    border-bottom-left-radius: 5px;
}

.message-bubble .message-user {
    font-size: 0.8em;
    font-weight: bold;
    color: #a0a0a0;
    margin-bottom: 5px;
}

.message-bubble .message-text {
    margin: 0;
}

#ticket-message-form {
    display: flex;
    gap: 10px;
}

#ticket-message-form input {
    flex-grow: 1;
    padding: 12px;
    border: 1px solid #444;
    background-color: #282828;
    color: #F8F8F8;
    border-radius: 8px;
}

#ticket-message-form button {
    background-color: #2ECC71;
    color: #121212;
    border: none;
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
}