/* ===== Share FAB ===== */
.share-fab {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #4d6bfe 0%, #3b56d6 100%);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(77, 107, 254, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    z-index: 100;
    opacity: 0.92;
}

.share-fab:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(77, 107, 254, 0.45);
    opacity: 1;
}

.share-fab:active {
    transform: translateY(0) scale(0.98);
}

.share-fab.loading {
    pointer-events: none;
    opacity: 0.7;
}

.share-fab.loading svg {
    animation: share-spin 1s linear infinite;
}

.share-fab svg {
    width: 22px;
    height: 22px;
}

@keyframes share-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .share-fab {
        right: 14px;
        bottom: 14px;
        width: 42px;
        height: 42px;
    }
    .share-fab svg {
        width: 18px;
        height: 18px;
    }
}

/* ===== Hidden Share Container ===== */
.share-container {
    position: fixed;
    left: -9999px;
    top: 0;
    width: 1080px;
    height: 1440px;
    overflow: hidden;
    z-index: -1;
    visibility: hidden;
}

.share-canvas {
    width: 1080px;
    height: 1440px;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    color: #f8fafc;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

/* ===== Share Header ===== */
.share-header {
    margin-bottom: 36px;
}

.share-header.compact {
    margin-bottom: 20px;
}

.share-header.compact .share-project-name {
    font-size: 24px;
}

.share-header.compact .share-subtitle {
    font-size: 15px;
}

.share-project-name {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: #f8fafc;
    margin: 0 0 8px 0;
}

.share-project-name span {
    color: #4d6bfe;
}

.share-subtitle {
    font-size: 18px;
    color: #94a3b8;
    margin: 0;
}

.share-score-row {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-top: 24px;
}

.share-score {
    font-size: 96px;
    font-weight: 800;
    line-height: 1;
    color: #f8fafc;
}

.share-score-suffix {
    font-size: 32px;
    color: #94a3b8;
    font-weight: 500;
}

.share-grade {
    margin-left: auto;
    font-size: 48px;
    font-weight: 800;
    color: #4d6bfe;
    background: rgba(77, 107, 254, 0.12);
    padding: 12px 28px;
    border-radius: 16px;
}

/* ===== Share Cards Grid ===== */
.share-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    flex: 1;
    min-height: 0;
}

.share-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 28px;
    display: flex;
    flex-direction: column;
}

.share-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.share-card-title {
    font-size: 22px;
    font-weight: 600;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 10px;
}

.share-card-title svg {
    width: 24px;
    height: 24px;
    color: #4d6bfe;
}

.share-card-score {
    font-size: 20px;
    font-weight: 700;
    color: #4d6bfe;
}

.share-card-value {
    font-size: 32px;
    font-weight: 700;
    color: #f8fafc;
    margin-top: auto;
}

.share-card-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    margin-top: 16px;
    overflow: hidden;
}

.share-card-bar-inner {
    height: 100%;
    background: linear-gradient(90deg, #4d6bfe, #7c93ff);
    border-radius: 4px;
}

/* ===== Share Comment ===== */
.share-comment {
    background: rgba(77, 107, 254, 0.08);
    border-left: 4px solid #4d6bfe;
    border-radius: 12px;
    padding: 20px 24px;
    margin: 24px 0;
    font-size: 20px;
    line-height: 1.6;
    color: #e2e8f0;
}

/* ===== Share Footer / Brand Bar ===== */
.share-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 20px;
    padding: 24px 28px;
    margin-top: 24px;
}

.share-brand {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.share-domain {
    font-size: 24px;
    font-weight: 700;
    color: #f8fafc;
}

.share-date {
    font-size: 16px;
    color: #94a3b8;
}

.share-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.share-qr img {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    background: #fff;
    padding: 8px;
}

.share-qr-caption {
    font-size: 14px;
    color: #94a3b8;
}

/* ===== Share Options Modal ===== */
.share-options-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.share-options-modal.open {
    display: flex;
}

.share-options-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.75);
    backdrop-filter: blur(4px);
}

.share-options-panel {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    color: #f8fafc;
    animation: share-options-in 0.2s ease;
}

@keyframes share-options-in {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.share-options-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.share-options-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.share-options-close {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-options-close:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #f8fafc;
}

.share-options-section {
    margin-bottom: 20px;
}

.share-options-section:last-child {
    margin-bottom: 0;
}

.share-options-label {
    font-size: 14px;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 10px;
}

.share-options-segment {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.share-option-btn {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px 4px;
    background: rgba(255, 255, 255, 0.04);
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.share-option-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.share-option-btn.active {
    background: rgba(77, 107, 254, 0.18);
    border-color: #4d6bfe;
    color: #4d6bfe;
}

.share-option-check {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    cursor: pointer;
    font-size: 15px;
    color: #e2e8f0;
}

.share-option-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #4d6bfe;
    cursor: pointer;
}

.share-options-footer {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.share-options-btn {
    flex: 1;
    padding: 12px 16px;
    border-radius: 14px;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.share-options-btn.secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
}

.share-options-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.14);
}

.share-options-btn.primary {
    background: linear-gradient(135deg, #4d6bfe 0%, #3b56d6 100%);
    color: #fff;
}

.share-options-btn.primary:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

@media (max-width: 480px) {
    .share-options-panel {
        padding: 20px;
    }
    .share-options-segment {
        grid-template-columns: repeat(2, 1fr);
    }
}
