/* =========================================================
   BROWSE CONTAINER & HEADER
========================================================= */
.browse-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

.browse-header {
    background: linear-gradient(135deg, #1ab82f 0%, #c0cc11 100%);
    color: #ffffff;
    padding: 40px;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.browse-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.browse-header p {
    font-size: 1.1rem;
    opacity: 0.95;
}

/* =========================================================
   SEARCH & FILTERS
========================================================= */
.search-filters-container {
    background: #ffffff;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.search-bar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 15px;
    align-items: center;
    margin-bottom: 28px;
}

.search-input {
    position: relative;
}

.search-input input {
    width: 100%;
    padding: 15px 20px 15px 50px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.search-input input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: #94a3b8;
}

.filter-select {
    min-width: 200px;
    padding: 15px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.note-count {
    margin-bottom: 20px;
    font-size: 15px;
    font-weight: 500;
    color: #64748b;
}

/* =========================================================
   QUICK ACTIONS
========================================================= */
.quick-actions {
    display: flex;
    gap: 15px;
    margin: 20px 0;
}

.btn-favorites,
.btn-history {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    color: #ffffff;
    transition: all 0.3s ease;
}

.btn-favorites {
    background: linear-gradient(135deg, #ec4899 0%, #ef4444 100%);
}

.btn-favorites:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}

.btn-history {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.btn-history:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

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

/* =========================================================
   NOTE CARD
========================================================= */
.note-card {
    position: relative;
    background: #ffffff;
    padding: 25px;
    border-radius: 16px;
    border: 2px solid transparent;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
}

.note-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.note-card:hover {
    transform: translateY(-8px);
    border-color: #667eea;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.note-card:hover::before {
    transform: scaleX(1);
}

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

.note-card-icon {
    width: 56px;
    height: 56px;
    margin-right: 15px;
    border-radius: 14px;
    font-size: 28px;
    color: #2e7d32;
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    border: 2px solid #a5d6a7;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

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

.subject-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.file-type-badge {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    border-radius: 8px;
    text-transform: uppercase;
}

/* =========================================================
   NOTE CONTENT
========================================================= */
.note-description {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}

.note-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.note-meta {
    font-size: 13px;
    color: #64748b;
}

.uploader-name {
    font-weight: 600;
    color: #475569;
}

/* =========================================================
   RATING
========================================================= */
.rating-display {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.stars {
    font-size: 18px;
    color: #fbbf24;
    letter-spacing: 2px;
}

.rating-info {
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
}

/* =========================================================
   BUTTONS
========================================================= */
.btn-download {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-download:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-favorite {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    transition: transform 0.3s ease;
}

.btn-favorite:hover {
    transform: scale(1.2);
}

.btn-favorite:active {
    transform: scale(0.9);
}

/* =========================================================
   EMPTY STATE
========================================================= */
.empty-state {
    padding: 80px 20px;
    text-align: center;
    color: #94a3b8;
}

.empty-state-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 18px;
    font-weight: 500;
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 768px) {
    .search-bar {
        grid-template-columns: 1fr;
    }

    .notes-grid {
        grid-template-columns: 1fr;
    }
}