/* 
  NOTES PAGE REDESIGN - Cyberpunk Resource Hub 
  Variable Override & Specialized Tokens
*/

:root {
    --notes-accent-1: #00e5ff; /* Cyan */
    --notes-accent-2: #c084fc; /* soft purple */
    --notes-accent-3: #00e676; /* green */
    --card-hover-bg: rgba(255, 255, 255, 0.05);
}

body {
    background: transparent;
    padding-bottom: 0;
}

/* --- HEADER & HERO --- */
.notes-hero {
    padding: 8rem 1rem 4rem;
    text-align: center;
    position: relative;
    background: radial-gradient(circle at top, rgba(0, 229, 255, 0.05) 0%, transparent 70%);
}

.notes-hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -1px;
    background: linear-gradient(135deg, var(--notes-accent-1), var(--notes-accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 15px rgba(0, 229, 255, 0.2));
}

.notes-hero .subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 3rem;
    opacity: 0.8;
}

/* --- SEARCH & FILTER UI --- */
.filter-container {
    max-width: 800px;
    margin: 0 auto 4rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.search-wrapper {
    position: relative;
    width: 100%;
}

.search-wrapper i.fa-magnifying-glass {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--notes-accent-1);
    font-size: 1.2rem;
    pointer-events: none;
    z-index: 10;
    opacity: 0.8;
}

#notes-search {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.2rem 1.5rem 1.2rem 3.8rem; /* Enough left padding for the icon */
    border-radius: 100px;
    color: white;
    font-family: var(--font-body);
    font-size: 1rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    outline: none;
}

#notes-search:focus {
    border-color: var(--notes-accent-1);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.2);
}

.search-wrapper i {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--notes-accent-1);
    font-size: 1.2rem;
    pointer-events: none;
}

#clear-search {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

#clear-search:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.filter-tabs {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.02);
    padding: 0.5rem;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.tab {
    padding: 0.6rem 1.5rem;
    border-radius: 100px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tab:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.tab.active {
    background: var(--notes-accent-1);
    color: black;
    font-weight: 700;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.4);
}

/* --- RESOURCE GRID --- */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
    padding-bottom: 5rem;
}

.resource-card {
    background: rgba(8, 8, 12, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: left; /* Left aligned for sleekness */
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Category Accent Bar */
.resource-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent);
    opacity: 0.6;
    transition: 0.3s;
}

.resource-card:hover::after {
    width: 6px;
    opacity: 1;
}

/* Theme colors for cards */
.resource-card.theme-notes { --accent: var(--notes-accent-1); }
.resource-card.theme-sheet { --accent: var(--notes-accent-2); }
.resource-card.theme-prep { --accent: var(--notes-accent-3); }

/* Hover effects */
.resource-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(12, 12, 18, 0.95), rgba(8, 8, 12, 0.9));
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(var(--accent), 0.1);
}

.resource-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle at 70% 30%, var(--accent), transparent 70%);
    opacity: 0.05;
    pointer-events: none;
}

.card-top {
    margin-bottom: 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.resource-icon {
    width: 50px; /* Smaller icon */
    height: 50px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px; /* Square with minor roundness */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--accent);
    transition: 0.3s;
    position: relative;
    z-index: 2;
}

.resource-card:hover .resource-icon {
    background: var(--accent);
    color: black;
    box-shadow: 0 0 20px var(--accent);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    color: white;
    font-family: var(--font-heading);
}

.card-stats {
    display: flex;
    flex-direction: column; /* Stacked stats for smaller width */
    gap: 0.5rem;
    margin-bottom: 1.2rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.card-stats span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-stats span i {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.2);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
}

.card-stats span i {
    color: var(--accent);
    margin-right: 4px;
}

.card-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.btn-card {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.resource-card:hover .btn-card {
    background: var(--accent);
    color: black;
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent);
}

/* Glowing Border Effect on Card Bottom */
.resource-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.4s ease;
    box-shadow: 0 -5px 15px var(--accent);
}

.resource-card:hover::after {
    transform: scaleX(1);
}

/* Empty State */
#empty-state {
    text-align: center;
    padding: 4rem 1rem;
    display: none;
}

#empty-state i {
    font-size: 4rem;
    color: #333;
    margin-bottom: 1rem;
}

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

.resource-card {
    animation: fadeInUp 0.5s ease backwards;
}

/* Responsive */
@media (max-width: 768px) {
    .notes-hero h1 { font-size: 2.5rem; }
    .filter-tabs {
        overflow-x: auto;
        max-width: 100%;
        justify-content: flex-start;
        padding-bottom: 10px; /* Space for scrollbar hide or reveal */
    }
    .filter-tabs::-webkit-scrollbar { display: none; }
}
