* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.favorites-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px 20px;
}

.page-hero {
    max-width: 1200px;
    margin: 0 auto 40px;
    background: white;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 25px;
}

.hero-icon {
    font-size: 5rem;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.1); }
    50% { transform: scale(1); }
}

.hero-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
   background: linear-gradient(135deg, #667eea, #764ba2);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    color: #64748b;
    font-size: 1.1rem;
}

.hero-stats {
    display: flex;
    gap: 20px;
}

.stat-badge {
    background: linear-gradient(135deg, #ec4899 0%, #ef4444 100%);
    color: white;
    padding: 25px 35px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(236, 72, 153, 0.4);
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.95;
    margin-top: 8px;
}

.notes-container {
    max-width: 1200px;
    margin: 0 auto;
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

/* Loading Skeleton */
.loading-skeleton {
    display: contents;
}

.skeleton-card {
    background: white;
    border-radius: 16px;
    height: 280px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Note Cards */
.note-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.note-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.note-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.note-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.3;
    margin-bottom: 10px;
}

.btn-unfavorite {
    background: linear-gradient(135deg, #ec4899 0%, #ef4444 100%);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 22px;
    transition: all 0.3s;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
}

.btn-unfavorite:hover {
    transform: scale(1.15) rotate(10deg);
    box-shadow: 0 8px 25px rgba(236, 72, 153, 0.5);
}

.note-subject {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.note-description {
    display: -webkit-box;
    -webkit-box-orient: vertical;

    -webkit-line-clamp: 2; /* WebKit */
    line-clamp: 2;         /* Standard */

    overflow: hidden;
}

.note-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    color: #94a3b8;
    font-size: 0.85rem;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.note-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.note-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.btn-action {
    padding: 12px 20px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-download {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.btn-view {
    background: white;
    color: #475569;
    border: 2px solid #e2e8f0;
}

.btn-view:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.btn-remove {
    background: #fee2e2;
    color: #dc2626;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-remove:hover {
    background: #fecaca;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

.btn-download {
    background: #dbeafe;
    color: #2563eb;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-download:hover {
    background: #bfdbfe;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.note-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
}

/* Empty State */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 100px 20px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.empty-icon {
    font-size: 8rem;
    margin-bottom: 30px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.empty-state h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 15px;
}

.empty-state p {
    color: #64748b;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .page-hero {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    
    .notes-grid {
        grid-template-columns: 1fr;
    }
}