/* Dashboard — share with community section (static card, animated buttons) */

.site-share-community {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    border: 1px solid rgb(99 102 241 / 0.28);
    background: linear-gradient(135deg, rgb(30 27 75 / 0.55), rgb(15 23 42 / 0.85));
}

.site-share-community-inner {
    position: relative;
    padding: 1.5rem 1.5rem 1.25rem;
}

@media (min-width: 640px) {
    .site-share-community-inner {
        padding: 1.75rem 1.75rem 1.5rem;
    }
}

.site-share-community-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}

.site-share-community-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, rgb(99 102 241 / 0.35), rgb(52 211 153 / 0.25));
    color: rgb(199 210 254);
}

.site-share-community-icon svg {
    width: 1.625rem;
    height: 1.625rem;
}

.site-share-community-title-wrap {
    flex: 1 1 14rem;
    min-width: 0;
}

.site-share-community-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
    padding: 0.2rem 0.65rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgb(110 231 183);
    background: rgb(52 211 153 / 0.12);
    border: 1px solid rgb(52 211 153 / 0.25);
}

.site-share-community-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: white;
    margin: 0;
    line-height: 1.35;
}

.site-share-community-lead {
    font-size: 0.875rem;
    color: rgb(203 213 225);
    margin: 0.5rem 0 0;
    line-height: 1.55;
    max-width: 42rem;
}

.site-share-community-lead strong {
    color: rgb(165 180 252);
    font-weight: 600;
}

.site-share-community-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

@media (min-width: 640px) {
    .site-share-community-stats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.site-share-community-stat {
    border-radius: 0.75rem;
    border: 1px solid rgb(51 65 85 / 0.6);
    background: rgb(15 23 42 / 0.4);
    padding: 0.625rem 0.75rem;
}

.site-share-community-stat--success {
    border-color: rgb(16 185 129 / 0.2);
    background: rgb(16 185 129 / 0.05);
}

.site-share-community-stat--warn {
    border-color: rgb(245 158 11 / 0.2);
    background: rgb(245 158 11 / 0.05);
}

.site-share-community-stat--earn {
    border-color: rgb(99 102 241 / 0.2);
    background: rgb(99 102 241 / 0.1);
}

.site-share-community-stat__label {
    font-size: 0.75rem;
    color: rgb(148 163 184);
}

.site-share-community-stat__value {
    margin-top: 0.25rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
}

.site-share-community-stat--success .site-share-community-stat__value {
    color: rgb(110 231 183);
}

.site-share-community-stat--warn .site-share-community-stat__value {
    color: rgb(252 211 77);
}

.site-share-community-stat--earn .site-share-community-stat__value {
    color: rgb(165 180 252);
}

.site-share-community-referral-code {
    margin: 0.75rem 0 0;
    font-size: 0.75rem;
    color: rgb(100 116 139);
}

.site-share-community-referral-code strong {
    color: rgb(203 213 225);
    font-weight: 600;
}

.site-share-community-benefits {
    display: grid;
    gap: 0.625rem;
    margin: 0 0 1.25rem;
    padding: 0;
    list-style: none;
}

@media (min-width: 640px) {
    .site-share-community-benefits {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem 1rem;
    }
}

.site-share-community-benefits li {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    font-size: 0.8125rem;
    color: rgb(148 163 184);
    line-height: 1.45;
    padding: 0.625rem 0.75rem;
    border-radius: 0.75rem;
    background: rgb(255 255 255 / 0.03);
    border: 1px solid rgb(255 255 255 / 0.06);
}

.site-share-community-benefits li strong {
    color: rgb(226 232 240);
    font-weight: 600;
}

.site-share-community-benefit-icon {
    flex-shrink: 0;
    margin-top: 0.1rem;
    font-size: 1rem;
    line-height: 1;
}

.site-share-community-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.site-share-community-link-box {
    flex: 1 1 12rem;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.75rem;
    border: 1px solid rgb(255 255 255 / 0.1);
    background: rgb(15 23 42 / 0.6);
}

.site-share-community-link-box code {
    flex: 1;
    min-width: 0;
    font-size: 0.75rem;
    color: rgb(165 180 252);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-share-community-copy-btn {
    position: relative;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    overflow: hidden;
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid rgb(129 140 248 / 0.45);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    color: white;
    background: linear-gradient(135deg, rgb(99 102 241), rgb(79 70 229));
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    animation: site-share-btn-glow 3s ease-in-out infinite;
}

.site-share-community-copy-btn::before {
    content: '';
    position: absolute;
    inset: -1px;
    background: linear-gradient(
        110deg,
        transparent 0%,
        rgb(255 255 255 / 0.1) 40%,
        rgb(255 255 255 / 0.18) 50%,
        rgb(255 255 255 / 0.1) 60%,
        transparent 100%
    );
    background-size: 220% 100%;
    animation: site-share-btn-shimmer 4s ease-in-out infinite;
    pointer-events: none;
}

.site-share-community-copy-btn span {
    position: relative;
    z-index: 1;
}

@keyframes site-share-btn-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgb(99 102 241 / 0.25);
    }
    50% {
        box-shadow: 0 0 18px 2px rgb(99 102 241 / 0.22);
    }
}

@keyframes site-share-btn-shimmer {
    0%, 100% { background-position: 200% 0; }
    50% { background-position: -200% 0; }
}

.site-share-community-copy-btn:hover {
    transform: translateY(-1px);
    border-color: rgb(165 180 252 / 0.65);
    box-shadow: 0 8px 20px rgb(99 102 241 / 0.35);
}

.site-share-community-copy-btn.is-copied {
    background: linear-gradient(135deg, rgb(16 185 129), rgb(5 150 105));
    border-color: rgb(52 211 153 / 0.55);
    animation: site-share-btn-copied-glow 2s ease-in-out infinite;
}

@keyframes site-share-btn-copied-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgb(52 211 153 / 0.25);
    }
    50% {
        box-shadow: 0 0 16px 2px rgb(52 211 153 / 0.2);
    }
}

html[data-theme='light'] .site-share-community {
    background: linear-gradient(135deg, rgb(238 242 255), rgb(248 250 252));
    border-color: rgb(199 210 254);
}

html[data-theme='light'] .site-share-community-title {
    color: rgb(15 23 42);
}

html[data-theme='light'] .site-share-community-lead {
    color: rgb(51 65 85);
}

html[data-theme='light'] .site-share-community-lead strong {
    color: rgb(79 70 229);
}

html[data-theme='light'] .site-share-community-stat {
    background: rgb(255 255 255 / 0.7);
    border-color: rgb(226 232 240);
}

html[data-theme='light'] .site-share-community-stat__value {
    color: rgb(15 23 42);
}

html[data-theme='light'] .site-share-community-referral-code strong {
    color: rgb(51 65 85);
}

html[data-theme='light'] .site-share-community-benefits li {
    background: rgb(255 255 255 / 0.7);
    border-color: rgb(226 232 240);
    color: rgb(71 85 105);
}

html[data-theme='light'] .site-share-community-benefits li strong {
    color: rgb(15 23 42);
}

html[data-theme='light'] .site-share-community-link-box {
    background: white;
    border-color: rgb(226 232 240);
}

html[data-theme='light'] .site-share-community-link-box code {
    color: rgb(79 70 229);
}

html[data-theme='light'] .site-share-community-copy-btn {
    color: white;
}

@media (prefers-reduced-motion: reduce) {
    .site-share-community-copy-btn,
    .site-share-community-copy-btn::before {
        animation: none !important;
    }

    .site-share-community-copy-btn:hover {
        transform: none;
    }
}
