:root {
    --nnp-primary: #0073aa;
    --nnp-bg: #f6f7f7;
    --nnp-card-bg: #ffffff;
    --nnp-text: #2c3338;
    --nnp-border: #dcdcde;
}

.nnp-container { max-width: 1200px; margin: 20px auto; font-family: sans-serif; }
.nnp-header { margin-bottom: 30px; }
#nnp-search { width: 100%; padding: 15px; border: 2px solid var(--nnp-border); border-radius: 10px; font-size: 16px; }

.nnp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }

.nnp-card { 
    background: var(--nnp-card-bg); border: 1px solid var(--nnp-border); border-radius: 12px; 
    padding: 20px; display: flex; flex-direction: column; text-decoration: none; color: inherit;
    transition: all 0.2s ease;
}
.nnp-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); border-color: var(--nnp-primary); }

/* Kontener Ikony */
.nnp-icon-wrapper {
    width: 54px; height: 54px; border-radius: 12px; margin-bottom: 15px;
    display: flex; align-items: center; justify-content: center; overflow: hidden; background: #f0f0f1;
}
.nnp-favicon { width: 32px; height: 32px; object-fit: contain; }
.nnp-fallback { 
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; 
    color: white; font-weight: bold; font-size: 24px; text-transform: uppercase; 
}

/* Kolory zgodne z wymogiem (pkt 8) */
.cat-autorskie { background-color: #0073aa; }
.cat-ai { background-color: #8e44ad; }
.cat-mapy { background-color: #27ae60; }
.cat-wycena { background-color: #f39c12; }
.cat-grafika { background-color: #e74c3c; }
.cat-wideo { background-color: #1abc9c; }
.cat-drony { background-color: #2c3e50; }
.cat-komunikacja { background-color: #3498db; }
.cat-social { background-color: #e1306c; }
.cat-chmura { background-color: #7f8c8d; }
.cat-formalnosci { background-color: #d35400; }

.category-tag { font-size: 10px; text-transform: uppercase; color: #888; margin-bottom: 5px; display: block; }
.nnp-card h3 { margin: 0 0 10px 0; font-size: 18px; }
.nnp-platforms { margin-top: auto; padding-top: 15px; font-size: 18px; display: flex; gap: 8px; }

.nnp-footer { margin-top: 50px; padding: 20px; border-top: 1px solid #eee; text-align: center; color: #666; font-size: 13px; }

/* Style dla ulubionych */
.nnp-favorite-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,255,255,0.8);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid #ddd;
    transition: all 0.2s ease;
    z-index: 10;
    font-size: 18px;
}
.nnp-favorite-btn:hover { background: #fff; transform: scale(1.1); }
.nnp-favorite-btn.is-active { color: #e74c3c; border-color: #e74c3c; }

.nnp-card { position: relative; } /* Potrzebne do pozycjonowania serca */

/* Przełącznik widoków */
.nnp-view-toggle button {
    background: #fff;
    border: 1px solid var(--nnp-border);
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 6px;
    font-size: 18px;
    transition: all 0.2s;
}
.nnp-view-toggle button.active {
    background: var(--nnp-primary);
    color: #fff;
    border-color: var(--nnp-primary);
}

/* WIDOK LISTY (is-list-view) */
.nnp-grid.is-list-view {
    grid-template-columns: 1fr; /* Jeden pod drugim */
}

.nnp-grid.is-list-view .nnp-card {
    flex-direction: row;
    align-items: center;
    padding: 10px 20px;
    gap: 20px;
}

.nnp-grid.is-list-view .nnp-icon-wrapper {
    margin-bottom: 0;
    width: 40px;
    height: 40px;
}

.nnp-grid.is-list-view .nnp-icon-wrapper .nnp-favicon {
    width: 24px;
    height: 24px;
}

.nnp-grid.is-list-view .nnp-icon-wrapper .nnp-fallback {
    font-size: 16px;
}

.nnp-grid.is-list-view h3 {
    margin: 0;
    font-size: 16px;
    flex: 1;
}

.nnp-grid.is-list-view .category-tag {
    margin: 0;
    width: 120px;
    text-align: right;
}

.nnp-grid.is-list-view .nnp-platforms {
    margin: 0;
    padding: 0;
}

@media (max-width: 600px) {
    .nnp-grid.is-list-view .category-tag { display: none; }
}

/* Styl kafelka dodawania */
.nnp-card-add {
    border: 2px dashed var(--nnp-border);
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    cursor: pointer;
    text-align: center;
}
.nnp-card-add:hover { border-color: var(--nnp-primary); color: var(--nnp-primary); }
.nnp-add-icon { font-size: 40px; margin-bottom: 10px; opacity: 0.5; }

/* Modal */
.nnp-modal {
    display: none; position: fixed; z-index: 1000; left: 0; top: 0;
    width: 100%; height: 100%; background: rgba(0,0,0,0.6);
    align-items: center; justify-content: center;
}
.nnp-modal-content {
    background: #fff; padding: 30px; border-radius: 15px; width: 90%; max-width: 400px;
    position: relative; box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}
.nnp-modal-close { position: absolute; top: 15px; right: 20px; font-size: 24px; cursor: pointer; }
.nnp-modal h2 { margin-top: 0; font-size: 20px; }
.nnp-form-group { margin-bottom: 15px; }
.nnp-form-group label { display: block; margin-bottom: 5px; font-size: 14px; }
.nnp-form-group input { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 6px; }
.nnp-submit-btn { width: 100%; padding: 12px; background: var(--nnp-primary); color: #fff; border: none; border-radius: 6px; cursor: pointer; font-weight: bold; }

/* Hero Section */
.nnp-hero {
    background: linear-gradient(135deg, #fdfdfd 0%, #f4f7f9 100%);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    border: 1px solid var(--nnp-border);
    text-align: center;
}
.nnp-hero h1 { margin: 0 0 10px 0; font-size: 28px; color: var(--nnp-primary); }
.nnp-hero p { color: #666; max-width: 600px; margin: 0 auto 20px auto; line-height: 1.5; }

/* Legenda */
.nnp-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #444;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}
.nnp-legend-item { display: flex; align-items: center; gap: 6px; }

@media (max-width: 600px) {
    .nnp-hero { padding: 20px; }
    .nnp-legend { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* Hero Section */
.nnp-hero {
    background: linear-gradient(135deg, #fdfdfd 0%, #f4f7f9 100%);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    border: 1px solid var(--nnp-border);
    text-align: center;
}
.nnp-hero h1 { margin: 0 0 10px 0; font-size: 28px; color: var(--nnp-primary); }
.nnp-hero p { color: #666; max-width: 600px; margin: 0 auto 20px auto; line-height: 1.5; }

/* Legenda */
.nnp-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #444;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}
.nnp-legend-item { display: flex; align-items: center; gap: 6px; }

@media (max-width: 600px) {
    .nnp-hero { padding: 20px; }
    .nnp-legend { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* Styl dla profesjonalnych ikon platform */
.nnp-platform-svg {
    width: 18px;
    height: 18px;
    fill: #888; /* Neutralny szary */
    transition: fill 0.2s;
}
.nnp-card:hover .nnp-platform-svg {
    fill: var(--nnp-primary); /* Zmiana koloru na niebieski przy najechaniu */
}
.nnp-platforms {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Ikony w legendzie */
.nnp-legend-svg {
    width: 16px;
    height: 16px;
    fill: #444;
    vertical-align: middle;
    margin-right: 4px;
}
.nnp-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}
.nnp-legend-icons {
    display: flex;
    gap: 4px;
    align-items: center;
}

/* Styl dla Szybkich Akcji */
.nnp-card.is-quick-action {
    border: 1.5px solid #f1c40f; /* Złoty kolor */
    background: linear-gradient(180deg, #ffffff 0%, #fffdf5 100%);
}
.nnp-quick-badge {
    position: absolute;
    bottom: 40px;
    right: 15px;
    background: #f1c40f;
    color: #000;
    font-size: 9px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
