/* ============================================
   ZIKPIC - COMPONENTES ADICIONALES
   Modales, Formularios, Cards, etc.
   ============================================ */

/* ============================================
   MODALES
   ============================================ */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.9) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.modal-header {
    /* display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-6) var(--spacing-6) var(--spacing-4);
    border-bottom: 1px solid var(--light); */
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: var(--spacing-6) 1.5rem var(--spacing-6) var(--spacing-4);
    border-bottom: 1px solid var(--light);
    flex-direction: column;
}

.modal-header h3 {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--dark);
}

.modal-close {
    background: none;
    border: none;
    font-size: var(--font-size-lg);
    color: var(--gray);
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--light);
    color: var(--dark);
}

.modal-body {
    padding: var(--spacing-6);
}

.modal-footer {
    padding: var(--spacing-4) var(--spacing-6) var(--spacing-6);
    border-top: 1px solid var(--light);
    text-align: center;
}

.modal-footer p {
    color: var(--gray);
    font-size: var(--font-size-sm);
}

.modal-footer .link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.modal-footer .link:hover {
    text-decoration: underline;
}

/* ============================================
   FORMULARIOS
   ============================================ */

.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-4);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-2);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-4);
}

.form-group label {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--dark);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: var(--spacing-3) var(--spacing-4);
    border: 2px solid var(--light);
    border-radius: var(--radius);
    font-size: var(--font-size-sm);
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
}

.form-group input.error,
.form-group textarea.error,
.form-group select.error {
    border-color: var(--error);
}

.form-help {
    font-size: var(--font-size-xs);
    color: var(--gray);
}

.form-error {
    font-size: var(--font-size-xs);
    color: var(--error);
}

.form-success {
    font-size: var(--font-size-xs);
    color: var(--success);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--font-size-sm);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
    cursor: pointer;
    font-size: var(--font-size-sm);
    color: var(--gray);
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.checkmark {
    position: relative;
    width: 20px;
    height: 20px;
    border: 2px solid var(--light);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--white);
    font-size: 12px;
    font-weight: bold;
}

.link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.divider {
    position: relative;
    text-align: center;
    margin: var(--spacing-6) 0;
    color: var(--gray);
    font-size: var(--font-size-sm);
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--light);
    z-index: -1;
}

.divider span {
    background: var(--white);
    padding: 0 var(--spacing-4);
}

.oauth-buttons {
    display: flex;
    gap: var(--spacing-2);
}

.oauth-buttons .btn {
    flex: 1;
    justify-content: center;
    padding: var(--spacing-3) var(--spacing-2);
    font-size: var(--font-size-xs);
}

/* ============================================
   CREAR CONTENIDO
   ============================================ */

.create-options {
    display: grid;
    gap: var(--spacing-4);
}

.create-option {
    display: flex;
    align-items: center;
    gap: var(--spacing-4);
    padding: var(--spacing-6);
    border: 2px solid var(--light);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition);
}

.create-option:hover {
    border-color: var(--primary);
    background: rgba(46, 204, 113, 0.05);
}

.create-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--white);
    flex-shrink: 0;
}

.create-option h4 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: var(--spacing-2);
    color: var(--dark);
}

.create-option p {
    color: var(--gray);
    font-size: var(--font-size-sm);
    line-height: 1.5;
}

/* ============================================
   CARDS DE SERIES AVANZADAS
   ============================================ */

.series-card-horizontal {
    display: flex;
    gap: var(--spacing-4);
    padding: var(--spacing-4);
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.series-card-horizontal:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.series-card-horizontal .card-thumbnail {
    width: 120px;
    height: 160px;
    flex-shrink: 0;
    border-radius: var(--radius);
    overflow: hidden;
}

.series-card-horizontal .card-content {
    flex: 1;
    padding: 0;
}

.series-card-horizontal .card-title {
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-2);
}

.series-card-horizontal .card-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-4);
    margin-bottom: var(--spacing-3);
    font-size: var(--font-size-sm);
    color: var(--gray);
}

.series-card-horizontal .card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-2);
    margin-bottom: var(--spacing-3);
}

.tag {
    display: inline-block;
    padding: var(--spacing-1) var(--spacing-2);
    background: var(--light);
    color: var(--gray);
    border-radius: var(--radius);
    font-size: var(--font-size-xs);
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}

.tag:hover {
    background: var(--primary);
    color: var(--white);
}

.tag.primary {
    background: var(--primary);
    color: var(--white);
}

/* ============================================
   NOTIFICACIONES Y ALERTAS
   ============================================ */

.alert {
    padding: var(--spacing-4);
    border-radius: var(--radius);
    margin-bottom: var(--spacing-4);
    border-left: 4px solid;
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-3);
}

.alert-success {
    background: rgba(46, 204, 113, 0.1);
    border-color: var(--success);
    color: #155724;
}

.alert-warning {
    background: rgba(243, 156, 18, 0.1);
    border-color: var(--warning);
    color: #856404;
}

.alert-error {
    background: rgba(231, 76, 60, 0.1);
    border-color: var(--error);
    color: #721c24;
}

.alert-info {
    background: rgba(23, 162, 184, 0.1);
    border-color: var(--info);
    color: #0c5460;
}

.alert-icon {
    font-size: var(--font-size-lg);
    flex-shrink: 0;
}

.alert-content h4 {
    margin-bottom: var(--spacing-2);
    font-weight: 600;
}

.alert-close {
    background: none;
    border: none;
    font-size: var(--font-size-lg);
    cursor: pointer;
    color: inherit;
    opacity: 0.5;
    transition: var(--transition);
    margin-left: auto;
}

.alert-close:hover {
    opacity: 1;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.toast-container {
    position: fixed;
    top: var(--spacing-6);
    right: var(--spacing-6);
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-3);
}

.toast {
    background: var(--white);
    padding: var(--spacing-4);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--primary);
    min-width: 300px;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
    animation: toastSlideIn 0.3s ease;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    border-color: var(--success);
}

.toast.error {
    border-color: var(--error);
}

.toast.warning {
    border-color: var(--warning);
}

.toast-icon {
    font-size: var(--font-size-lg);
    color: var(--primary);
}

.toast.success .toast-icon {
    color: var(--success);
}

.toast.error .toast-icon {
    color: var(--error);
}

.toast.warning .toast-icon {
    color: var(--warning);
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    margin-bottom: var(--spacing-1);
    font-size: var(--font-size-sm);
}

.toast-message {
    font-size: var(--font-size-xs);
    color: var(--gray);
}

.toast-close {
    background: none;
    border: none;
    font-size: var(--font-size-base);
    color: var(--gray);
    cursor: pointer;
    opacity: 0.5;
    transition: var(--transition);
}

.toast-close:hover {
    opacity: 1;
}

/* ============================================
   TOOLTIPS
   ============================================ */

.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
    transform: translateY(-5px);
}

.tooltip-text {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark);
    color: var(--white);
    padding: var(--spacing-2) var(--spacing-3);
    border-radius: var(--radius);
    font-size: var(--font-size-xs);
    white-space: nowrap;
    z-index: 1;
    transition: var(--transition);
    margin-bottom: var(--spacing-1);
}

.tooltip-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--dark);
}

/* ============================================
   DIVISIONES BADGES
   ============================================ */

.division-badge-small {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-1);
    padding: var(--spacing-1) var(--spacing-2);
    border-radius: var(--radius);
    font-size: var(--font-size-xs);
    font-weight: 600;
}

.division-badge-small.beta {
    background: rgba(241, 196, 15, 0.1);
    color: #F1C40F;
    border: 1px solid rgba(241, 196, 15, 0.3);
}

.division-badge-small.pro {
    background: rgba(230, 126, 34, 0.1);
    color: #E67E22;
    border: 1px solid rgba(230, 126, 34, 0.3);
}

/* ============================================
   LOADING STATES
   ============================================ */

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.skeleton {
    background: linear-gradient(90deg, var(--light) 25%, #f0f0f0 50%, var(--light) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 1em;
    margin-bottom: var(--spacing-2);
    border-radius: var(--radius-sm);
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
}

.skeleton-card {
    height: 200px;
    border-radius: var(--radius-lg);
}

/* ============================================
   RESPONSIVE PARA COMPONENTES
   ============================================ */

@media (max-width: 768px) {
    .modal-content {
        margin: var(--spacing-4);
        max-height: calc(100vh - 2rem);
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .oauth-buttons {
        flex-direction: column;
    }
    
    .oauth-buttons .btn {
        font-size: var(--font-size-sm);
        padding: var(--spacing-3);
    }
    
    .series-card-horizontal {
        flex-direction: column;
    }
    
    .series-card-horizontal .card-thumbnail {
        width: 100%;
        height: 200px;
    }
    
    .toast-container {
        top: var(--spacing-4);
        right: var(--spacing-4);
        left: var(--spacing-4);
    }
    
    .toast {
        min-width: auto;
    }
    
    .create-option {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-3);
    }
}

@media (max-width: 480px) {
    .modal-content {
        margin: var(--spacing-2);
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: var(--spacing-4);
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: var(--spacing-3);
    }
}

/* ============================================
   MODAL DE REPORTES - MASONRY/GALLERY
   ============================================ */

.masonry-report-modal-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.masonry-report-modal-header i {
    color: #dc3545;
    font-size: 1.5rem;
    margin-right: 12px;
}

.masonry-report-modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.3rem;
}

.masonry-report-modal-description {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

.report-reasons {
    margin-bottom: 20px;
}

.report-reason-label {
    display: block;
    cursor: pointer;
    padding: 10px;
    border-radius: 6px;
    transition: background 0.2s;
}

.report-reason-label:hover {
    background: #f5f5f5;
}

.report-reason-label input[type="radio"] {
    margin-right: 8px;
    cursor: pointer;
}

.report-reason-label span {
    color: #333;
    font-size: 0.95rem;
}

.report-description-container {
    margin-bottom: 20px;
}

.report-description-label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: #555;
    font-size: 0.9rem;
}

.report-description-textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    resize: vertical;
    font-family: inherit;
}

.report-description-textarea:focus {
    outline: none;
    border-color: #81d742;
    box-shadow: 0 0 0 3px rgba(129, 215, 66, 0.1);
}

.report-modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.report-cancel-btn {
    padding: 10px 20px;
    border: 1px solid #ccc;
    background: white;
    color: #666;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.report-cancel-btn:hover {
    background: #f5f5f5;
    border-color: #999;
}

.report-submit-btn {
    padding: 10px 20px;
    border: none;
    background: #dc3545;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.report-submit-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.report-submit-btn:not(:disabled):hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.report-submit-btn i {
    margin-right: 6px;
}

@media (max-width: 480px) {
.report-reason-label span {
    font-size: 0.85rem;
}
.report-reason-label {
    padding: 5px;
    font-size: 0.8rem;
}
}

/* ===================================
   POST REPORT MODAL (profile.php, social.php)
   =================================== */

/* Header del modal de reporte de publicaciones */
.post-report-modal-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.post-report-modal-header i {
    color: #dc3545;
    font-size: 1.5rem;
    margin-right: 12px;
}

.post-report-modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.3rem;
}

/* Descripción del modal de publicaciones */
.post-report-description {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Botones del modal de publicaciones */
.post-report-cancel-btn {
    padding: 10px 20px;
    border: 1px solid #ccc;
    background: white;
    color: #666;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.post-report-cancel-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.post-report-submit-btn {
    padding: 10px 20px;
    border: none;
    background: #dc3545;
    color: white;
    border-radius: 6px;
    cursor: not-allowed;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    opacity: 0.5;
}

.post-report-submit-btn:not(:disabled) {
    opacity: 1;
    cursor: pointer;
}

.post-report-submit-btn:not(:disabled):hover {
    background: #b91c1c;
}

.post-report-submit-btn i {
    margin-right: 6px;
}

/* ===================================
   AUTHOR LINKS
   =================================== */

.author-name-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s ease;
}

.author-name-link:hover {
    color: #81d742;
}

/* ===================================
   EMOJI PICKER (profile.php composer)
   =================================== */

.emoji-picker-close-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 18px;
    color: #666;
    cursor: pointer;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.emoji-picker-close-btn:hover {
    background: #e9ecef;
    color: #333;
}

.emoji-item {
    cursor: pointer;
    padding: 8px;
    font-size: 20px;
    border-radius: 6px;
    transition: background 0.2s;
    display: inline-block;
    text-align: center;
    min-width: 36px;
    height: 36px;
    line-height: 20px;
}

.emoji-item:hover {
    background: #f0f0f0;
}

/* ===================================
   SERIES CARD (profile.php)
   =================================== */

.series-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    margin: 10px 0;
    display: flex;
    align-items: center;
    background: #f9f9f9;
    cursor: pointer;
    transition: background 0.2s;
}

.series-card:hover {
    background: #f0f0f0;
}

.series-card .series-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 12px;
    flex-shrink: 0;
}

.series-card .series-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.series-card .series-info {
    flex: 1;
    min-width: 0;
}

.series-card .series-title {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.series-card .series-description {
    font-size: 12px;
    color: #666;
    margin-bottom: 2px;
}

.series-card .series-author {
    font-size: 11px;
    color: #888;
}

