/* Selfmade Plugins Manager - Frontend Styles */
.spm-plugins-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.spm-plugin-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 30px;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
    position: relative;
    overflow: hidden;
}

.spm-plugin-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.spm-plugin-card h3 {
    margin: 0 0 15px 0;
    color: #2c3338;
    font-size: 1.4em;
    font-weight: 700;
    line-height: 1.3;
}

.spm-plugin-excerpt {
    color: #646970;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 0.95em;
}

.spm-plugin-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f1;
}

.spm-plugin-version {
    background: #0073aa;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 600;
}

.spm-plugin-price {
    font-size: 1.2em;
    font-weight: 700;
}

.spm-price-free {
    color: #00a32a;
}

.spm-price-paid {
    color: #d63638;
}

.spm-plugin-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.spm-download-button,
.spm-details-button {
    flex: 1;
    text-align: center;
    padding: 12px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 0.95em;
}

.spm-download-button {
    background: #0073aa;
    color: white;
}

.spm-download-button:hover {
    background: #005a87;
    color: white;
}

.spm-details-button {
    background: #f6f7f7;
    color: #2c3338;
    border: 1px solid #dcdcde;
}

.spm-details-button:hover {
    background: #e0e0e0;
    color: #2c3338;
}

/* Single Plugin Page */
.spm-single-plugin {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.spm-plugin-header {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 40px;
    text-align: center;
}

.spm-plugin-title {
    font-size: 2.5em;
    margin: 0 0 20px 0;
    color: #1d2327;
}

.spm-plugin-meta-large {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.spm-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #646970;
    font-size: 0.95em;
}

.spm-meta-item strong {
    color: #2c3338;
}

.spm-plugin-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.spm-plugin-description {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.spm-plugin-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.spm-download-box {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
    position: sticky;
    top: 20px;
}

.spm-download-box .spm-download-button {
    display: block;
    width: 100%;
    margin-bottom: 15px;
    font-size: 1.1em;
    padding: 15px;
}

.spm-download-stats {
    font-size: 0.9em;
    color: #646970;
    margin-top: 15px;
}

/* Categories List */
.spm-categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.spm-categories-list li {
    margin-bottom: 10px;
}

.spm-categories-list a {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    background: #fff;
    border-radius: 6px;
    text-decoration: none;
    color: #2c3338;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.spm-categories-list a:hover {
    background: #f6f7f7;
    border-color: #0073aa;
    color: #0073aa;
}

.spm-category-count {
    background: #0073aa;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
}

/* Download Form */
.spm-download-form {
    background: #f6f7f7;
    padding: 30px;
    border-radius: 8px;
    margin: 20px 0;
}

.spm-form-group {
    margin-bottom: 20px;
}

.spm-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3338;
}

.spm-form-group input[type="email"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    font-size: 1em;
}

.spm-form-group input[type="email"]:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
    outline: 2px solid transparent;
}

/* Filter Bar */
.spm-filter-bar {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.spm-filter-select {
    padding: 8px 12px;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    background: #fff;
}

.spm-search-box {
    flex: 1;
    min-width: 200px;
}

.spm-search-box input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #dcdcde;
    border-radius: 4px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .spm-plugins-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .spm-plugin-content {
        grid-template-columns: 1fr;
    }
    
    .spm-plugin-header {
        padding: 30px 20px;
    }
    
    .spm-plugin-title {
        font-size: 2em;
    }
    
    .spm-plugin-meta-large {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .spm-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .spm-search-box {
        min-width: auto;
    }
}

/* Loading Animation */
.spm-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: spm-spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes spm-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Badges */
.spm-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 600;
    margin-left: 8px;
}

.spm-badge-new {
    background: #00a32a;
    color: white;
}

.spm-badge-popular {
    background: #d63638;
    color: white;
}

.spm-badge-update {
    background: #dba617;
    color: white;
}