/* ============================================
   Najibul Share System - Ultimate Edition
   Version: 7.0.0
   ============================================ */

/* Variables */
:root {
    --share-primary: #6c5ce7;
    --share-success: #00b894;
    --share-warning: #fdcb6e;
    --share-danger: #d63031;
    --share-dark: #2d3436;
    --share-light: #f5f6fa;
    --share-text: #2d3436;
    --share-text-light: #636e72;
    --share-border: #e8eaed;
    --share-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
    --share-glass: rgba(255, 255, 255, 0.95);
    --share-blur: blur(12px);
}

/* ============================================
   Share Container
   ============================================ */
.najibul-share-container {
    display: inline-block;
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Button Styles - YouTube Style */
.najibul-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f8f9fa;
    border: 1px solid var(--share-border);
    border-radius: 20px;
    color: var(--share-text-light);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.najibul-share-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(26, 115, 232, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.najibul-share-btn:active::before {
    width: 200px;
    height: 200px;
}

.najibul-share-btn:hover {
    background: #f1f3f4;
    border-color: #d2e3fc;
    color: #1a73e8;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(26, 115, 232, 0.2);
}

.najibul-share-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.najibul-share-btn.disabled,
.najibul-share-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Button Styles - Rounded */
.najibul-share-btn.style-rounded {
    border-radius: 8px;
}

/* Button Styles - Pill */
.najibul-share-btn.style-pill {
    border-radius: 30px;
    padding: 10px 20px;
}

/* Button Styles - Minimal */
.najibul-share-btn.style-minimal {
    background: transparent;
    border: none;
    padding: 6px 12px;
}

.najibul-share-btn.style-minimal:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Icon */
.najibul-share-icon {
    font-size: 16px;
    color: inherit;
    transition: transform 0.3s;
}

.najibul-share-btn:hover .najibul-share-icon {
    transform: scale(1.1);
}

/* Share Count */
.najibul-share-count {
    background: linear-gradient(135deg, #ff4757, #ff6b81);
    color: white;
    font-size: 11px;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
    padding: 0 4px;
    animation: countPulse 2s infinite;
    box-shadow: 0 2px 8px rgba(255, 71, 87, 0.4);
}

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

/* Earnings Badge */
.najibul-share-earnings {
    background: linear-gradient(135deg, var(--share-success), #00d4b4);
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 12px;
    margin-left: 4px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 184, 148, 0.3);
}

/* ============================================
   Share Modal
   ============================================ */
.najibul-share-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    animation: modalFade 0.3s ease;
}

.najibul-share-modal.active {
    display: block;
}

@keyframes modalFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.najibul-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: var(--share-blur);
}

.najibul-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
    background: var(--share-glass);
    backdrop-filter: var(--share-blur);
    border-radius: 20px;
    box-shadow: var(--share-shadow);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: modalSlide 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Modal Header */
.najibul-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.najibul-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--share-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.najibul-modal-title i {
    color: var(--share-primary);
}

.najibul-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--share-text-light);
    cursor: pointer;
    padding: 4px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.najibul-modal-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--share-text);
    transform: rotate(90deg);
}

/* Modal Stats */
.najibul-modal-stats {
    padding: 16px 24px;
    background: linear-gradient(135deg, #6c5ce710, #a29bfe10);
    display: flex;
    justify-content: space-around;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.stat-item {
    text-align: center;
}

.stat-label {
    font-size: 11px;
    color: var(--share-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--share-text);
}

/* Platforms Grid */
.najibul-platforms-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 24px;
    max-height: 350px;
    overflow-y: auto;
}

.najibul-platform-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
    position: relative;
    overflow: hidden;
}

.najibul-platform-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0;
    background: linear-gradient(to bottom, rgba(255,255,255,0.2), transparent);
    transition: height 0.3s;
}

.najibul-platform-item:hover {
    transform: translateY(-4px);
    border-color: var(--platform-color);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.najibul-platform-item:hover::before {
    height: 100%;
}

.najibul-platform-item:active {
    transform: translateY(0);
}

.najibul-platform-item.loading {
    opacity: 0.7;
    pointer-events: none;
}

.najibul-platform-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    color: white;
    font-size: 20px;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.najibul-platform-item:hover .najibul-platform-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.najibul-platform-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--share-text);
    margin-bottom: 4px;
}

.platform-limit {
    font-size: 10px;
    color: var(--share-text-light);
}

/* Copy Section */
.najibul-copy-section {
    padding: 0 24px 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    margin-top: 8px;
    padding-top: 20px;
}

.najibul-url-input {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.najibul-share-url {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    font-size: 14px;
    background: #f8f9fa;
    color: var(--share-text);
    transition: all 0.2s;
}

.najibul-share-url:focus {
    outline: none;
    border-color: var(--share-primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
}

.najibul-copy-btn {
    background: linear-gradient(135deg, var(--share-primary), #a29bfe);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.najibul-copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.4);
}

.najibul-copy-btn:active {
    transform: translateY(0);
}

.najibul-copy-btn.copied {
    background: var(--share-success);
}

/* Modal Footer */
.najibul-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--share-text-light);
}

.footer-text {
    display: flex;
    align-items: center;
    gap: 4px;
}

.report-spam-btn {
    background: none;
    border: none;
    color: var(--share-text-light);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
}

.report-spam-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--share-danger);
}

/* Notification */
.najibul-share-notify {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--share-success), #00d4b4);
    color: white;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    z-index: 1000000;
    max-width: 300px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.najibul-share-notify.show {
    opacity: 1;
    transform: translateY(0);
}

.najibul-share-notify.error {
    background: linear-gradient(135deg, var(--share-danger), #ff6b6b);
}

.najibul-share-notify.info {
    background: linear-gradient(135deg, var(--share-primary), #a29bfe);
}

.najibul-share-notify i {
    font-size: 16px;
}

/* Stats Shortcode */
.najibul-share-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.stats-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: all 0.3s;
}

.stats-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.stats-card .stat-icon {
    font-size: 24px;
    margin-bottom: 10px;
}

.stats-card .stat-value {
    font-size: 24px;
    font-weight: bold;
    color: var(--share-primary);
    margin: 8px 0;
}

.stats-card .stat-label {
    font-size: 12px;
    color: var(--share-text-light);
    text-transform: uppercase;
}

/* Platform Badges */
.platform-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    color: white;
}

.platform-badge.platform-facebook { background: #1877F2; }
.platform-badge.platform-whatsapp { background: #25D366; }
.platform-badge.platform-telegram { background: #0088CC; }
.platform-badge.platform-x { background: #000000; }
.platform-badge.platform-copy-link { background: #9B59B6; }

/* Loading Spinner */
.najibul-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

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

/* Ripple Effect */
.najibul-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    transform: scale(0);
    animation: ripple 0.8s ease-out;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .najibul-platforms-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 16px;
        max-height: 300px;
    }
    
    .najibul-modal-content {
        width: 95%;
    }
    
    .najibul-url-input {
        flex-direction: column;
    }
    
    .najibul-copy-btn {
        width: 100%;
        justify-content: center;
    }
    
    .najibul-share-stats {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .najibul-platforms-grid {
        grid-template-columns: 1fr;
    }
    
    .najibul-modal-header {
        padding: 16px;
    }
    
    .najibul-modal-stats {
        padding: 12px 16px;
    }
    
    .najibul-platforms-grid {
        padding: 16px;
    }
    
    .najibul-copy-section {
        padding: 0 16px 16px;
    }
    
    .najibul-modal-footer {
        padding: 12px 16px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --share-glass: rgba(45, 52, 54, 0.95);
        --share-text: #f5f6fa;
        --share-text-light: #b2bec3;
        --share-border: #4a4a5a;
    }
    
    .najibul-share-btn {
        background: #2d3436;
        border-color: #4a4a5a;
        color: #b2bec3;
    }
    
    .najibul-share-btn:hover {
        background: #3d3d4a;
        border-color: #6c5ce7;
        color: #a29bfe;
    }
    
    .najibul-platform-item {
        background: #2d3436;
        border-color: #4a4a5a;
    }
    
    .najibul-platform-name {
        color: #f5f6fa;
    }
    
    .najibul-share-url {
        background: #2d3436;
        border-color: #4a4a5a;
        color: #f5f6fa;
    }
    
    .stats-card {
        background: #2d3436;
    }
    
    .stats-card .stat-label {
        color: #b2bec3;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast */
@media (prefers-contrast: high) {
    .najibul-share-btn {
        border: 2px solid currentColor;
    }
    
    .najibul-platform-item {
        border: 2px solid currentColor;
    }
}