/* --- DEFINICIÓN DE LA FUENTE PERSONALIZADA --- */
@font-face {
    font-family: 'Bad Grunge';
    src: url('../fonts/BADGRUNGE.woff2') format('woff2'),
         url('../fonts/BADGRUNGE.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --background-color: #f4f6f9;
    --card-bg-color: #ffffff;
    --text-color: #333;
    --text-light-color: #888;
    --accent-color: #e74c3c;
    --green-color: #2ecc71;
}

/* Animación para que las tarjetas aparezcan desde abajo y con un fade-in */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animación para el overlay del modal */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Animación para que el contador de XP "salte" */
@keyframes pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); color: var(--green-color); }
    100% { transform: scale(1); }
}

/* --- CLASES DE AYUDA PARA APLICAR ANIMACIONES --- */

/* Clase que aplicaremos a las tarjetas con JS */
.card-animate-in {
    /* Empezamos la tarjeta invisible para que la animación funcione */
    opacity: 0;
    /* Aplicamos la animación */
    animation: fadeInUp 0.4s ease-out forwards;
}

/* Clase que aplicaremos al contador de XP con JS */
.highlight-xp {
    animation: pop 0.5s ease-in-out;
}

/* --- MEJORAS A LOS MODALES --- */

/* Añadimos la animación de fade-in al overlay */
.modal-overlay {
    animation: fadeIn 0.3s ease-out;
}

/* Añadimos una animación al contenido del modal para que también aparezca suavemente */
.modal-content {
    animation: fadeInUp 0.4s ease-out;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    overscroll-behavior-y: contain; /* Evita el rebote de scroll en iOS */
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 600px; /* Limita el ancho en escritorio */
    margin: 0 auto;
    background-color: var(--background-color);
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: var(--card-bg-color);
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-header h1 {
    font-size: 1.5rem;
    color: var(--secondary-color);
}

/* --- APLICACIÓN DE LA FUENTE A LOS TÍTULOS --- */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Bad Grunge', sans-serif; /* ¡Aquí la usamos! */
    text-transform: none; /* Esta fuente se ve mejor sin forzar mayúsculas */
    letter-spacing: normal; /* Quitamos el espaciado extra */
}

/* Ajuste específico para el título principal de la cabecera, si es necesario */
.app-header h1#page-title {
    font-size: 1.8rem; /* Aumenta un poco el tamaño para que luzca más */
}

.user-profile-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-profile-header .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.user-profile-header #user-xp {
    background: var(--primary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.app-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
}

.bottom-bar {
    display: flex;
    justify-content: space-around;
    background-color: var(--card-bg-color);
    border-top: 1px solid #eee;
    padding: 10px 0;
    position: sticky;
    bottom: 0;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-light-color);
    font-size: 0.7rem;
    width: 20%;
    transition: color 0.2s;
}

.nav-item i {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.nav-item.active {
    color: var(--primary-color);
}

.loader {
    text-align: center;
    padding: 50px;
    font-size: 1.2rem;
    color: var(--text-light-color);
}

/* Estilos de componentes comunes */
.card {
    background: var(--card-bg-color);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background-color: var(--primary-color);
    color: white;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
}

.btn-danger { background-color: var(--accent-color); }
.btn-success { background-color: var(--green-color); }

.fab { /* Floating Action Button */
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: var(--accent-color);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 101;
}

/* --- Estilos para el Módulo de Votaciones --- */
.vote-card {
    border-left: 5px solid var(--primary-color);
}

.vote-card.closed {
    border-left-color: var(--text-light-color);
    opacity: 0.8;
}

.vote-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.vote-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.vote-header .status {
    font-size: 0.8rem;
    padding: 3px 8px;
    border-radius: 12px;
    color: white;
    font-weight: bold;
}
.status.open { background-color: var(--green-color); }
.status.closed { background-color: var(--text-light-color); }

.vote-meta {
    font-size: 0.8rem;
    color: var(--text-light-color);
    margin-bottom: 15px;
}

.vote-controls-container {
    margin-top: 15px;
}

.vote-buttons {
    display: flex;
    gap: 10px;
}

.vote-buttons .btn {
    flex-grow: 1;
}

.voted-message {
    text-align: center;
    padding: 15px;
    background-color: #e8f5e9; /* Light green */
    color: #2e7d32; /* Dark green */
    border-radius: 8px;
    font-weight: bold;
}

.results {
    margin-top: 10px;
}
.result-line {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 5px;
}
.results-bar {
    display: flex;
    height: 10px;
    background-color: var(--accent-color);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 5px;
}
.bar-yes {
    background-color: var(--green-color);
    height: 100%;
}

/* --- Estilos para el Modal --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 25px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2rem;
    cursor: pointer;
    color: #aaa;
}

#new-vote-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
#new-vote-form input, #new-vote-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}
#new-vote-form textarea {
    min-height: 80px;
    resize: vertical;
}

/* --- Estilos para el Módulo de Misiones (CortiQuest) --- */
.task-card {
    border-left: 5px solid #f39c12; /* Naranja para pendiente */
}

.task-card.completed {
    border-left-color: var(--green-color);
    background-color: #f9f9f9;
}
.task-card.completed h3, .task-card.completed p {
    text-decoration: line-through;
    color: var(--text-light-color);
}
.task-card.completed .xp-badge {
    background-color: var(--text-light-color);
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}
.task-header h3 {
    margin-right: 10px;
}

.xp-badge {
    background-color: var(--primary-color);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    flex-shrink: 0;
}

.task-meta {
    font-size: 0.8rem;
    color: var(--text-light-color);
    margin-bottom: 10px;
}

.task-action {
    margin-top: 15px;
    text-align: right;
}

.task-status-completed {
    font-weight: bold;
    color: var(--green-color);
    text-align: right;
    text-decoration: none !important;
}

/* --- Estilos App CortiRetos (Nuevo Diseño) --- */
.challenge-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5px;
    border-bottom: 1px solid #f0f0f0;
}
.challenge-item:last-child { border-bottom: none; }
.challenge-info { flex-grow: 1; }
.challenge-text { font-style: italic; margin-bottom: 10px; }
.challenge-meta { display: flex; align-items: center; gap: 15px; font-size: 0.8rem; color: var(--text-light-color); }
.difficulty-tag .fa-circle { font-size: 0.7rem; }
.difficulty-tag .easy { color: var(--green-color); }
.difficulty-tag .medium { color: #f39c12; }
.difficulty-tag .hard { color: var(--accent-color); }
.challenge-right-panel { flex-shrink: 0; margin-left: 10px; }
.challenge-actions { display: flex; gap: 10px; }
.challenge-status-tag { font-weight: bold; padding: 5px 10px; border-radius: 20px; font-size: 0.8rem; color: white; }
.challenge-status-tag.completed { background-color: var(--green-color); }
.challenge-status-tag.failed { background-color: var(--accent-color); }
#new-challenge-form select {
    width: 100%; padding: 12px; border: 1px solid #ddd;
    border-radius: 8px; margin-bottom: 10px;
}

/* --- Estilos para el Módulo de Historias (Diario) --- */
.story-card {
    padding: 0; /* Quitamos el padding para que la imagen ocupe todo */
    overflow: hidden; /* Importante para los bordes redondeados */
}
.story-header {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    gap: 10px;
}
.story-header .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
.story-author-info {
    display: flex;
    flex-direction: column;
}
.story-author-info strong {
    font-size: 1rem;
}
.story-author-info small {
    font-size: 0.8rem;
    color: var(--text-light-color);
}
.story-image {
    width: 100%;
    height: auto;
    display: block; /* Elimina espacio extra debajo de la imagen */
}
.story-caption {
    padding: 12px 15px;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* --- Estilos para el formulario de subida --- */
#new-story-form .photo-upload-label {
    display: block;
    padding: 20px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    margin-bottom: 15px;
}
#new-story-form .photo-upload-label:hover {
    background-color: #f9f9f9;
    border-color: var(--primary-color);
}
#new-story-form #photo-upload {
    display: none; /* Ocultamos el input de archivo real */
}
#photo-preview {
    width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 15px;
}
.photo-preview-hidden {
    display: none;
}
#new-story-form textarea {
    width: 100%;
    min-height: 80px;
    border-radius: 8px;
    border: 1px solid #ddd;
    padding: 10px;
    margin-bottom: 15px;
}

/* --- Estilos para el Ranking --- */
.ranking-list {
    list-style: none;
    padding: 0;
    margin-top: 15px;
}
.ranking-list li {
    display: flex;
    align-items: center;
    padding: 10px 5px;
    border-bottom: 1px solid #f0f0f0;
}
.ranking-list li:last-child {
    border-bottom: none;
}
.rank-position {
    font-size: 1.2rem;
    width: 40px;
    text-align: center;
}
.ranking-list .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 15px;
}
.rank-name {
    font-weight: bold;
    flex-grow: 1;
}
.rank-xp {
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* --- Estilo para el botón de Logout --- */
.logout-btn {
    font-size: 1.5rem;
    color: var(--text-light-color);
    margin-left: 10px;
    text-decoration: none;
    transition: color 0.2s;
}
.logout-btn:hover {
    color: var(--accent-color);
}

/* --- Estilos para la Página de Perfil --- */
.back-link { color: var(--primary-color); text-decoration: none; font-weight: bold; }
.profile-header { text-align: center; }
.profile-avatar { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; border: 4px solid white; box-shadow: 0 4px 10px rgba(0,0,0,0.1); margin-top: -50px; }
.xp-bar { width: 80%; margin: 15px auto 0; background-color: #e0e0e0; border-radius: 20px; height: 20px; position: relative; overflow: hidden; }
.xp-bar-fill { background: var(--green-color); height: 100%; border-radius: 20px; }
.xp-bar span { position: absolute; width: 100%; left: 0; color: white; font-weight: bold; text-shadow: 1px 1px 1px rgba(0,0,0,0.4); font-size: 0.8rem; line-height: 20px; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; text-align: center; margin-top: 15px; }
.stat-item span:first-child { font-size: 1.5rem; font-weight: bold; display: block; font-family: 'Pricedown', sans-serif; }
.stat-item span:last-child { font-size: 0.8rem; color: var(--text-light-color); }
.achievements-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 15px; margin-top: 15px; }
.achievement-item { display: flex; flex-direction: column; align-items: center; text-align: center; background: #f9f9f9; padding: 10px; border-radius: 8px; }
.achievement-item i { font-size: 2rem; color: var(--primary-color); margin-bottom: 5px; }
.achievement-item span { font-size: 0.7rem; }
.profile-link { display: flex; align-items: center; width: 100%; text-decoration: none; color: inherit; }

/* Estilo para el enlace del perfil en la cabecera */
.header-profile-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    gap: 10px;
}

.btn.btn-secondary { background-color: #7f8c8d; margin-top: 10px; }

/* --- Estilos para la Página de Edición de Perfil --- */
.edit-profile-form .form-group {
    margin-bottom: 20px;
}
.edit-profile-form label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
}
.edit-profile-form input[type="text"],
.edit-profile-form input[type="file"] {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
}
.edit-profile-form input[type="file"] {
    padding: 5px;
}
.current-avatar-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin-bottom: 10px;
}
.notice {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid transparent;
}
.notice.error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

/* --- Estilos para el Escritorio de CortijoOS --- */
.app-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columnas */
    gap: 20px;
    padding: 20px;
}

.app-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-color);
}

.app-icon .icon-background {
    width: 70px;
    height: 70px;
    border-radius: 18px; /* Bordes redondeados tipo iOS */
    background-color: var(--card-bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin-bottom: 8px;
    transition: transform 0.2s ease-out, box-shadow 0.2s;
}

.app-icon:hover .icon-background {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
}

.app-icon .icon-background i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.app-icon .app-name {
    font-size: 0.8rem;
    font-weight: 500;
}

/* --- Estilos para el Chat del Gurú --- */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100% - 20px); /* Ajusta según el padding */
}
.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
}
.chat-message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 18px;
    margin-bottom: 10px;
    line-height: 1.4;
    animation: fadeInUp 0.3s ease-out;
}
.chat-message.user {
    background-color: var(--primary-color);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}
.chat-message.guru {
    background-color: var(--card-bg-color);
    color: var(--text-color);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}
.chat-message.guru.thinking {
    font-style: italic;
    color: var(--text-light-color);
}
.chat-input-form {
    display: flex;
    padding: 10px;
    border-top: 1px solid #eee;
    background-color: var(--card-bg-color);
}
.chat-input-form input {
    flex-grow: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 10px 15px;
    font-size: 1rem;
    margin-right: 10px;
}
.chat-input-form button {
    border-radius: 50%;
    width: 45px;
    height: 45px;
    border: none;
    background-color: var(--primary-color);
    color: white;
    font-size: 1.5rem;
}

/* --- Estilos App Oraciones --- */
.list-item {
    display: flex; align-items: center; padding: 15px 10px;
    border-bottom: 1px solid #f0f0f0; text-decoration: none; color: inherit;
}
.list-item:last-child { border-bottom: none; }
.list-item-icon { font-size: 1.5rem; color: var(--primary-color); width: 40px; text-align: center; }
.list-item-title { flex-grow: 1; margin: 0 10px; font-weight: 500; }
.list-item-arrow { color: #ccc; }
.back-to-list-btn { margin-bottom: 20px; }
.prayer-title { margin-bottom: 15px; }
.prayer-text { white-space: pre-wrap; line-height: 1.6; }

/* --- Estilos App DJ Request --- */
.dj-request-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 5px; border-bottom: 1px solid #f0f0f0;
}
.dj-request-item:last-child { border-bottom: none; }
.request-info { display: flex; flex-direction: column; }
.song-title { font-weight: 500; }
.request-info small { font-size: 0.8rem; color: var(--text-light-color); }
.btn-icon { background: none; border: none; font-size: 1.5rem; color: var(--green-color); cursor: pointer; }
.btn-icon:disabled { color: #ccc; }

/* --- Estilos App A Comprar --- */
.shopping-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 15px 5px; border-bottom: 1px solid #f0f0f0; cursor: pointer;
    transition: background-color 0.2s;
}
.shopping-item:last-child { border-bottom: none; }
.shopping-item:hover { background-color: #f9f9f9; }
.shopping-item.bought .item-name {
    text-decoration: line-through;
    color: var(--text-light-color);
}
.shopping-item.bought .item-status-icon { color: var(--green-color); }
.item-info { display: flex; flex-direction: column; }
.item-name { font-weight: 500; }
.item-info small { font-size: 0.8rem; color: var(--text-light-color); }
.item-status-icon { font-size: 1.5rem; color: #ccc; }

/* --- Estilos App DM NOX (Versión Propia y Definitiva) --- */
.dice-selector {
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: 10px; margin: 20px 0;
}
.dice-btn {
    padding: 8px 15px; border: 1px solid #ccc; border-radius: 20px;
    background: white; cursor: pointer; transition: all 0.2s; font-weight: bold;
}
.dice-btn.active {
    background: var(--primary-color); color: white; border-color: var(--primary-color);
}
.dice-area {
    perspective: 1200px;
    display: flex; flex-direction: column; align-items: center;
    padding: 20px 0;
}
.dice-container {
    width: 120px; height: 120px;
    position: relative; cursor: pointer;
}
.dice {
    width: 100%; height: 100%;
    position: absolute;
    transform-style: preserve-3d;
    transform: rotateX(-15deg) rotateY(15deg); /* Posición inicial chula */
    transition: transform 1.5s ease-out; /* Transición suave al parar */
}
.dice.is-rolling {
    animation: roll 1.5s ease-out;
}
@keyframes roll {
    from { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
    to { transform: rotateX(1080deg) rotateY(720deg) rotateZ(1440deg); }
}
.dice .face {
    position: absolute;
    width: 120px; height: 120px;
    border: 2px solid var(--secondary-color);
    background: rgba(255, 255, 255, 0.9);
    display: flex; align-items: center; justify-content: center;
    font-size: 3rem; color: var(--primary-color);
    backface-visibility: hidden;
}
/* Posicionamos las 6 caras del cubo simbólico */
.face:nth-child(1) { transform: rotateY(0deg)   translateZ(60px); }
.face:nth-child(2) { transform: rotateY(180deg) translateZ(60px); }
.face:nth-child(3) { transform: rotateY(90deg)  translateZ(60px); }
.face:nth-child(4) { transform: rotateY(-90deg) translateZ(60px); }
.face:nth-child(5) { transform: rotateX(90deg)  translateZ(60px); }
.face:nth-child(6) { transform: rotateX(-90deg) translateZ(60px); }

.dice-result {
    margin-top: 30px; font-size: 4rem; font-weight: bold;
    font-family: 'Pricedown', sans-serif;
    color: var(--secondary-color);
    height: 60px; /* Altura fija para evitar saltos de layout */
}

/* --- Estilos App Hacienda --- */
.tabs { display: flex; border-bottom: 1px solid #ddd; margin-bottom: 20px; }
.tab-link {
    padding: 10px 20px; border: none; background: none; cursor: pointer;
    font-size: 1rem; color: var(--text-light-color); border-bottom: 3px solid transparent;
}
.tab-link.active { color: var(--primary-color); border-bottom-color: var(--primary-color); }
.expense-item, .balance-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 5px; border-bottom: 1px solid #f0f0f0; }
.expense-item:last-child, .balance-item:last-child { border-bottom: none; }
.expense-details { display: flex; flex-direction: column; }
.expense-desc, .balance-name { font-weight: 500; }
.expense-details small { font-size: 0.8rem; color: var(--text-light-color); }
.expense-amount, .balance-amount { font-weight: bold; }
.balance-amount.positive { color: var(--green-color); }
.balance-amount.negative { color: var(--accent-color); }
.transaction-item { display: flex; align-items: center; gap: 15px; padding: 15px 5px; font-size: 1.1rem; border-bottom: 1px solid #f0f0f0; }
.transaction-item:last-child { border-bottom: none; }
.transaction-item .from { font-weight: bold; color: var(--accent-color); }
.transaction-item .to { font-weight: bold; color: var(--green-color); }
.transaction-item .amount { margin-left: auto; font-family: 'Pricedown', sans-serif; font-size: 1.5rem; }
#new-expense-form input { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 8px; margin-bottom: 15px; }
.participants-selector { margin: 15px 0; }
.checkbox-label { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; cursor: pointer; }
.checkbox-label:hover { background-color: #f9f9f9; }
.avatar-small { width: 30px; height: 30px; border-radius: 50%; }

/* --- Estilos Supermerk2 --- */
.card-grid { display: flex; flex-direction: column; gap: 20px; }
.card-item { background: #f9f9f9; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.card-item.owned { opacity: 0.6; }
.card-image { height: 150px; background-size: cover; background-position: center; position: relative; }
.card-rarity { position: absolute; top: 10px; right: 10px; padding: 4px 8px; font-size: 0.7rem; font-weight: bold; color: white; border-radius: 5px; text-shadow: 1px 1px 2px black; }
.rarity.común { background: grey; }
.rarity.rara { background: var(--primary-color); }
.rarity.épica { background: purple; }
.rarity.legendaria { background: linear-gradient(45deg, #f39c12, #f1c40f); }
.card-info { padding: 15px; }
.card-info h4 { margin-bottom: 5px; font-size: 1.1rem; }
.card-info p { font-size: 0.85rem; color: #666; }
.card-action { padding: 0 15px 15px; }
.card-action .btn { width: 100%; }
.profile-cards .card-collection-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; margin-top: 15px; }
.card-item-small { position: relative; }
.card-item-small img { width: 100%; border-radius: 8px; }
.card-rarity-small { position: absolute; bottom: 5px; right: 5px; padding: 2px 5px; font-size: 0.6rem; font-weight: bold; color: white; border-radius: 3px; }

/* --- Estilos Votaciones (Multiple-Choice) --- */
.poll-card .vote-header { align-items: flex-start; }
.poll-options-container { margin-top: 15px; display: flex; flex-direction: column; gap: 10px; }
.poll-option-label {
    display: flex; align-items: center; gap: 10px; padding: 12px;
    border: 1px solid #ddd; border-radius: 8px; cursor: pointer;
}
.poll-option-label:has(input:checked) { background-color: #e9f5ff; border-color: var(--primary-color); }
.poll-option-label input { width: 20px; height: 20px; }
.poll-result { margin-bottom: 8px; }
.result-text { display: flex; justify-content: space-between; font-size: 0.9rem; margin-bottom: 4px; }
#add-option-btn { margin: 10px 0; width: 100%; background-color: #95a5a6; }

/* --- Estilos App Actividades y Calendario --- */
.activity-card { display: flex; flex-direction: column; gap: 15px; }
.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
    gap: 10px;
}
.activity-header h3 {
    margin-bottom: 0;
    flex-grow: 1;
}
.btn-icon {
    background: none;
    border: none;
    color: var(--text-light-color);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px;
}
.btn-icon:hover {
    color: var(--primary-color);
}
.activity-time { font-size: 0.9rem; color: var(--primary-color); font-weight: bold; }
.activity-desc { font-size: 0.95rem; color: #555; }
.activity-footer { display: flex; justify-content: space-between; align-items: center; }
.participants-list { display: flex; gap: -10px; }
.participants-list .avatar-small { border: 2px solid white; box-shadow: 0 0 5px rgba(0,0,0,0.2); }
#new-activity-form input, #new-activity-form textarea {
    width: 100%; padding: 12px; border: 1px solid #ddd;
    border-radius: 8px; margin-bottom: 10px;
}
#new-activity-form label { display: block; margin-bottom: 5px; font-size: 0.9rem; }
.calendar-day { margin-bottom: 20px; }
.calendar-day h4 { border-bottom: 2px solid var(--primary-color); padding-bottom: 8px; margin-bottom: 10px; }
.calendar-item { padding: 8px 0; border-bottom: 1px dashed #eee; }
.calendar-item:last-child { border-bottom: none; }
.activity-card.completed {
    background-color: #f7f7f7;
    border-left: 5px solid var(--green-color);
}
.activity-card.completed h3,
.activity-card.completed .activity-desc {
    color: var(--text-light-color);
}
.activity-action {
    flex-shrink: 0; /* Evita que el botón se encoja en pantallas pequeñas */
    margin-left: 10px;
}
.activity-status-completed {
    font-weight: bold;
    color: var(--green-color);
    text-align: right;
}