/* Google Fonts Manager Styles */
.gfm-font-search-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.gfm-search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    align-items: center;
}

.gfm-search-input {
    flex: 1;
    padding: 12px 15px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.3s;
}

.gfm-search-input:focus {
    outline: none;
    border-color: #0073aa;
}

.gfm-search-btn {
    padding: 12px 24px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.gfm-search-btn:hover {
    background: #005a87;
}

.gfm-search-loading {
    color: #666;
    display: flex;
    align-items: center;
    gap: 10px;
}

.gfm-search-loading .spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.gfm-preview-section {
    margin-bottom: 30px;
}

.gfm-preview-text {
    width: 100%;
    padding: 12px 15px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 4px;
    margin-top: 10px;
}

.gfm-search-results {
    display: grid;
    /* grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); */
    gap: 20px;
    margin-top: 20px;
}

.gfm-font-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.gfm-font-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.gfm-font-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.gfm-font-name {
    font-size: 20px;
    font-weight: bold;
    margin: 0;
    color: #333;
}

.gfm-embed-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: #666;
    padding: 5px;
    border-radius: 4px;
    transition: color 0.3s, background 0.3s;
}

.gfm-embed-btn:hover {
    color: #0073aa;
    background: #f0f0f0;
}

.gfm-font-preview {
    font-size: 24px;
    line-height: 1.4;
    margin: 15px 0;
    min-height: 80px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 4px;
}

.gfm-font-meta {
    font-size: 14px;
    color: #666;
    margin-top: 10px;
}

.gfm-font-meta span {
    display: inline-block;
    margin-right: 10px;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 3px;
}

/* Embed Modal */
.gfm-embed-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.gfm-embed-modal-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
}

.gfm-embed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #0073aa;
    color: white;
}

.gfm-embed-header h3 {
    margin: 0;
}

.gfm-close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    line-height: 30px;
}

.gfm-embed-body {
    padding: 20px;
}

.gfm-embed-code {
    width: 100%;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f9f9f9;
    resize: vertical;
    margin-bottom: 15px;
}

.gfm-copy-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.gfm-copy-btn:hover {
    background: #005a87;
}

.gfm-copy-btn.copied {
    background: #4CAF50;
}

.copy-icon {
    font-size: 18px;
}


/* Alphabet Filter */
.gfm-alphabet-filter {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.gfm-alphabet-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.gfm-alphabet-btn {
    padding: 8px 12px;
    min-width: 40px;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    color: #495057;
    transition: all 0.3s;
}

.gfm-alphabet-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #0073aa;
}

.gfm-alphabet-btn.active {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

/* Explorer Header */
.gfm-explorer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.gfm-explorer-header h3 {
    margin: 0;
    color: #333;
    font-size: 24px;
}

.gfm-explorer-stats {
    font-size: 14px;
    color: #666;
}

.gfm-total-fonts {
    background: #e9ecef;
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: bold;
}

/* Results Header */
.gfm-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.gfm-results-header h3 {
    margin: 0;
    color: #333;
}

.gfm-results-count {
    font-size: 14px;
    color: #666;
    background: #e9ecef;
    padding: 5px 10px;
    border-radius: 20px;
}

/* Clear Button */
.gfm-clear-btn {
    padding: 12px 20px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.gfm-clear-btn:hover {
    background: #5a6268;
}

/* Loading States */
.gfm-loading-explorer {
    text-align: center;
    padding: 40px;
    color: #666;
}

.gfm-loading-explorer .spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    margin-right: 10px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Pagination */
.gfm-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.gfm-page-btn {
    padding: 8px 12px;
    min-width: 40px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    color: #0073aa;
    transition: all 0.3s;
}

.gfm-page-btn:hover:not(.active) {
    background: #f8f9fa;
    border-color: #adb5bd;
}

.gfm-page-btn.active {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

.gfm-page-dots {
    padding: 8px 5px;
    color: #6c757d;
}

.gfm-explorer-pagination,
.gfm-results-pagination {
    margin-top: 20px;
}

/* Font Grid */
.gfm-font-grid {
    display: grid;
    /* grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); */
    gap: 20px;
    margin-top: 20px;
}

/* Empty State */
.gfm-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.gfm-empty-state h4 {
    margin-top: 15px;
    color: #495057;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .gfm-alphabet-list {
        gap: 4px;
    }

    .gfm-alphabet-btn {
        min-width: 35px;
        padding: 6px 8px;
        font-size: 14px;
    }

    .gfm-explorer-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .gfm-font-grid {
        grid-template-columns: 1fr;
    }

    .gfm-pagination {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .gfm-alphabet-list {
        justify-content: flex-start;
    }

    .gfm-alphabet-btn {
        min-width: 30px;
        padding: 5px 6px;
        font-size: 12px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .gfm-search-form {
        flex-direction: column;
        align-items: stretch;
    }

    .gfm-search-results {
        grid-template-columns: 1fr;
    }
}