/* Note Card Styles - Professional Design */
.note-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 220px;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.note-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: var(--accent-color);
}

.note-card.note-updating {
    transition: height 0.3s ease-out, transform 0.3s ease-out, box-shadow 0.3s ease-out;
}

/* Note content and See More button */
.note-content {
    margin-bottom: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Note text container with smooth transitions */
.note-text-container {
    margin-bottom: 0.75rem;
    flex: 1;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.note-text-collapsed,
.note-text-expanded {
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.6;
    word-wrap: break-word;
    white-space: pre-wrap;
    font-weight: 500;
    opacity: 0.9;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
}

.note-text-collapsed {
    opacity: 1;
    transform: translateY(0);
}

.note-text-expanded {
    opacity: 0;
    transform: translateY(10px);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

/* Smooth expansion animation */
.note-card.note-expanded .note-text-container {
    animation: expandContent 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.note-card.note-expanded .note-text-collapsed {
    opacity: 0;
    transform: translateY(-10px);
}

.note-card.note-expanded .note-text-expanded {
    opacity: 1;
    transform: translateY(0);
    position: relative;
}

@keyframes expandContent {
    0% {
        max-height: 100px;
    }
    100% {
        max-height: 500px;
    }
}

/* Smooth collapse animation */
.note-card:not(.note-expanded) .note-text-container {
    animation: collapseContent 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.note-card:not(.note-expanded) .note-text-collapsed {
    opacity: 1;
    transform: translateY(0);
}

.note-card:not(.note-expanded) .note-text-expanded {
    opacity: 0;
    transform: translateY(10px);
    position: absolute;
}

@keyframes collapseContent {
    0% {
        max-height: 500px;
    }
    100% {
        max-height: 100px;
    }
}

.note-text {
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
    word-wrap: break-word;
    white-space: pre-wrap;
    flex: 1;
    font-weight: 500;
    opacity: 0.9;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.see-more-btn {
    background: none;
    color: var(--accent-color);
    border: none;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.75rem;
    align-self: flex-start;
    text-decoration: none;
    border-radius: 0.5rem;
    backdrop-filter: blur(10px);
    transform: scale(1);
}

.see-more-btn:hover {
    color: var(--accent-hover);
    background: rgba(59, 130, 246, 0.1);
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.see-more-btn i {
    font-size: 0.7rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.note-card.note-expanded .see-more-btn i {
    transform: rotate(180deg);
}

/* Smooth button animation */
.see-more-btn:active {
    transform: scale(0.98);
}

/* Expansion animation */
.note-card.note-expanding {
    animation: expandCard 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes expandCard {
    from {
        min-height: 220px;
    }
    to {
        min-height: auto;
    }
}

.note-card.note-collapsing {
    animation: collapseCard 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes collapseCard {
    from {
        min-height: auto;
    }
    to {
        min-height: 220px;
    }
}

.note-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.note-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-weight: 600;
    opacity: 0.8;
}

.note-course {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.875rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.05));
    color: var(--accent-color);
    border-radius: 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
    border: 1px solid rgba(59, 130, 246, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
}

.note-course:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.note-audio {
    margin-bottom: 1rem;
}

.note-audio audio {
    width: 100%;
    height: 2rem;
}

.note-status {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.status-badge {
    padding: 0.25rem 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    backdrop-filter: blur(10px);
    transition: all 0.2s ease;
}

.status-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.status-transcribed {
    color: var(--success-color);
}

.status-processing {
    color: var(--text-muted);
}

.status-ai {
    color: var(--accent-color);
}

/* Note actions (Edit/Delete) */
.note-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: auto;
    padding-top: 1rem;
}

.note-actions .note-edit,
.note-actions .note-delete {
    padding: 0.625rem 1.25rem;
    border-radius: 0.75rem;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.025em;
    backdrop-filter: blur(10px);
}

.note-actions .note-edit {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.05));
    color: var(--accent-color);
    border-color: rgba(59, 130, 246, 0.3);
}

.note-actions .note-edit:hover {
    background: linear-gradient(135deg, var(--accent-color), #3b82f6);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
    border-color: var(--accent-color);
}

.note-actions .note-delete {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.05));
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

.note-actions .note-delete:hover {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
    border-color: #ef4444;
}

/* Fade in animation with stagger */
.fade-in {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger animation for multiple cards */
.note-card:nth-child(1) { animation-delay: 0.1s; }
.note-card:nth-child(2) { animation-delay: 0.2s; }
.note-card:nth-child(3) { animation-delay: 0.3s; }
.note-card:nth-child(4) { animation-delay: 0.4s; }
.note-card:nth-child(5) { animation-delay: 0.5s; }

/* Voice note placeholder styling */
.voice-placeholder {
    color: var(--text-muted);
    font-style: italic;
    opacity: 0.8;
    margin: 0;
}

/* Custom Audio Player */
.note-audio {
    margin: 1rem 0;
}

.custom-audio-player {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
}

.audio-play-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.audio-play-btn:hover {
    background: var(--accent-hover);
    transform: scale(1.05);
}

.audio-info {
    display: flex;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
    min-width: 80px;
}

.audio-progress-container {
    flex: 1;
    min-width: 100px;
}

.audio-progress-bar {
    width: 100%;
    height: 4px;
    background: var(--bg-primary);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.audio-progress-fill {
    height: 100%;
    background: var(--accent-color);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s ease;
}

.audio-controls {
    display: flex;
    gap: 0.5rem;
}

.audio-speed-btn {
    padding: 0.25rem 0.5rem;
    background: var(--bg-primary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 35px;
}

.audio-speed-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.hidden-audio {
    display: none;
}
.note-card:nth-child(6) { animation-delay: 0.6s; }
