/* Estilos personalizados para Post-it Notes */

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Estilos para las notas */
.note {
    position: relative;
    height: 200px;
    max-width: 200px;
    margin-bottom: 20px;
    transform: rotate(-1deg);
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 1;
}

.note:nth-child(2n) {
    transform: rotate(1deg);
}

.note:nth-child(3n) {
    transform: rotate(-0.5deg);
}

.note:hover {
    transform: rotate(0deg) scale(1.02);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 10;
}

/* Colores de las notas */
.note-yellow {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border: 1px solid #f1c40f;
}

.note-pink {
    background: linear-gradient(135deg, #ff6b9d 0%, #ff8fab 100%);
    border: 1px solid #e91e63;
}

.note-blue {
    background: linear-gradient(135deg, #74b9ff 0%, #81ecec 100%);
    border: 1px solid #3498db;
}

.note-green {
    background: linear-gradient(135deg, #55efc4 0%, #81ecec 100%);
    border: 1px solid #00b894;
}

.note-purple {
    background: linear-gradient(135deg, #a29bfe 0%, #6c5ce7 100%);
    border: 1px solid #6f42c1;
    color: white;
}

/* Contenido de la nota */
.note-content {
    padding: 15px;
    height: 100%;
    position: relative;
}

.note-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 10px;
    word-wrap: break-word;
}

.note-text {
    font-size: 0.9rem;
    line-height: 1.4;
    word-wrap: break-word;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    line-clamp: 6;
    -webkit-box-orient: vertical;
}

.note-date {
    position: absolute;
    bottom: 10px;
    right: 15px;
    font-size: 0.7rem;
    opacity: 0.7;
}

/* Botones de acción de la nota */
.note-actions {
    position: absolute;
    top: 5px;
    right: 5px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    z-index: 10;
    pointer-events: auto;
}

.note:hover .note-actions {
    opacity: 1;
}

.note-actions .btn {
    padding: 5px 8px;
    font-size: 0.8rem;
    margin-left: 2px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    position: relative;
    z-index: 11;
    pointer-events: auto;
    cursor: pointer;
}

.note-actions .btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

/* Efectos de papel */
.note::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 24px,
            rgba(255,255,255,0.1) 25px
        );
    pointer-events: none;
}

/* Modal personalizado */
.modal-content {
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-header {
    border-radius: 15px 15px 0 0;
}

/* Animación de entrada para las notas */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px) rotate(-1deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotate(-1deg);
    }
}

.note-enter {
    animation: fadeInUp 0.5s ease forwards;
}

/* Responsive */
@media (max-width: 768px) {
    .note {
        transform: none !important;
        margin-bottom: 15px;
    }
    .note:hover {
        transform: scale(1.02);
    }
}

/* Forzar 1 columna solo cuando la página mide menos de 500px */
@media (max-width: 500px) {
    #notesContainer > .col-lg-3,
    #notesContainer > .col-md-4,
    #notesContainer > .col-sm-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Forzar 2 columnas entre 500px y 576px */
@media (min-width: 500px) and (max-width: 575.98px) {
    #notesContainer > .col-lg-3,
    #notesContainer > .col-md-4,
    #notesContainer > .col-sm-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-state h3 {
    margin-bottom: 10px;
    font-weight: 300;
}

.empty-state p {
    font-size: 1.1rem;
    opacity: 0.7;
}

/* Modal de visualización */
#viewNoteModal .modal-content {
    border-radius: 20px;
    overflow: hidden;
}

#viewNoteModal .modal-body {
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

#viewNoteContent {
    background: white;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #ffd700;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    font-family: 'Georgia', serif;
    line-height: 1.8;
}