/* Social Media Share Styles */
.tool-header .share-btn, .project-hero .share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--secondary-bg);
    color: var(--text-primary);
    border: 2px solid #00d4ff;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    align-self: start;
    white-space: nowrap;
}

/* Match project hero share button height with primary/secondary CTAs */
.project-hero .share-btn {
    padding: 1rem 2rem;
}

.tool-header .share-btn:hover {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: var(--primary-bg);
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 212, 255, 0.3);
}

.share-icon {
    font-size: 1.2rem;
}

/* Share Modal */
.share-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    animation: fadeIn 0.3s ease;
}

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

.share-modal-content {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.share-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
}

.share-modal-header h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin: 0;
}

.share-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-modal-close:hover {
    color: var(--text-primary);
}

.share-modal-body {
    padding: 2rem;
}

.share-description {
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: 8px;
    border-left: 3px solid var(--accent-primary);
}

.share-description p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

.share-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.share-platform-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.share-platform-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.share-platform-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.2);
}

.share-platform-btn.twitter:hover {
    background: #1DA1F2;
    border-color: #1DA1F2;
    color: white;
}

.share-platform-btn.facebook:hover {
    background: #1877F2;
    border-color: #1877F2;
    color: white;
}

.share-platform-btn.linkedin:hover {
    background: #0A66C2;
    border-color: #0A66C2;
    color: white;
}

.share-platform-btn.whatsapp:hover {
    background: #25D366;
    border-color: #25D366;
    color: white;
}

.share-platform-btn.reddit:hover {
    background: #FF4500;
    border-color: #FF4500;
    color: white;
}

.share-platform-btn.email:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: var(--primary-bg);
}

.share-link-section {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.share-link-input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
}

.share-link-input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.copy-link-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: var(--primary-bg);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.copy-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

.copy-success {
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, rgba(46, 213, 115, 0.2), rgba(46, 213, 115, 0.1));
    border: 1px solid var(--success);
    border-radius: 8px;
    color: var(--success);
    text-align: center;
    font-weight: 500;
    animation: fadeIn 0.3s ease;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .share-modal-content {
        max-width: 95%;
    }
    
    .share-modal-header {
        padding: 1rem 1.5rem;
    }
    
    .share-modal-header h3 {
        font-size: 1.25rem;
    }
    
    .share-modal-body {
        padding: 1.5rem;
    }
    
    .share-buttons {
        grid-template-columns: 1fr;
    }
    
    .share-link-section {
        flex-direction: column;
    }
    
    .copy-link-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .tool-header {
        grid-template-columns: auto 1fr;
    }
    
    .tool-header .share-btn {
        grid-column: 1 / -1;
        justify-self: center;
        margin-top: 1rem;
        /* Override base align-self so the button centers within flex layouts too */
        align-self: center;
    }
}

@media (max-width: 480px) {
    .tool-header .share-btn, .project-hero .share-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        width: 100%;
        justify-content: center;
    }
    
    .share-modal-header {
        padding: 1rem;
    }
    
    .share-modal-body {
        padding: 1rem;
    }
}
