:root {
    --bg-dark: #0f172a;
    --card-bg: #1e293b;
    --primary: #8b5cf6; 
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }

body { background-color: var(--bg-dark); color: var(--text-main); padding-bottom: 50px; }


nav {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1.5rem 5%; background: rgba(15, 23, 42, 0.9);
    border-bottom: 1px solid #334155; position: sticky; top: 0; z-index: 100;
    backdrop-filter: blur(10px);
}
.logo { font-family: 'Fira Code', monospace; font-size: 1.5rem; font-weight: bold; }
.highlight { color: var(--primary); }

main { max-width: 1000px; margin: 0 auto; padding: 2rem; }


.input-section h2 { margin-bottom: 1rem; color: var(--text-muted); font-size: 1rem; text-transform: uppercase; letter-spacing: 1px; }

.card-form {
    background: var(--card-bg); padding: 2rem; border-radius: 12px;
    border: 1px solid #334155; box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.row { display: flex; gap: 1rem; margin-bottom: 1rem; }
input, select {
    background: #0f172a; border: 1px solid #334155; color: white;
    padding: 12px; border-radius: 8px; width: 100%; outline: none;
}
input:focus { border-color: var(--primary); }
.note-input { width:70%; } 


.tag-selector { display: flex; gap: 10px; margin-bottom: 1.5rem; flex-wrap: wrap; }
.tag-btn {
    padding: 6px 12px; background: #334155; border-radius: 20px;
    font-size: 0.85rem; cursor: pointer; transition: 0.2s;
}
.tag-btn.selected { background: var(--primary); color: white; }

#addBtn {
    width: 100%; padding: 12px; background: var(--primary); color: white;
    border: none; border-radius: 8px; font-weight: bold; cursor: pointer;
}
#addBtn:hover { background: #7c3aed; }


.library-section { margin-top: 3rem; }
.filter-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.grid-container {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem;
}


.card {
    background: var(--card-bg); padding: 1.5rem; border-radius: 12px;
    border: 1px solid #334155; transition: transform 0.2s;
    position: relative;
}
.card:hover { transform: translateY(-5px); border-color: var(--primary); }

.card-header { display: flex; justify-content: space-between; margin-bottom: 10px; }
.badge { font-size: 0.75rem; padding: 4px 8px; border-radius: 4px; font-weight: bold; }
.badge-easy { background: rgba(0, 184, 148, 0.2); color: #00b894; }
.badge-medium { background: rgba(253, 203, 110, 0.2); color: #fdcb6e; }
.badge-hard { background: rgba(255, 118, 117, 0.2); color: #ff7675; }

.link-icon { color: var(--text-muted); text-decoration: none; font-size: 1.2rem; }
.trick { color: #cbd5e1; font-style: italic; margin: 10px 0; font-size: 0.95rem; }
.delete-btn {
    margin-top: 15px; width: 100%; padding: 8px; background: transparent;
    border: 1px solid #ff7675; color: #ff7675; border-radius: 6px; cursor: pointer;
}
.delete-btn:hover { background: #ff7675; color: white; }



.tag-pill {
    background-color: #333;
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-right: 5px;
    border: 1px solid #444;
}



.glass-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;      
    gap: 20px;           
    padding: 1rem 5%;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    background: rgba(30, 41, 59, 0.7); 
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0 0 20px 20px; 
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}


.glow-text {
    font-size: 2rem;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(to right, #a78bfa, #34d399); 
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-emoji {
    font-size: 2rem;
}


.pro-badge {
    font-size: 0.8rem;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: white;
    padding: 2px 8px;
    border-radius: 6px;
    vertical-align: middle;
    margin-left: 8px;
    -webkit-text-fill-color: white; 
}


.stats-card {
    display: flex ;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.05); 
    padding: 10px 20px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.1);
}

.stat-icon {
    font-size: 1.5rem;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
}


@media (max-width: 600px) {
    .glass-header {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        padding-bottom: 20px;
    }

    .stats-card {
        width: 100%;           
        justify-content: center;
        margin-top: 10px;
    }
}