.wp-block-git-embed-feicode-repository {
    margin: 1.5em 0;
    max-width: 100%;
}

.wp-block-git-embed-feicode-repository.alignleft {
    float: left;
    margin-right: 1.5em;
    max-width: 360px;
}

.wp-block-git-embed-feicode-repository.alignright {
    float: right;
    margin-left: 1.5em;
    max-width: 360px;
}

.wp-block-git-embed-feicode-repository.aligncenter {
    margin-left: auto;
    margin-right: auto;
    max-width: 600px;
}

.wp-block-git-embed-feicode-repository.alignwide {
    max-width: 800px;
}

.wp-block-git-embed-feicode-repository.alignfull {
    max-width: none;
}

.git-embed-card {
    background: #ffffff;
    border: 1px solid #d1d5da;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.15s ease-in-out;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.git-embed-card:hover {
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
}

.git-embed-card-minimal {
    border: none;
    box-shadow: none;
    background: #f9f9f9;
}

.git-embed-card-bordered {
    border: 2px solid #0073aa;
}

.git-embed-card-shadow {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: none;
}

.git-embed-card-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.git-embed-card-gradient .git-embed-title a,
.git-embed-card-gradient .git-embed-site-name a,
.git-embed-card-gradient .git-embed-owner-link {
    color: rgba(255, 255, 255, 0.9);
}

.git-embed-card-gradient .git-embed-description,
.git-embed-card-gradient .git-embed-stat {
    color: rgba(255, 255, 255, 0.8);
}

.git-embed-card-glass {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

.git-embed-site-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e1e4e8;
}

.git-embed-site-favicon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.git-embed-site-name {
    font-size: 14px;
    color: #656d76;
    font-weight: 500;
}

.git-embed-site-name a {
    color: #656d76;
    text-decoration: none;
}

.git-embed-site-name a:hover {
    color: #0969da;
    text-decoration: underline;
}

.git-embed-site-info.platform-github .git-embed-site-name a {
    color: #24292f;
}

.git-embed-site-info.platform-github .git-embed-site-name a:hover {
    color: #0969da;
}

.git-embed-site-info.platform-gitea .git-embed-site-name a {
    color: #609926;
}

.git-embed-site-info.platform-gitea .git-embed-site-name a:hover {
    color: #4a7220;
}

.git-embed-site-info.platform-forgejo .git-embed-site-name a {
    color: #fb923c;
}

.git-embed-site-info.platform-forgejo .git-embed-site-name a:hover {
    color: #ea580c;
}

.git-embed-site-info.platform-gitlab .git-embed-site-name a {
    color: #fc6d26;
}

.git-embed-site-info.platform-gitlab .git-embed-site-name a:hover {
    color: #e24000;
}

.git-embed-site-info.platform-custom .git-embed-site-name a {
    color: #6366f1;
}

.git-embed-site-info.platform-custom .git-embed-site-name a:hover {
    color: #4f46e5;
}

.git-embed-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 12px;
}

.git-embed-title-section {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.git-embed-title-content {
    flex: 1;
    min-width: 0;
}

.git-embed-avatar {
    border-radius: 15%;
    flex-shrink: 0;
    border: 2px solid #e1e4e8;
    padding: 8px;
}

.git-embed-avatar-small {
    width: 26px;
    height: 26px;
}

.git-embed-avatar-medium {
    width: 30px;
    height: 30px;
}

.git-embed-avatar-large {
    width: 35px;
    height: 35px;
}

.git-embed-owner-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    font-size: 12px;
}

.git-embed-owner-type {
    background: #f1f8ff;
    color: #0969da;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.git-embed-owner-link {
    color: #656d76;
    text-decoration: none;
    font-weight: 500;
}

.git-embed-owner-link:hover {
    color: #0969da;
    text-decoration: underline;
}

.git-embed-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.git-embed-repo-icon {
    font-size: 20px;
    margin-top: 2px;
    flex-shrink: 0;
}

.git-embed-title a {
    color: #0969da;
    text-decoration: none;
    word-break: break-word;
}

.git-embed-title a:hover {
    text-decoration: underline;
}

.git-embed-language {
    background: #f6f8fa;
    border: 1px solid #d1d5da;
    border-radius: 12px;
    padding: 1px 8px;
    font-size: 11px;
    font-weight: 500;
    color: #656d76;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 1px;
}

.git-embed-language .dashicons {
    font-size: 14px;
    line-height: 1.25;
}

.git-embed-description {
    color: #656d76;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
    margin: 0 0 16px 0;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.git-embed-description .dashicons {
    margin-top: 2px;
    flex-shrink: 0;
    font-size: 18px;
}

.git-embed-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.git-embed-stat {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #656d76;
    font-weight: 500;
}

.git-embed-stat .dashicons {
    font-size: 16px;
    line-height: 1.25;
}

.git-embed-stat-label {
    font-weight: 400;
}

.git-embed-stat-value {
    font-weight: 500;
}

.git-embed-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.git-embed-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid;
    transition: all 0.15s ease-in-out;
    background: none;
}

.git-embed-button .dashicons {
    font-size: 16px;
line-height: 1.25;
}

.git-embed-button-primary {
    color: #ffffff;
    background-color: #2da44e;
    border-color: #2da44e;
}

.git-embed-button-primary:hover {
    background-color: #2c974b;
    border-color: #2c974b;
    color: #ffffff;
    text-decoration: none;
}

.git-embed-button-secondary {
    color: #24292f;
    background-color: #f6f8fa;
    border-color: #d1d5da;
}

.git-embed-button-secondary:hover {
    background-color: #f3f4f6;
    border-color: #c7ccd1;
    color: #24292f;
    text-decoration: none;
}

.git-embed-button-outline {
    color: #0073aa;
    background-color: transparent;
    border-color: #0073aa;
}

.git-embed-button-outline:hover {
    background-color: #0073aa;
    color: #ffffff;
    text-decoration: none;
}

.git-embed-button-ghost {
    color: #0073aa;
    background-color: transparent;
    border-color: transparent;
}

.git-embed-button-ghost:hover {
    background-color: rgba(0, 115, 170, 0.1);
    border-color: #0073aa;
    color: #0073aa;
    text-decoration: none;
}

.git-embed-button-default {
    color: #24292f;
    background-color: #f6f8fa;
    border-color: #d1d5da;
}

.git-embed-button-default:hover {
    background-color: #f3f4f6;
    border-color: #c7ccd1;
    color: #24292f;
    text-decoration: none;
}

.git-embed-button-small {
    padding: 4px 8px;
    font-size: 11px;
    line-height: 1.4;
}

.git-embed-button-medium {
    padding: 6px 12px;
    font-size: 12px;
    line-height: 1.5;
}

.git-embed-button-large {
    padding: 8px 16px;
    font-size: 14px;
    line-height: 1.6;
}

.git-embed-clone-btn:hover .dashicons {
    animation: pulse 0.3s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.git-embed-placeholder {
    border: 2px dashed #c3c4c7;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    background: #f9f9f9;
}

.git-embed-placeholder-content {
    max-width: 300px;
    margin: 0 auto;
}

.git-embed-placeholder-icon {
    font-size: 48px;
    display: contents;
    margin-bottom: 16px;
}

.git-embed-placeholder h3 {
    margin: 0 0 8px 0;
    color: #1e1e1e;
    font-size: 18px;
}

.git-embed-placeholder p {
    margin: 0;
    color: #757575;
    font-size: 14px;
    line-height: 1.4;
}

.git-embed-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 40px 20px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f9f9f9;
}

.git-embed-loading p {
    margin: 16px 0 0 0;
    color: #757575;
    font-size: 14px;
}

.git-embed-error {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 16px;
    border-radius: 6px;
    border: 1px solid #f1aeb5;
    font-size: 14px;
    margin: 16px 0;
}

@media (max-width: 768px) {
    .git-embed-card {
        padding: 16px;
    }
    
    .git-embed-site-info {
        margin-bottom: 12px;
        padding-bottom: 8px;
    }
    
    .git-embed-title-section {
        gap: 8px;
    }
    
    .git-embed-avatar-large {
        width: 30px;
        height: 30px;
    }
    
    .git-embed-avatar-medium {
        width: 26px;
        height: 26px;
    }
    
    .git-embed-owner-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .git-embed-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .git-embed-stats {
        gap: 12px;
    }
    
    .git-embed-actions {
        width: 100%;
    }
    
    .git-embed-button {
        flex: 1;
        justify-content: center;
        min-width: 0;
    }
    
    .wp-block-git-embed-feicode-repository.alignleft,
    .wp-block-git-embed-feicode-repository.alignright {
        float: none;
        margin-left: auto;
        margin-right: auto;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .git-embed-title {
        font-size: 16px;
    }
    
    .git-embed-title-section {
        flex-direction: column;
        gap: 8px;
    }
    
    .git-embed-avatar {
        align-self: flex-start;
    }
    
    .git-embed-owner-info {
        margin-top: 0;
    }
    
    .git-embed-actions {
        flex-direction: column;
    }
    
    .git-embed-stats {
        justify-content: space-between;
    }
    
    .git-embed-stat {
        flex-direction: column;
        text-align: center;
        gap: 2px;
    }
    
    .git-embed-site-info {
        justify-content: center;
    }
}

.wp-block[data-type="git-embed-feicode/repository"] {
    position: relative;
}

.wp-block[data-type="git-embed-feicode/repository"]:not(.is-selected) .git-embed-card {
    pointer-events: none;
}

.wp-block[data-type="git-embed-feicode/repository"].is-selected .git-embed-card {
    box-shadow: 0 0 0 2px #007cba;
}

.components-panel__body .components-toggle-control .components-form-toggle:disabled {
    opacity: 0.3;
}

.components-panel__body .components-select-control:disabled {
    opacity: 0.3;
}

.git-embed-card img {
    max-width: 100%;
    height: auto;
}

.git-embed-site-favicon,
.git-embed-avatar {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.git-embed-card .git-embed-avatar:hover {
    transform: scale(1.05);
    transition: transform 0.2s ease-in-out;
}

.git-embed-owner-type:empty {
    display: none;
}

.git-embed-owner-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    font-size: 12px;
    flex-wrap: wrap;
}

.git-embed-custom-domain-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    margin-top: 8px;
}

.git-embed-platform-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.git-embed-platform-badge.platform-github {
    background: #f6f8fa;
    color: #24292f;
}

.git-embed-platform-badge.platform-gitea {
    background: #f0f9e8;
    color: #609926;
}

.git-embed-platform-badge.platform-forgejo {
    background: #fef3e2;
    color: #fb923c;
}

.components-panel__body .components-text-control__input:invalid {
    border-color: #d63638;
    box-shadow: 0 0 0 1px #d63638;
}

.components-panel__body .components-text-control__help {
    font-size: 12px;
    color: #757575;
    margin-top: 4px;
}