* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: #f5f5f5;
    padding: 0;
    text-align: center;
    position: relative;
}

.header-banner {
    max-width: 1200px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.header-help-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #2c5f2d;
    color: white;
    border: 3px solid white;
    cursor: pointer;
    font-size: 24px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    z-index: 100;
}

.header-help-btn:hover {
    background: #97bc62;
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

.header-help-btn .help-icon {
    line-height: 1;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.95;
}

.intro {
    background: white;
    padding: 30px;
    margin: 30px 0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.intro-links {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    font-size: 0.95em;
}

.intro-links a {
    color: #2c5f2d;
    font-weight: 600;
    text-decoration: none;
}

.intro-links a:hover {
    text-decoration: underline;
}

.glossary-link {
    background: none;
    border: none;
    color: #2c5f2d;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    font-size: inherit;
    padding: 0;
}

.glossary-link:hover {
    text-decoration: underline;
}

.filters {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.filter-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-label {
    font-weight: 600;
    color: #2c5f2d;
    min-width: 60px;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid #2c5f2d;
    background: white;
    color: #2c5f2d;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: #f0f0f0;
}

.filter-btn.active {
    background: #2c5f2d;
    color: white;
}

/* Category filter colors */
.filter-btn.cat-podcast.active { background: rgba(156, 39, 176, 0.9); border-color: rgba(156, 39, 176, 0.9); color: white; }
.filter-btn.cat-video.active { background: rgba(244, 67, 54, 0.9); border-color: rgba(244, 67, 54, 0.9); color: white; }
.filter-btn.cat-article.active { background: rgba(33, 150, 243, 0.9); border-color: rgba(33, 150, 243, 0.9); color: white; }
.filter-btn.cat-course.active { background: rgba(255, 152, 0, 0.9); border-color: rgba(255, 152, 0, 0.9); color: white; }
.filter-btn.cat-trainer.active { background: rgba(76, 175, 80, 0.9); border-color: rgba(76, 175, 80, 0.9); color: white; }
.filter-btn.cat-shop.active { background: rgba(0, 188, 212, 0.9); border-color: rgba(0, 188, 212, 0.9); color: white; }
.filter-btn.cat-other.active { background: rgba(158, 158, 158, 0.9); border-color: rgba(158, 158, 158, 0.9); color: white; }
.filter-btn.cat-book.active { background: rgba(121, 85, 72, 0.9); border-color: rgba(121, 85, 72, 0.9); color: white; }

.filter-btn.cat-podcast { border-color: rgb(156, 39, 176); color: rgb(156, 39, 176); }
.filter-btn.cat-video { border-color: rgb(244, 67, 54); color: rgb(244, 67, 54); }
.filter-btn.cat-article { border-color: rgb(33, 150, 243); color: rgb(33, 150, 243); }
.filter-btn.cat-course { border-color: rgb(255, 152, 0); color: rgb(255, 152, 0); }
.filter-btn.cat-trainer { border-color: rgb(76, 175, 80); color: rgb(76, 175, 80); }
.filter-btn.cat-shop { border-color: rgb(0, 188, 212); color: rgb(0, 188, 212); }
.filter-btn.cat-book { border-color: rgb(121, 85, 72); color: rgb(121, 85, 72); }
.filter-btn.cat-other { border-color: rgb(158, 158, 158); color: rgb(158, 158, 158); }

/* Featured section */
.featured-section {
    margin-bottom: 40px;
}

.section-title {
    color: #2c5f2d;
    font-size: 1.5em;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::before {
    content: '⭐';
}

.resources-grid,
#resources-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.resource-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.resource-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Featured card styling */
.resource-card.featured {
    position: relative;
    border: 2px solid #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
    animation: shimmer 2s ease-in-out infinite;
}

.resource-card.featured::before {
    content: '⭐';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.5em;
    z-index: 10;
    filter: drop-shadow(0 0 3px rgba(255, 215, 0, 0.8));
}

.resource-card.featured:hover {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
}

@keyframes shimmer {
    0%, 100% {
        box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
    }
    50% {
        box-shadow: 0 0 25px rgba(255, 215, 0, 0.6);
    }
}

.resource-header {
    min-height: 140px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.resource-header.has-image {
    background-color: #2c5f2d;
}

.resource-header.no-image {
    background: linear-gradient(135deg, #2c5f2d 0%, #97bc62 100%);
}

.resource-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 100%);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.resource-header h3 {
    color: white;
    margin: 0 0 10px 0;
    font-size: 1.3em;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.resource-meta-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.resource-header .resource-category,
.resource-header .resource-language {
    color: white;
    margin-bottom: 0;
    padding: 4px 10px;
    font-size: 0.8em;
    border-radius: 12px;
    text-transform: uppercase;
    font-weight: 600;
}

.resource-header .resource-language {
    background: rgba(255,255,255,0.25);
}

.resource-header .resource-location {
    background: rgba(255,255,255,0.25);
    color: white;
    padding: 4px 10px;
    font-size: 0.8em;
    border-radius: 12px;
}

/* Category colors */
.resource-header .resource-category.cat-podcast { background: rgba(156, 39, 176, 0.75); }
.resource-header .resource-category.cat-video { background: rgba(244, 67, 54, 0.75); }
.resource-header .resource-category.cat-article { background: rgba(33, 150, 243, 0.75); }
.resource-header .resource-category.cat-course { background: rgba(255, 152, 0, 0.75); }
.resource-header .resource-category.cat-trainer { background: rgba(76, 175, 80, 0.75); }
.resource-header .resource-category.cat-shop { background: rgba(0, 188, 212, 0.75); }
.resource-header .resource-category.cat-book { background: rgba(121, 85, 72, 0.75); }
.resource-header .resource-category.cat-other { background: rgba(158, 158, 158, 0.75); }

.resource-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.resource-desc {
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
}

.resource-desc:hover {
    color: #2c5f2d;
}

.resource-desc.expanded {
    display: block;
    -webkit-line-clamp: unset;
}

.resource-card {
    display: flex;
    flex-direction: column;
}

.resource-card.hidden {
    display: none;
}

.resource-category {
    display: inline-block;
    padding: 5px 12px;
    background: #97bc62;
    color: white;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.resource-content h3 {
    color: #2c5f2d;
    margin-bottom: 10px;
    font-size: 1.4em;
}

.resource-desc {
    color: #666;
    margin-bottom: 15px;
}

.resource-language {
    display: inline-block;
    padding: 3px 8px;
    background: #e0e0e0;
    border-radius: 10px;
    font-size: 0.8em;
    margin-bottom: 10px;
}

.resource-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.resource-link {
    display: inline-block;
    padding: 10px 20px;
    background: #2c5f2d;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.resource-link:hover {
    background: #1f4420;
}

.share-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    border: 2px solid rgba(221, 221, 221, 0.8);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    backdrop-filter: blur(4px);
}

.share-btn:hover {
    background: rgba(224, 224, 224, 0.98);
    border-color: #2c5f2d;
    transform: scale(1.1);
}

.share-btn svg {
    flex-shrink: 0;
}

.share-btn.copied {
    background: #2c5f2d;
    color: white;
    border-color: #2c5f2d;
}

@keyframes success-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
}

.resource-card.highlighted {
    animation: highlight-pulse 0.8s ease-in-out 8;
    box-shadow: 0 0 0 6px #97bc62;
    outline: 3px solid #2c5f2d;
    outline-offset: 3px;
}

@keyframes highlight-pulse {
    0%, 100% {
        box-shadow: 0 0 0 6px #97bc62, 0 0 30px rgba(151, 188, 98, 0.6);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 10px #97bc62, 0 0 50px rgba(151, 188, 98, 0.8);
        transform: scale(1.02);
    }
}

footer {
    background: #333;
    color: white;
    padding: 30px 0;
    margin-top: 40px;
    text-align: center;
}

footer p {
    margin: 5px 0;
}

footer a {
    color: #97bc62;
}

footer a:hover {
    color: #b8d88a;
}

.help-link {
    background: none;
    border: none;
    color: #97bc62;
    text-decoration: underline;
    cursor: pointer;
    font-size: inherit;
}

.help-link:hover {
    color: #b8d88a;
}

/* Popup */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.popup-overlay.active {
    display: flex;
}

.popup-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    position: relative;
    color: #333;
}

.popup-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2em;
    cursor: pointer;
    color: #666;
    line-height: 1;
}

.popup-close:hover {
    color: #333;
}

.popup-content h2 {
    color: #2c5f2d;
    margin-bottom: 15px;
}

.popup-content ol {
    margin: 15px 0 15px 20px;
}

.popup-content li {
    margin-bottom: 8px;
}

.popup-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 12px 25px;
    background: #2c5f2d;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
}

.popup-btn:hover {
    background: #1f4420;
}

/* Glossary popup - larger and scrollable */
.popup-content.glossary {
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
}

.popup-content.glossary h2 {
    position: sticky;
    top: -30px;
    background: white;
    padding: 15px 0;
    margin: -15px 0 15px 0;
    border-bottom: 1px solid #eee;
}

.popup-content.glossary h3 {
    color: #2c5f2d;
    margin: 25px 0 15px 0;
    font-size: 1.1em;
}

.popup-content.glossary h4 {
    color: #555;
    margin: 20px 0 10px 0;
    font-size: 1em;
}

.popup-content.glossary table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0 20px 0;
    font-size: 0.95em;
}

.popup-content.glossary th,
.popup-content.glossary td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.popup-content.glossary th {
    background: #f5f5f5;
    font-weight: 600;
    color: #2c5f2d;
}

.popup-content.glossary tr:hover {
    background: #fafafa;
}

.popup-content.glossary .glossary-links {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.popup-content.glossary .glossary-links a {
    color: #2c5f2d;
    display: block;
    margin: 5px 0;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
    }

    .header-banner {
        border-radius: 8px;
    }

    #resources-container {
        grid-template-columns: 1fr;
    }

    .filters {
        justify-content: center;
    }
}
